[PATCH 1 of 2] honor --force on merge involving subrepos

Johan Euphrosine proppy at google.com
Mon Jan 9 07:46:01 CST 2012


# HG changeset patch
# User Johan Euphrosine <proppy at google.com>
# Date 1326116632 -3600
# Node ID dda1e13e0686c205f7dcb188f1db229f416f5fa1
# Parent  a08547027b43603f26e71fd03f855fdd8b226a94
honor --force on merge involving subrepos

diff -r a08547027b43 -r dda1e13e0686 mercurial/merge.py
--- a/mercurial/merge.py	Mon Jan 09 14:43:27 2012 +0100
+++ b/mercurial/merge.py	Mon Jan 09 14:43:52 2012 +0100
@@ -531,10 +531,11 @@
                     raise util.Abort(_("nothing to merge"),
                                      hint=_("use 'hg update' "
                                             "or check 'hg heads'"))
-            if not force and (wc.files() or wc.deleted()):
+            if not force:
+              if (wc.files() or wc.deleted()):
                 raise util.Abort(_("outstanding uncommitted changes"),
                                  hint=_("use 'hg status' to list changes"))
-            for s in wc.substate:
+              for s in wc.substate:
                 if wc.sub(s).dirty():
                     raise util.Abort(_("outstanding uncommitted changes in "
                                        "subrepository '%s'") % s)


More information about the Mercurial-devel mailing list