changeset 13363:999f616b09dc

bookmarks: merge lookup into localrepo
author Matt Mackall <mpm@selenic.com>
date Thu, 10 Feb 2011 13:46:28 -0600
parents ee01d9d84115
children ddddb76f2da3
files hgext/bookmarks.py mercurial/localrepo.py
diffstat 2 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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():