Mercurial > hg
comparison hgext/fix.py @ 44560:40f4a75938ba
fix: disallow `hg fix --all --working-dir`
`--all` implies `--working-dir`, so it's probably a mistake if the
user uses both.
Differential Revision: https://phab.mercurial-scm.org/D8284
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 13 Dec 2019 15:14:57 -0800 |
parents | c791ed6a2154 |
children | 368f85c5dfc0 |
comparison
equal
deleted
inserted
replaced
44558:ea40fea992e0 | 44560:40f4a75938ba |
---|---|
248 revisions are not forgotten in later ones. The --base flag can be used to | 248 revisions are not forgotten in later ones. The --base flag can be used to |
249 override this default behavior, though it is not usually desirable to do so. | 249 override this default behavior, though it is not usually desirable to do so. |
250 """ | 250 """ |
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 if opts[b'all']: | 254 if opts[b'all']: |
254 opts[b'rev'] = [b'not public() and not obsolete()'] | 255 opts[b'rev'] = [b'not public() and not obsolete()'] |
255 opts[b'working_dir'] = True | 256 opts[b'working_dir'] = True |
256 with repo.wlock(), repo.lock(), repo.transaction(b'fix'): | 257 with repo.wlock(), repo.lock(), repo.transaction(b'fix'): |
257 revstofix = getrevstofix(ui, repo, opts) | 258 revstofix = getrevstofix(ui, repo, opts) |