comparison mercurial/localrepo.py @ 4176:f9bbcebcacea

"default" is the default branch name
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 13 Mar 2007 15:02:33 -0300
parents 7b5723c95a82
children a7af0eeae8a3
comparison
equal deleted inserted replaced
4175:fc12ac3755d5 4176:f9bbcebcacea
15 demandload(globals(), "os revlog time util") 15 demandload(globals(), "os revlog time util")
16 16
17 class localrepository(repo.repository): 17 class localrepository(repo.repository):
18 capabilities = ('lookup', 'changegroupsubset') 18 capabilities = ('lookup', 'changegroupsubset')
19 supported = ('revlogv1', 'store') 19 supported = ('revlogv1', 'store')
20 branchcache_features = ('unnamed',) 20 branchcache_features = ('default',)
21 21
22 def __del__(self): 22 def __del__(self):
23 self.transhandle = None 23 self.transhandle = None
24 def __init__(self, parentui, path=None, create=0): 24 def __init__(self, parentui, path=None, create=0):
25 repo.repository.__init__(self) 25 repo.repository.__init__(self)
725 raise util.Abort(_('branch name not in UTF-8!')) 725 raise util.Abort(_('branch name not in UTF-8!'))
726 else: 726 else:
727 branchname = "" 727 branchname = ""
728 728
729 if use_dirstate: 729 if use_dirstate:
730 oldname = c1[5].get("branch", "") # stored in UTF-8 730 oldname = c1[5].get("branch") or "default" # stored in UTF-8
731 if not commit and not remove and not force and p2 == nullid and \ 731 if not commit and not remove and not force and p2 == nullid and \
732 branchname == oldname: 732 branchname == oldname:
733 self.ui.status(_("nothing changed\n")) 733 self.ui.status(_("nothing changed\n"))
734 return None 734 return None
735 735