[PATCH] resolve: commit the changes after each item resolve (issue3638)

Sergey Kishchenko voidwrk at gmail.com
Tue Sep 25 17:26:34 CDT 2012

# HG changeset patch
# User Sergey Kishchenko <voidwrk at gmail.com>
# Date 1348595440 -10800
# Node ID 93c5e9e7aea74b6072cc9d3d408472e101bc26e1
# Parent  d42cc3c880b69d0ba769082dc28fd642568df7e1
resolve: commit the changes after each item resolve (issue3638)

At the moment the resolve command doesn't save progress during the resolve process. In example if you try to resolve 100 conflicting files and interrupt the process (e.g., you close the external merge tool) after resolving 50 files you'll end up with 100 unresolved conflicts. Saving the progress helps a lot with long going merges. It's easy to achieve same behavior with simple script that calls resolve command for each unresolved file but it makes sense to make such behavior a default

diff -r d42cc3c880b6 -r 93c5e9e7aea7 mercurial/commands.py
--- a/mercurial/commands.py	Mon Sep 24 15:54:45 2012 -0500
+++ b/mercurial/commands.py	Tue Sep 25 20:50:40 2012 +0300
@@ -4963,6 +4963,7 @@
                         ret = 1
                     ui.setconfig('ui', 'forcemerge', '')
+                    ms.commit()
                 # replace filemerge's .orig file with our resolve file
                 util.rename(a + ".resolve", a + ".orig")

More information about the Mercurial-devel mailing list