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

login
register
mail settings
Submitter phabricator
Date April 25, 2018, 4:53 p.m.
Message ID <04808a506d1cbec22b7e1ddd1d4f0415@localhost.localdomain>
Download mbox | patch
Permalink /patch/31228/
State Not Applicable
Headers show

Comments

phabricator - April 25, 2018, 4:53 p.m.
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




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

Patch

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