[PATCH 4 of 4] [merge-tools] tool.checkalways = True will force a merge check
David Champion
dgc at uchicago.edu
Wed Apr 21 15:07:59 CDT 2010
# HG changeset patch
# User David Champion <dgc at uchicago.edu>
# Date 1271873745 18000
# Node ID 092339d8ee63759ed602d624eaa469cddb91c7c1
# Parent d6f1172a8d76c116b069cd131af140f91043b979
[merge-tools] tool.checkalways = True will force a merge check
tool.checkalways = True can be used when the exit status of a merge
tool is unreliable but an explicit user signoff on the merge result is
acceptable.
Updates the 'editor' tool to use this flag.
diff -r d6f1172a8d76 -r 092339d8ee63 contrib/mergetools.hgrc
--- a/contrib/mergetools.hgrc Wed Apr 21 12:08:06 2010 -0500
+++ b/contrib/mergetools.hgrc Wed Apr 21 13:15:45 2010 -0500
@@ -89,7 +89,6 @@
editor.args = -c "${VISUAL-${EDITOR-vi}} $local"
editor.premerge = True
editor.markers = True
-editor.checkconflicts = True
-editor.checkchanged = True
+editor.checkalways = True
editor.priority = -99
editor.gui = False
diff -r d6f1172a8d76 -r 092339d8ee63 mercurial/filemerge.py
--- a/mercurial/filemerge.py Wed Apr 21 12:08:06 2010 -0500
+++ b/mercurial/filemerge.py Wed Apr 21 13:15:45 2010 -0500
@@ -216,7 +216,14 @@
if re.match("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data()):
r = 1
- if not r and _toolbool(ui, tool, "checkchanged"):
+ checked = False
+ if _toolbool(ui, tool, "checkalways"):
+ checked = True
+ if ui.promptchoice(_("was merge of '%s' successful (yn)?") % fd,
+ (_("&Yes"), _("&No")), 1):
+ r = 1
+
+ if not r and not checked and _toolbool(ui, tool, "checkchanged"):
if filecmp.cmp(repo.wjoin(fd), back):
if ui.promptchoice(_(" output file %s appears unchanged\n"
"was merge successful (yn)?") % fd,
More information about the Mercurial-devel
mailing list