scmutil: fix shortesthexnodeidprefix on Python 3 for 0-prefixed nodes
authorAugie Fackler <augie@google.com>
Wed, 11 Jul 2018 13:40:50 -0400
changeset 38659 cc76692f401d
parent 38658 a75896bf5ccb
child 38660 b07b691d2667
scmutil: fix shortesthexnodeidprefix on Python 3 for 0-prefixed nodes This fixes test-bookmarks.t on Python 3 (which had regressed.) Differential Revision: https://phab.mercurial-scm.org/D3926
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Wed Jul 11 12:36:37 2018 -0400
+++ b/mercurial/scmutil.py	Wed Jul 11 13:40:50 2018 -0400
@@ -458,7 +458,7 @@
             # if we are a pure int, then starting with zero will not be
             # confused as a rev; or, obviously, if the int is larger
             # than the value of the tip rev
-            if prefix[0] == '0' or i > len(cl):
+            if prefix[0:1] == b'0' or i > len(cl):
                 return False
             return True
         except ValueError: