# HG changeset patch # User Matt Mackall # Date 2011-02-10 19:46:27 # Node ID cce2e7b77e3674424cff22eb4911d3ed44b16f93 # Parent 4e1ba6ead69c450c62321367c5d5a92514bd4b6b bookmarks: move property methods into localrepo diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -164,14 +164,6 @@ def reposetup(ui, repo): 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: diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -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 @@ class localrepository(repo.repository): 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):