resolve: commit the changes after each item resolve (issue3638)
authorSergey Kishchenko <voidwrk@gmail.com>
Tue, 25 Sep 2012 20:50:40 +0300
changeset 17668 28c43957f8b4
parent 17667 2b6a795f19f7
child 17669 405b5f8fdad7
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
mercurial/commands.py
--- a/mercurial/commands.py	Sat Sep 22 14:53:50 2012 +0900
+++ b/mercurial/commands.py	Tue Sep 25 20:50:40 2012 +0300
@@ -4963,6 +4963,7 @@
                         ret = 1
                 finally:
                     ui.setconfig('ui', 'forcemerge', '')
+                    ms.commit()
 
                 # replace filemerge's .orig file with our resolve file
                 util.rename(a + ".resolve", a + ".orig")