Show More
@@ -5225,7 +5225,7 b' def rename(ui, repo, *pats, **opts):' | |||
|
5225 | 5225 | ('m', 'mark', None, _('mark files as resolved')), |
|
5226 | 5226 | ('u', 'unmark', None, _('mark files as unresolved')), |
|
5227 | 5227 | ('n', 'no-status', None, _('hide status prefix'))] |
|
5228 | + mergetoolopts + walkopts, | |
|
5228 | + mergetoolopts + walkopts + formatteropts, | |
|
5229 | 5229 | _('[OPTION]... [FILE]...'), |
|
5230 | 5230 | inferrepo=True) |
|
5231 | 5231 | def resolve(ui, repo, *pats, **opts): |
@@ -5278,17 +5278,17 b' def resolve(ui, repo, *pats, **opts):' | |||
|
5278 | 5278 | hint=('use --all to remerge all files')) |
|
5279 | 5279 | |
|
5280 | 5280 | if show: |
|
5281 | fm = ui.formatter('resolve', opts) | |
|
5281 | 5282 | ms = mergemod.mergestate(repo) |
|
5282 | 5283 | m = scmutil.match(repo[None], pats, opts) |
|
5283 | 5284 | for f in ms: |
|
5284 | 5285 | if not m(f): |
|
5285 | 5286 | continue |
|
5286 | if nostatus: | |
|
5287 |
|
|
|
5288 | else: | |
|
5289 | ui.write("%s %s\n" % (ms[f].upper(), f), | |
|
5290 | label='resolve.' + | |
|
5291 | {'u': 'unresolved', 'r': 'resolved'}[ms[f]]) | |
|
5287 | l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved'}[ms[f]] | |
|
5288 | fm.startitem() | |
|
5289 | fm.condwrite(not nostatus, 'status', '%s ', ms[f].upper(), label=l) | |
|
5290 | fm.write('path', '%s\n', f, label=l) | |
|
5291 | fm.end() | |
|
5292 | 5292 | return 0 |
|
5293 | 5293 | |
|
5294 | 5294 | wlock = repo.wlock() |
@@ -278,7 +278,7 b' Show all commands + options' | |||
|
278 | 278 | phase: public, draft, secret, force, rev |
|
279 | 279 | recover: |
|
280 | 280 | rename: after, force, include, exclude, dry-run |
|
281 | resolve: all, list, mark, unmark, no-status, tool, include, exclude | |
|
281 | resolve: all, list, mark, unmark, no-status, tool, include, exclude, template | |
|
282 | 282 | revert: all, date, rev, no-backup, include, exclude, dry-run |
|
283 | 283 | rollback: dry-run, force |
|
284 | 284 | root: |
@@ -43,6 +43,10 b' resolve -l should contain unresolved ent' | |||
|
43 | 43 | U file1 |
|
44 | 44 | U file2 |
|
45 | 45 | |
|
46 | $ hg resolve -l --no-status | |
|
47 | file1 | |
|
48 | file2 | |
|
49 | ||
|
46 | 50 | resolving an unknown path should emit a warning, but not for -l |
|
47 | 51 | |
|
48 | 52 | $ hg resolve -m does-not-exist |
@@ -60,6 +64,18 b' resolve -l should show resolved file as ' | |||
|
60 | 64 | R file1 |
|
61 | 65 | U file2 |
|
62 | 66 | |
|
67 | $ hg resolve -l -Tjson | |
|
68 | [ | |
|
69 | { | |
|
70 | "path": "file1", | |
|
71 | "status": "R" | |
|
72 | }, | |
|
73 | { | |
|
74 | "path": "file2", | |
|
75 | "status": "U" | |
|
76 | } | |
|
77 | ] | |
|
78 | ||
|
63 | 79 | resolve -m without paths should mark all resolved |
|
64 | 80 | |
|
65 | 81 | $ hg resolve -m |
@@ -70,6 +86,10 b' resolve -l should be empty after commit' | |||
|
70 | 86 | |
|
71 | 87 | $ hg resolve -l |
|
72 | 88 | |
|
89 | $ hg resolve -l -Tjson | |
|
90 | [ | |
|
91 | ] | |
|
92 | ||
|
73 | 93 | resolve --all should abort when no merge in progress |
|
74 | 94 | |
|
75 | 95 | $ hg resolve --all |
@@ -338,8 +338,8 b" test 'resolve -l'" | |||
|
338 | 338 | hg resolve with one unresolved, one resolved: |
|
339 | 339 | |
|
340 | 340 | $ hg resolve --color=always -l |
|
341 | \x1b[0;31;1mU a\x1b[0m (esc) | |
|
342 | \x1b[0;32;1mR b\x1b[0m (esc) | |
|
341 | \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc) | |
|
342 | \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc) | |
|
343 | 343 | |
|
344 | 344 | color coding of error message with current availability of curses |
|
345 | 345 |
General Comments 0
You need to be logged in to leave comments.
Login now