--- a/mercurial/localrepo.py Tue Mar 13 21:54:34 2007 -0700
+++ b/mercurial/localrepo.py Wed Mar 14 01:26:09 2007 -0500
@@ -15,7 +15,6 @@
class localrepository(repo.repository):
capabilities = ('lookup', 'changegroupsubset')
supported = ('revlogv1', 'store')
- branchcache_features = ('unnamed',)
def __del__(self):
self.transhandle = None
@@ -395,25 +394,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
@@ -434,8 +417,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))
@@ -759,7 +741,7 @@
branchname = ""
if use_dirstate:
- oldname = c1[5].get("branch", "") # stored in UTF-8
+ oldname = c1[5].get("branch") # stored in UTF-8
if not commit and not remove and not force and p2 == nullid and \
branchname == oldname:
self.ui.status(_("nothing changed\n"))