context: handle namespaces in revsymbol()
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 06 Apr 2018 23:46:17 -0700
changeset 37529 45667439439e
parent 37528 d2b484eed1ec
child 37530 35b34202dd3b
context: handle namespaces in revsymbol() Similar reasoning as previous patches. Differential Revision: https://phab.mercurial-scm.org/D3194
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Fri Apr 06 23:43:52 2018 -0700
+++ b/mercurial/scmutil.py	Fri Apr 06 23:46:17 2018 -0700
@@ -490,6 +490,14 @@
             except (TypeError, LookupError):
                 pass
 
+        # look up bookmarks through the name interface
+        try:
+            node = repo.names.singlenode(repo, symbol)
+            rev = repo.changelog.rev(node)
+            return repo[rev]
+        except KeyError:
+            pass
+
         return repo[symbol]
 
     except error.WdirUnsupported: