mercurial/scmutil.py
changeset 38855 7848f284b211
parent 38854 531b86cc8fb3
child 38856 a01200b25da6
--- a/mercurial/scmutil.py	Mon May 07 16:12:12 2018 -0700
+++ b/mercurial/scmutil.py	Sun Apr 29 10:07:40 2018 -0700
@@ -437,6 +437,9 @@
     return '%d:%s' % (rev, hexfunc(node))
 
 def resolvehexnodeidprefix(repo, prefix):
+    if (prefix.startswith('x') and
+        repo.ui.configbool('experimental', 'revisions.prefixhexnode')):
+        prefix = prefix[1:]
     try:
         # Uses unfiltered repo because it's faster when prefix is ambiguous/
         # This matches the shortesthexnodeidprefix() function below.