D3428: revlog: make pure version of _partialmatch() support 40-byte hex nodeids

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Apr 25 16:53:56 UTC 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGee3d58b4a47f: revlog: make pure version of _partialmatch() support 40-byte hex nodeids (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3428?vs=8430&id=8431

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1466,7 +1466,7 @@
         if id in self._pcache:
             return self._pcache[id]
 
-        if len(id) < 40:
+        if len(id) <= 40:
             try:
                 # hex(node)[:...]
                 l = len(id) // 2  # grab an even number of digits



To: martinvonz, indygreg, #hg-reviewers, durin42
Cc: mercurial-devel


More information about the Mercurial-devel mailing list