mercurial/scmutil.py
changeset 38659 cc76692f401d
parent 38605 85c74c5a1590
child 38676 3b072388ca78
equal deleted inserted replaced
38658:a75896bf5ccb 38659:cc76692f401d
   456         try:
   456         try:
   457             i = int(prefix)
   457             i = int(prefix)
   458             # if we are a pure int, then starting with zero will not be
   458             # if we are a pure int, then starting with zero will not be
   459             # confused as a rev; or, obviously, if the int is larger
   459             # confused as a rev; or, obviously, if the int is larger
   460             # than the value of the tip rev
   460             # than the value of the tip rev
   461             if prefix[0] == '0' or i > len(cl):
   461             if prefix[0:1] == b'0' or i > len(cl):
   462                 return False
   462                 return False
   463             return True
   463             return True
   464         except ValueError:
   464         except ValueError:
   465             return False
   465             return False
   466 
   466