Show More
@@ -400,15 +400,16 b' def getworkqueue(ui, repo, pats, opts, r' | |||||
400 | def getrevstofix(ui, repo, opts): |
|
400 | def getrevstofix(ui, repo, opts): | |
401 | """Returns the set of revision numbers that should be fixed""" |
|
401 | """Returns the set of revision numbers that should be fixed""" | |
402 | revs = set(scmutil.revrange(repo, opts[b'rev'])) |
|
402 | revs = set(scmutil.revrange(repo, opts[b'rev'])) | |
|
403 | if opts.get(b'working_dir'): | |||
|
404 | revs.add(wdirrev) | |||
403 | for rev in revs: |
|
405 | for rev in revs: | |
404 | checkfixablectx(ui, repo, repo[rev]) |
|
406 | checkfixablectx(ui, repo, repo[rev]) | |
405 | if revs: |
|
407 | # Allow fixing only wdir() even if there's an unfinished operation | |
|
408 | if not (len(revs) == 1 and wdirrev in revs): | |||
406 | cmdutil.checkunfinished(repo) |
|
409 | cmdutil.checkunfinished(repo) | |
407 | rewriteutil.precheck(repo, revs, b'fix') |
|
410 | rewriteutil.precheck(repo, revs, b'fix') | |
408 | if opts.get(b'working_dir'): |
|
411 | if wdirrev in revs and list(merge.mergestate.read(repo).unresolved()): | |
409 | revs.add(wdirrev) |
|
412 | raise error.Abort(b'unresolved conflicts', hint=b"use 'hg resolve'") | |
410 | if list(merge.mergestate.read(repo).unresolved()): |
|
|||
411 | raise error.Abort(b'unresolved conflicts', hint=b"use 'hg resolve'") |
|
|||
412 | if not revs: |
|
413 | if not revs: | |
413 | raise error.Abort( |
|
414 | raise error.Abort( | |
414 | b'no changesets specified', hint=b'use --rev or --working-dir' |
|
415 | b'no changesets specified', hint=b'use --rev or --working-dir' |
General Comments 0
You need to be logged in to leave comments.
Login now