comparison mercurial/localrepo.py @ 13355:cce2e7b77e36

bookmarks: move property methods into localrepo
author Matt Mackall <mpm@selenic.com>
date Thu, 10 Feb 2011 13:46:27 -0600
parents 4e33ef68b1f8
children d96db730fcb2
comparison
equal deleted inserted replaced
13354:4e1ba6ead69c 13355:cce2e7b77e36
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 from node import bin, hex, nullid, nullrev, short 8 from node import bin, hex, nullid, nullrev, short
9 from i18n import _ 9 from i18n import _
10 import repo, changegroup, subrepo, discovery, pushkey 10 import repo, changegroup, subrepo, discovery, pushkey
11 import changelog, dirstate, filelog, manifest, context 11 import changelog, dirstate, filelog, manifest, context, bookmarks
12 import lock, transaction, store, encoding 12 import lock, transaction, store, encoding
13 import util, extensions, hook, error 13 import util, extensions, hook, error
14 import match as matchmod 14 import match as matchmod
15 import merge as mergemod 15 import merge as mergemod
16 import tags as tagsmod 16 import tags as tagsmod
159 return sub.checknested(subpath[len(prefix) + 1:]) 159 return sub.checknested(subpath[len(prefix) + 1:])
160 else: 160 else:
161 parts.pop() 161 parts.pop()
162 return False 162 return False
163 163
164 @util.propertycache
165 def _bookmarks(self):
166 return bookmarks.read(self)
167
168 @util.propertycache
169 def _bookmarkcurrent(self):
170 return bookmarks.readcurrent(self)
164 171
165 @propertycache 172 @propertycache
166 def changelog(self): 173 def changelog(self):
167 c = changelog.changelog(self.sopener) 174 c = changelog.changelog(self.sopener)
168 if 'HG_PENDING' in os.environ: 175 if 'HG_PENDING' in os.environ: