def _revs_equal(rev1, rev2, rev_type):
 if (((rev1 is None) and (rev2 is not None)) or ((rev2 is None) and (rev1 is not None))):
  return False
 elif (rev1 is rev2 is None):
  return True
 elif (rev_type == 'sha1'):
  return rev1.startswith(rev2)
 else:
  return (rev1 == rev2)

def _revs_equal ( rev1 , rev2 , rev_type ) : if ( ( ( rev1 is None ) and ( rev2 is not None ) ) or ( ( rev2 is None ) and ( rev1 is not None ) ) ) : return False elif ( rev1 is rev2 is None ) : return True elif ( rev_type == 'sha1' ) : return rev1 . startswith ( rev2 ) else : return ( rev1 == rev2 )
shorthand helper function for comparing sha1s .