Show More
@@ -2340,19 +2340,26 b' def resolve(ui, repo, *pats, **opts):' | |||
|
2340 | 2340 | R = resolved |
|
2341 | 2341 | """ |
|
2342 | 2342 | |
|
2343 | if len([x for x in opts if opts[x]]) > 1: | |
|
2343 | all, mark, unmark, show = [opts.get(o) for o in 'all mark unmark list'.split()] | |
|
2344 | ||
|
2345 | if (show and (mark or unmark)) or (mark and unmark): | |
|
2344 | 2346 | raise util.Abort(_("too many options specified")) |
|
2347 | if pats and all: | |
|
2348 | raise util.Abort(_("can't specify --all and patterns")) | |
|
2349 | if not (all or pats or show or mark or unmark): | |
|
2350 | raise util.Abort(_('no files or directories specified; ' | |
|
2351 | 'use --all to remerge all files')) | |
|
2345 | 2352 | |
|
2346 | 2353 | ms = merge_.mergestate(repo) |
|
2347 | 2354 | m = cmdutil.match(repo, pats, opts) |
|
2348 | 2355 | |
|
2349 | 2356 | for f in ms: |
|
2350 | 2357 | if m(f): |
|
2351 |
if |
|
|
2358 | if show: | |
|
2352 | 2359 | ui.write("%s %s\n" % (ms[f].upper(), f)) |
|
2353 |
elif |
|
|
2360 | elif mark: | |
|
2354 | 2361 | ms.mark(f, "r") |
|
2355 |
elif |
|
|
2362 | elif unmark: | |
|
2356 | 2363 | ms.mark(f, "u") |
|
2357 | 2364 | else: |
|
2358 | 2365 | wctx = repo[None] |
@@ -3312,7 +3319,8 b' table = {' | |||
|
3312 | 3319 | _('[OPTION]... SOURCE... DEST')), |
|
3313 | 3320 | "resolve": |
|
3314 | 3321 | (resolve, |
|
3315 |
[(' |
|
|
3322 | [('a', 'all', None, _('remerge all unresolved files')), | |
|
3323 | ('l', 'list', None, _('list state of files needing merge')), | |
|
3316 | 3324 | ('m', 'mark', None, _('mark files as resolved')), |
|
3317 | 3325 | ('u', 'unmark', None, _('unmark files as resolved'))], |
|
3318 | 3326 | _('[OPTION]... [FILE]...')), |
@@ -322,7 +322,7 b' hg merge' | |||
|
322 | 322 | echo % keyword stays outside conflict zone |
|
323 | 323 | cat m |
|
324 | 324 | echo % resolve to local |
|
325 | HGMERGE=internal:local hg resolve | |
|
325 | HGMERGE=internal:local hg resolve -a | |
|
326 | 326 | hg commit -m localresolve |
|
327 | 327 | cat m |
|
328 | 328 |
General Comments 0
You need to be logged in to leave comments.
Login now