branch closing: permit closing the default branch
authorJohn Mulligan <phlogistonjohn@asynchrono.us>
Sun, 25 Jan 2009 13:20:43 -0500
changeset 7728 b7ac53f7b061
parent 7727 25fc4c620e54
child 7729 dd08e1e0cea1
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.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu Feb 05 17:40:25 2009 +0100
+++ b/mercurial/localrepo.py	Sun Jan 25 13:20:43 2009 -0500
@@ -852,8 +852,6 @@
             user = wctx.user()
             text = wctx.description()
 
-            if branchname == 'default' and extra.get('close'):
-                raise util.Abort(_('closing the default branch is invalid'))
             p1, p2 = [p.node() for p in wctx.parents()]
             c1 = self.changelog.read(p1)
             c2 = self.changelog.read(p2)