[Updated] D8514: revisions: parse "x123" as "nodeid starting with 123" without prefixhexnode
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Mon May 11 23:37:52 UTC 2020
Closed by commit rHG62435a5b46fe: revisions: parse "x123" as "nodeid starting with 123" without prefixhexnode (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8514?vs=21336&id=21346
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8514/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8514
AFFECTED FILES
mercurial/scmutil.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
@@ -1864,12 +1864,12 @@
$ log 'id(2)'
$ log 'id(8)'
3
- $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x8)'
+ $ hg log --template '{rev}\n' -r 'id(x8)'
3
- $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x8'
+ $ hg log --template '{rev}\n' -r 'x8'
3
- $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'id(x)'
- $ hg --config experimental.revisions.prefixhexnode=yes log --template '{rev}\n' -r 'x'
+ $ hg log --template '{rev}\n' -r 'id(x)'
+ $ hg log --template '{rev}\n' -r 'x'
abort: 00changelog.i@: ambiguous identifier!
[255]
$ log 'id(23268)'
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -456,9 +456,7 @@
def resolvehexnodeidprefix(repo, prefix):
- if prefix.startswith(b'x') and repo.ui.configbool(
- b'experimental', b'revisions.prefixhexnode'
- ):
+ if prefix.startswith(b'x'):
prefix = prefix[1:]
try:
# Uses unfiltered repo because it's faster when prefix is ambiguous/
To: martinvonz, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200511/4042e2d5/attachment-0002.html>
More information about the Mercurial-patches
mailing list