changeset 13355:cce2e7b77e36

bookmarks: move property methods into localrepo
author Matt Mackall <mpm@selenic.com>
date Thu, 10 Feb 2011 13:46:27 -0600
parents 4e1ba6ead69c
children d96db730fcb2
files hgext/bookmarks.py mercurial/localrepo.py
diffstat 2 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/bookmarks.py	Thu Feb 10 13:46:27 2011 -0600
+++ b/hgext/bookmarks.py	Thu Feb 10 13:46:27 2011 -0600
@@ -164,14 +164,6 @@
         return
 
     class bookmark_repo(repo.__class__):
-        @util.propertycache
-        def _bookmarks(self):
-            return bookmarks.read(self)
-
-        @util.propertycache
-        def _bookmarkcurrent(self):
-            return bookmarks.readcurrent(self)
-
         def rollback(self, dryrun=False):
             if os.path.exists(self.join('undo.bookmarks')):
                 if not dryrun:
--- a/mercurial/localrepo.py	Thu Feb 10 13:46:27 2011 -0600
+++ b/mercurial/localrepo.py	Thu Feb 10 13:46:27 2011 -0600
@@ -8,7 +8,7 @@
 from node import bin, hex, nullid, nullrev, short
 from i18n import _
 import repo, changegroup, subrepo, discovery, pushkey
-import changelog, dirstate, filelog, manifest, context
+import changelog, dirstate, filelog, manifest, context, bookmarks
 import lock, transaction, store, encoding
 import util, extensions, hook, error
 import match as matchmod
@@ -161,6 +161,13 @@
                 parts.pop()
         return False
 
+    @util.propertycache
+    def _bookmarks(self):
+        return bookmarks.read(self)
+
+    @util.propertycache
+    def _bookmarkcurrent(self):
+        return bookmarks.readcurrent(self)
 
     @propertycache
     def changelog(self):