changeset 37530:35b34202dd3b

context: handle partial nodeids in revsymbol() Similar reasoning as previous patches. Differential Revision: https://phab.mercurial-scm.org/D3195
author Martin von Zweigbergk <martinvonz@google.com>
date Sun, 08 Apr 2018 09:28:49 -0700
parents 45667439439e
children 6639ac97ec3b
files mercurial/scmutil.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: