D3463: directaccess: use resolvehexnodeidprefix() instead of _partialmatch()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon May 7 22:19:10 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Same reasoning as previous commit: I want to make
  resolvehexnodeidprefix() move complex and don't want to duplicate that
  code in directaccess.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1541,7 +1541,6 @@
     unficl = unfi.changelog
     cl = repo.changelog
     tiprev = len(unficl)
-    pmatch = unficl._partialmatch
     allowrevnums = repo.ui.configbool('experimental', 'directaccess.revnums')
     for s in symbols:
         try:
@@ -1557,7 +1556,7 @@
             pass
 
         try:
-            s = pmatch(s)
+            s = resolvehexnodeidprefix(unfi, s)
         except (error.LookupError, error.WdirUnsupported):
             s = None
 



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


More information about the Mercurial-devel mailing list