Patchwork D3462: revset: make id() an empty set for ambiguous nodeid (BC)

login
register
mail settings
Submitter phabricator
Date May 8, 2018, 12:47 p.m.
Message ID <e204793bf91963f7de16c5cb4136c523@localhost.localdomain>
Download mbox | patch
Permalink /patch/31342/
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 rHG37e7ae332e90: revset: make id() an empty set for ambiguous nodeid (BC) (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3462?vs=8488&id=8516

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

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
@@ -1713,8 +1713,6 @@ 
 
 Test hexadecimal revision
   $ log 'id(2)'
-  abort: 00changelog.i@2: ambiguous identifier!
-  [255]
   $ log 'id(23268)'
   4
   $ log 'id(2785f51eece)'
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1336,6 +1336,8 @@ 
             pm = repo.changelog._partialmatch(n)
             if pm is not None:
                 rn = repo.changelog.rev(pm)
+        except LookupError:
+            pass
         except error.WdirUnsupported:
             rn = node.wdirrev