Mercurial > hg
diff mercurial/localrepo.py @ 4177:a7af0eeae8a3
Move branches.cache to branch.cache
Keeps old clients from conflicting with new caches, makes features
logic unnecessary.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 13 Mar 2007 15:18:10 -0500 |
parents | f9bbcebcacea |
children | 0b48e3985765 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Mar 13 15:02:33 2007 -0300 +++ b/mercurial/localrepo.py Tue Mar 13 15:18:10 2007 -0500 @@ -17,7 +17,6 @@ class localrepository(repo.repository): capabilities = ('lookup', 'changegroupsubset') supported = ('revlogv1', 'store') - branchcache_features = ('default',) def __del__(self): self.transhandle = None @@ -374,25 +373,9 @@ def _readbranchcache(self): partial = {} try: - f = self.opener("branches.cache") + f = self.opener("branch.cache") lines = f.read().split('\n') f.close() - features = lines.pop(0).strip() - if not features.startswith('features: '): - raise ValueError(_('branch cache: no features specified')) - features = features.split(' ', 1)[1].split() - missing_features = [] - for feature in self.branchcache_features: - try: - features.remove(feature) - except ValueError, inst: - missing_features.append(feature) - if missing_features: - raise ValueError(_('branch cache: missing features: %s') - % ', '.join(missing_features)) - if features: - raise ValueError(_('branch cache: unknown features: %s') - % ', '.join(features)) last, lrev = lines.pop(0).split(" ", 1) last, lrev = bin(last), int(lrev) if not (lrev < self.changelog.count() and @@ -413,8 +396,7 @@ def _writebranchcache(self, branches, tip, tiprev): try: - f = self.opener("branches.cache", "w") - f.write(" features: %s\n" % ' '.join(self.branchcache_features)) + f = self.opener("branch.cache", "w") f.write("%s %s\n" % (hex(tip), tiprev)) for label, node in branches.iteritems(): f.write("%s %s\n" % (hex(node), label))