Show More
@@ -251,9 +251,7 b' def fix(ui, repo, *pats, **opts):' | |||||
251 | opts = pycompat.byteskwargs(opts) |
|
251 | opts = pycompat.byteskwargs(opts) | |
252 | cmdutil.check_at_most_one_arg(opts, b'all', b'rev') |
|
252 | cmdutil.check_at_most_one_arg(opts, b'all', b'rev') | |
253 | cmdutil.check_incompatible_arguments(opts, b'working_dir', [b'all']) |
|
253 | cmdutil.check_incompatible_arguments(opts, b'working_dir', [b'all']) | |
254 | if opts[b'all']: |
|
254 | ||
255 | opts[b'rev'] = [b'not public() and not obsolete()'] |
|
|||
256 | opts[b'working_dir'] = True |
|
|||
257 | with repo.wlock(), repo.lock(), repo.transaction(b'fix'): |
|
255 | with repo.wlock(), repo.lock(), repo.transaction(b'fix'): | |
258 | revstofix = getrevstofix(ui, repo, opts) |
|
256 | revstofix = getrevstofix(ui, repo, opts) | |
259 | basectxs = getbasectxs(repo, opts, revstofix) |
|
257 | basectxs = getbasectxs(repo, opts, revstofix) | |
@@ -399,9 +397,12 b' def getworkqueue(ui, repo, pats, opts, r' | |||||
399 |
|
397 | |||
400 | def getrevstofix(ui, repo, opts): |
|
398 | def getrevstofix(ui, repo, opts): | |
401 | """Returns the set of revision numbers that should be fixed""" |
|
399 | """Returns the set of revision numbers that should be fixed""" | |
402 | revs = set(scmutil.revrange(repo, opts[b'rev'])) |
|
400 | if opts[b'all']: | |
403 | if opts.get(b'working_dir'): |
|
401 | revs = repo.revs(b'(not public() and not obsolete()) or wdir()') | |
404 | revs.add(wdirrev) |
|
402 | else: | |
|
403 | revs = set(scmutil.revrange(repo, opts[b'rev'])) | |||
|
404 | if opts.get(b'working_dir'): | |||
|
405 | revs.add(wdirrev) | |||
405 | for rev in revs: |
|
406 | for rev in revs: | |
406 | checkfixablectx(ui, repo, repo[rev]) |
|
407 | checkfixablectx(ui, repo, repo[rev]) | |
407 | # Allow fixing only wdir() even if there's an unfinished operation |
|
408 | # Allow fixing only wdir() even if there's an unfinished operation |
General Comments 0
You need to be logged in to leave comments.
Login now