bookmarks: merge lookup into localrepo
authorMatt Mackall <mpm@selenic.com>
Thu, 10 Feb 2011 13:46:28 -0600
changeset 13363 999f616b09dc
parent 13362 ee01d9d84115
child 13364 ddddb76f2da3
bookmarks: merge lookup into localrepo
hgext/bookmarks.py
mercurial/localrepo.py
--- a/hgext/bookmarks.py	Thu Feb 10 13:46:28 2011 -0600
+++ b/hgext/bookmarks.py	Thu Feb 10 13:46:28 2011 -0600
@@ -134,11 +134,6 @@
         return
 
     class bookmark_repo(repo.__class__):
-        def lookup(self, key):
-            if key in self._bookmarks:
-                key = self._bookmarks[key]
-            return super(bookmark_repo, self).lookup(key)
-
         def pull(self, remote, heads=None, force=False):
             result = super(bookmark_repo, self).pull(remote, heads, force)
 
--- a/mercurial/localrepo.py	Thu Feb 10 13:46:28 2011 -0600
+++ b/mercurial/localrepo.py	Thu Feb 10 13:46:28 2011 -0600
@@ -520,6 +520,8 @@
         n = self.changelog._match(key)
         if n:
             return n
+        if key in self._bookmarks:
+            return self._bookmarks[key]
         if key in self.tags():
             return self.tags()[key]
         if key in self.branchtags():