Show More
@@ -5568,6 +5568,7 b' def resolve(ui, repo, *pats, **opts):' | |||
|
5568 | 5568 | ret = 0 |
|
5569 | 5569 | didwork = False |
|
5570 | 5570 | |
|
5571 | tocomplete = [] | |
|
5571 | 5572 | for f in ms: |
|
5572 | 5573 | if not m(f): |
|
5573 | 5574 | continue |
@@ -5586,21 +5587,35 b' def resolve(ui, repo, *pats, **opts):' | |||
|
5586 | 5587 | util.copyfile(a, a + ".resolve") |
|
5587 | 5588 | |
|
5588 | 5589 | try: |
|
5589 | # resolve file | |
|
5590 | # preresolve file | |
|
5590 | 5591 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), |
|
5591 | 5592 | 'resolve') |
|
5592 | 5593 | complete, r = ms.preresolve(f, wctx) |
|
5593 | 5594 | if not complete: |
|
5594 |
|
|
|
5595 | if r: | |
|
5595 | tocomplete.append(f) | |
|
5596 | elif r: | |
|
5596 | 5597 | ret = 1 |
|
5597 | 5598 | finally: |
|
5598 | 5599 | ui.setconfig('ui', 'forcemerge', '', 'resolve') |
|
5599 | 5600 | ms.commit() |
|
5600 | 5601 | |
|
5601 | 5602 | # replace filemerge's .orig file with our resolve file |
|
5603 | # for files in tocomplete, ms.resolve will not overwrite | |
|
5604 | # .orig -- only preresolve does | |
|
5602 | 5605 | util.rename(a + ".resolve", a + ".orig") |
|
5603 | 5606 | |
|
5607 | for f in tocomplete: | |
|
5608 | try: | |
|
5609 | # resolve file | |
|
5610 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), | |
|
5611 | 'resolve') | |
|
5612 | r = ms.resolve(f, wctx) | |
|
5613 | if r: | |
|
5614 | ret = 1 | |
|
5615 | finally: | |
|
5616 | ui.setconfig('ui', 'forcemerge', '', 'resolve') | |
|
5617 | ms.commit() | |
|
5618 | ||
|
5604 | 5619 | ms.commit() |
|
5605 | 5620 | |
|
5606 | 5621 | if not didwork and pats: |
@@ -135,8 +135,8 b' resolve without arguments should suggest' | |||
|
135 | 135 | resolve --all should re-merge all unresolved files |
|
136 | 136 | $ hg resolve --all |
|
137 | 137 | merging file1 |
|
138 | merging file2 | |
|
138 | 139 | warning: conflicts while merging file1! (edit, then use 'hg resolve --mark') |
|
139 | merging file2 | |
|
140 | 140 | warning: conflicts while merging file2! (edit, then use 'hg resolve --mark') |
|
141 | 141 | [1] |
|
142 | 142 | $ cat file1.orig |
General Comments 0
You need to be logged in to leave comments.
Login now