Bug 3638 - resolve command doesn't save progress when interrupted
Summary: resolve command doesn't save progress when interrupted
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: earlier
Hardware: PC Mac OS
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 13:42 UTC by Sergey Kishchenko
Modified: 2017-11-01 18:05 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Kishchenko 2012-09-25 13:42 UTC
Initial state:

$ hg resolve -l                                                                                                                           U t1.txt
U t2.txt

Steps to reproduce:

1. Start the resolve
$ hg resolve -a

2. Resolve a first file conflict (e.g., with an external merge tool like kdiff3)
3. Interrupt the tool on resolving the second file

Expected result:
$ hg resolve -l                                                                                                                           R t1.txt
U t2.txt

Actual result:

$ hg resolve -l                                                                                                                           U t1.txt
U t2.txt

I'll provide a patch to the mailing list that fixes the problem
Comment 1 HG Bot 2012-09-27 18:11 UTC
Fixed by http://selenic.com/repo/hg/rev/28c43957f8b4
Sergey Kishchenko <voidwrk@gmail.com>
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

(please test the fix)