comparison mercurial/localrepo.py @ 15418:cf729af26963

phases: basic I/O logic Add function to read and write phase roots. Add a _phaseroots filecache on localrepo class to access the phaseroots data.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 04 Nov 2011 00:16:24 +0100
parents e27561eb4a76
children e80d0d3198f0
comparison
equal deleted inserted replaced
15417:5261140d9322 15418:cf729af26963
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, bookmarks 11 import changelog, dirstate, filelog, manifest, context, bookmarks, phases
12 import lock, transaction, store, encoding 12 import lock, transaction, store, encoding
13 import scmutil, util, extensions, hook, error, revset 13 import scmutil, util, extensions, hook, error, revset
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
167 def _bookmarkcurrent(self): 167 def _bookmarkcurrent(self):
168 return bookmarks.readcurrent(self) 168 return bookmarks.readcurrent(self)
169 169
170 def _writebookmarks(self, marks): 170 def _writebookmarks(self, marks):
171 bookmarks.write(self) 171 bookmarks.write(self)
172
173 @filecache('phaseroots')
174 def _phaseroots(self):
175 return phases.readroots(self)
172 176
173 @filecache('00changelog.i', True) 177 @filecache('00changelog.i', True)
174 def changelog(self): 178 def changelog(self):
175 c = changelog.changelog(self.sopener) 179 c = changelog.changelog(self.sopener)
176 if 'HG_PENDING' in os.environ: 180 if 'HG_PENDING' in os.environ: