context: handle partial nodeids in revsymbol()
authorMartin von Zweigbergk <martinvonz@google.com>
Sun, 08 Apr 2018 09:28:49 -0700
changeset 37530 35b34202dd3b
parent 37529 45667439439e
child 37531 6639ac97ec3b
context: handle partial nodeids in revsymbol() Similar reasoning as previous patches. Differential Revision: https://phab.mercurial-scm.org/D3195
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Fri Apr 06 23:46:17 2018 -0700
+++ b/mercurial/scmutil.py	Sun Apr 08 09:28:49 2018 -0700
@@ -498,6 +498,11 @@
         except KeyError:
             pass
 
+        node = repo.unfiltered().changelog._partialmatch(symbol)
+        if node is not None:
+            rev = repo.changelog.rev(node)
+            return repo[rev]
+
         return repo[symbol]
 
     except error.WdirUnsupported: