Mercurial > hg
diff mercurial/scmutil.py @ 38659:cc76692f401d
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 11 Jul 2018 13:40:50 -0400 |
parents | 85c74c5a1590 |
children | 3b072388ca78 |
line wrap: on
line diff
--- 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: