##// END OF EJS Templates
fix: move handling of --all into getrevstofix() for consistency...
Martin von Zweigbergk -
r45063:9f5e94bb default
parent child Browse files
Show More
@@ -251,9 +251,7 b' def fix(ui, repo, *pats, **opts):'
251 251 opts = pycompat.byteskwargs(opts)
252 252 cmdutil.check_at_most_one_arg(opts, b'all', b'rev')
253 253 cmdutil.check_incompatible_arguments(opts, b'working_dir', [b'all'])
254 if opts[b'all']:
255 opts[b'rev'] = [b'not public() and not obsolete()']
256 opts[b'working_dir'] = True
254
257 255 with repo.wlock(), repo.lock(), repo.transaction(b'fix'):
258 256 revstofix = getrevstofix(ui, repo, opts)
259 257 basectxs = getbasectxs(repo, opts, revstofix)
@@ -399,9 +397,12 b' def getworkqueue(ui, repo, pats, opts, r'
399 397
400 398 def getrevstofix(ui, repo, opts):
401 399 """Returns the set of revision numbers that should be fixed"""
402 revs = set(scmutil.revrange(repo, opts[b'rev']))
403 if opts.get(b'working_dir'):
404 revs.add(wdirrev)
400 if opts[b'all']:
401 revs = repo.revs(b'(not public() and not obsolete()) or wdir()')
402 else:
403 revs = set(scmutil.revrange(repo, opts[b'rev']))
404 if opts.get(b'working_dir'):
405 revs.add(wdirrev)
405 406 for rev in revs:
406 407 checkfixablectx(ui, repo, repo[rev])
407 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