[PATCH] Remove branch closing special case

John Mulligan phlogistonjohn at asynchrono.us
Sat Jan 17 13:06:37 CST 2009


# HG changeset patch
# User John Mulligan <phlogistonjohn at asynchrono.us>
# Date 1232219153 18000
# Node ID aee3736d9bbdd280acb1a8fbafda80b8862e6486
# Parent  3cc74ee75b0d109d63df4d09d2eb2aa08ee36204
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.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -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)


More information about the Mercurial-devel mailing list