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

login
register
mail settings
Submitter phabricator
Date May 8, 2018, 12:47 p.m.
Message ID <0b91ed17179a67bda2dcd0212add891f@localhost.localdomain>
Download mbox | patch
Permalink /patch/31343/
State Not Applicable
Headers show

Comments

phabricator - May 8, 2018, 12:47 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG0a79fb64118e: revset: use resolvehexnodeidprefix() in id() predicate (BC) (authored by martinvonz, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D3311?vs=8489&id=8517#toc

REPOSITORY
  rHG Mercurial

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

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

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

CHANGE DETAILS




To: martinvonz, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
Yuya Nishihara - May 8, 2018, 12:53 p.m.
I've duplicated "BROKEN" lines as we get two "broken" results by this change.
phabricator - May 8, 2018, 12:53 p.m.
yuja added a comment.


  I've duplicated "BROKEN" lines as we get two "broken" results by this change.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers, yuja
Cc: yuja, 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
@@ -1874,9 +1874,9 @@ 
   $ hg debugrevspec '0:wdir() & fffb'
   abort: 00changelog.i@fffb: ambiguous identifier!
   [255]
-BROKEN should be '2' (node lookup uses unfiltered repo since dc25ed84bee8)
+BROKEN should be '2' (node lookup uses unfiltered repo)
   $ hg debugrevspec '0:wdir() & id(fffb)'
-  2
+BROKEN should be '2' (node lookup uses unfiltered repo)
   $ 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 LookupError: