comparison mercurial/localrepo.py @ 7728:b7ac53f7b061

branch closing: permit closing the default branch There was no good reason to special case the 'default' branch. Allow the 'default' branch to be closed if the user wants it. If you're uncomfortable about mistakenly closing the default branch, you can always reopen the branch by commiting a "normal" changeset onto the closed branch.
author John Mulligan <phlogistonjohn@asynchrono.us>
date Sun, 25 Jan 2009 13:20:43 -0500
parents 752325f2208d
children b8d750daadde
comparison
equal deleted inserted replaced
7727:25fc4c620e54 7728:b7ac53f7b061
850 extra = wctx.extra().copy() 850 extra = wctx.extra().copy()
851 branchname = extra['branch'] 851 branchname = extra['branch']
852 user = wctx.user() 852 user = wctx.user()
853 text = wctx.description() 853 text = wctx.description()
854 854
855 if branchname == 'default' and extra.get('close'):
856 raise util.Abort(_('closing the default branch is invalid'))
857 p1, p2 = [p.node() for p in wctx.parents()] 855 p1, p2 = [p.node() for p in wctx.parents()]
858 c1 = self.changelog.read(p1) 856 c1 = self.changelog.read(p1)
859 c2 = self.changelog.read(p2) 857 c2 = self.changelog.read(p2)
860 m1 = self.manifest.read(c1[0]).copy() 858 m1 = self.manifest.read(c1[0]).copy()
861 m2 = self.manifest.read(c2[0]) 859 m2 = self.manifest.read(c2[0])