Patchwork D3311: revset: use resolvehexnodeidprefix() in id() predicate (BC)

login
register
mail settings
Submitter phabricator
Date April 14, 2018, 6:16 a.m.
Message ID <edaebc2e3f7c7011ea680f74709ff188@localhost.localdomain>
Download mbox | patch
Permalink /patch/30995/
State Not Applicable
Headers show

Comments

phabricator - April 14, 2018, 6:16 a.m.
martinvonz updated this revision to Diff 8248.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3311?vs=8117&id=8248

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

AFFECTED FILES
  mercurial/revset.py
  tests/test-revset.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -1878,7 +1878,8 @@ 
   [255]
 BROKEN should be '2' (node lookup uses unfiltered repo since dc25ed84bee8)
   $ hg debugrevspec '0:wdir() & id(fffb)'
-  2
+  abort: 00changelog.i@fffb: ambiguous identifier!
+  [255]
   $ hg debugrevspec '0:wdir() & ffff8'
   4
   $ hg debugrevspec '0:wdir() & fffff'
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1333,7 +1333,7 @@ 
     else:
         rn = None
         try:
-            pm = repo.changelog._partialmatch(n)
+            pm = scmutil.resolvehexnodeidprefix(repo, n)
             if pm is not None:
                 rn = repo.changelog.rev(pm)
         except error.WdirUnsupported: