Show More
@@ -4931,37 +4931,39 b' def resolve(ui, repo, *pats, **opts):' | |||||
4931 | ret = 0 |
|
4931 | ret = 0 | |
4932 |
|
4932 | |||
4933 | for f in ms: |
|
4933 | for f in ms: | |
4934 | if m(f): |
|
4934 | if not m(f): | |
4935 |
|
|
4935 | continue | |
4936 | if nostatus: |
|
4936 | ||
4937 | ui.write("%s\n" % f) |
|
4937 | if show: | |
4938 |
|
|
4938 | if nostatus: | |
4939 |
|
|
4939 | ui.write("%s\n" % f) | |
4940 | label='resolve.' + |
|
|||
4941 | {'u': 'unresolved', 'r': 'resolved'}[ms[f]]) |
|
|||
4942 | elif mark: |
|
|||
4943 | ms.mark(f, "r") |
|
|||
4944 | elif unmark: |
|
|||
4945 | ms.mark(f, "u") |
|
|||
4946 | else: |
|
4940 | else: | |
4947 | wctx = repo[None] |
|
4941 | ui.write("%s %s\n" % (ms[f].upper(), f), | |
4948 |
|
4942 | label='resolve.' + | ||
4949 | # backup pre-resolve (merge uses .orig for its own purposes) |
|
4943 | {'u': 'unresolved', 'r': 'resolved'}[ms[f]]) | |
4950 | a = repo.wjoin(f) |
|
4944 | elif mark: | |
4951 | util.copyfile(a, a + ".resolve") |
|
4945 | ms.mark(f, "r") | |
4952 |
|
4946 | elif unmark: | ||
4953 | try: |
|
4947 | ms.mark(f, "u") | |
4954 | # resolve file |
|
4948 | else: | |
4955 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), |
|
4949 | wctx = repo[None] | |
4956 | 'resolve') |
|
4950 | ||
4957 | if ms.resolve(f, wctx): |
|
4951 | # backup pre-resolve (merge uses .orig for its own purposes) | |
4958 | ret = 1 |
|
4952 | a = repo.wjoin(f) | |
4959 | finally: |
|
4953 | util.copyfile(a, a + ".resolve") | |
4960 | ui.setconfig('ui', 'forcemerge', '', 'resolve') |
|
4954 | ||
4961 | ms.commit() |
|
4955 | try: | |
4962 |
|
4956 | # resolve file | ||
4963 | # replace filemerge's .orig file with our resolve file |
|
4957 | ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), | |
4964 | util.rename(a + ".resolve", a + ".orig") |
|
4958 | 'resolve') | |
|
4959 | if ms.resolve(f, wctx): | |||
|
4960 | ret = 1 | |||
|
4961 | finally: | |||
|
4962 | ui.setconfig('ui', 'forcemerge', '', 'resolve') | |||
|
4963 | ms.commit() | |||
|
4964 | ||||
|
4965 | # replace filemerge's .orig file with our resolve file | |||
|
4966 | util.rename(a + ".resolve", a + ".orig") | |||
4965 |
|
4967 | |||
4966 | ms.commit() |
|
4968 | ms.commit() | |
4967 | return ret |
|
4969 | return ret |
General Comments 0
You need to be logged in to leave comments.
Login now