display_commit more robust

Don't raise an exception if the revision can not be determined.