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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue May 8 08:47:45 EDT 2018


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

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 at 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
 



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


More information about the Mercurial-devel mailing list