Patchwork D3926: scmutil: fix shortesthexnodeidprefix on Python 3 for 0-prefixed nodes

login
register
mail settings
Submitter phabricator
Date July 11, 2018, 6:13 p.m.
Message ID <53de10b153abb75f94d6de88b88a2ef2@localhost.localdomain>
Download mbox | patch
Permalink /patch/32798/
State Not Applicable
Headers show

Comments

phabricator - July 11, 2018, 6:13 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcc76692f401d: scmutil: fix shortesthexnodeidprefix on Python 3 for 0-prefixed nodes (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3926?vs=9544&id=9556

REVISION DETAIL
  https://phab.mercurial-scm.org/D3926

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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: