[PATCH] alter merge command to only consider active branch heads by default

Benjamin Pollack benjamin at bitquabit.com
Tue Mar 17 20:04:10 UTC 2009


# HG changeset patch
# User Benjamin Pollack <benjamin at bitquabit.com>
# Date 1237320069 14400
# Node ID febcb7164ddacf30b498b68d5dd4c36ab6e04039
# Parent  166b6b12df44819a48f094d2b1699f781dec889c
alter merge command to only consider active branch heads by default

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2013,6 +2013,7 @@
     if not node:
         branch = repo.changectx(None).branch()
         bheads = repo.branchheads(branch)
+        bheads = [head for head in bheads if repo[head].children() == 0]
         if len(bheads) > 2:
             raise util.Abort(_("branch '%s' has %d heads - "
                                "please merge with an explicit rev") %



More information about the Mercurial-devel mailing list