Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Nov 03 23:49:14 2011 +0100 +++ b/mercurial/localrepo.py Fri Nov 04 00:16:24 2011 +0100 @@ -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, bookmarks +import changelog, dirstate, filelog, manifest, context, bookmarks, phases import lock, transaction, store, encoding import scmutil, util, extensions, hook, error, revset import match as matchmod @@ -170,6 +170,10 @@ def _writebookmarks(self, marks): bookmarks.write(self) + @filecache('phaseroots') + def _phaseroots(self): + return phases.readroots(self) + @filecache('00changelog.i', True) def changelog(self): c = changelog.changelog(self.sopener)