changeset 37529:45667439439e

context: handle namespaces in revsymbol() Similar reasoning as previous patches. Differential Revision: https://phab.mercurial-scm.org/D3194
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 06 Apr 2018 23:46:17 -0700
parents d2b484eed1ec
children 35b34202dd3b
files mercurial/scmutil.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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: