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
--- a/hgext/fix.py Thu Mar 12 16:25:22 2020 -0700
+++ b/hgext/fix.py Fri Dec 13 15:14:57 2019 -0800
@@ -250,6 +250,7 @@
"""
opts = pycompat.byteskwargs(opts)
cmdutil.check_at_most_one_arg(opts, b'all', b'rev')
+ cmdutil.check_incompatible_arguments(opts, b'working_dir', [b'all'])
if opts[b'all']:
opts[b'rev'] = [b'not public() and not obsolete()']
opts[b'working_dir'] = True
--- a/tests/test-fix-topology.t Thu Mar 12 16:25:22 2020 -0700
+++ b/tests/test-fix-topology.t Fri Dec 13 15:14:57 2019 -0800
@@ -271,6 +271,9 @@
$ hg init fixall
$ cd fixall
+ $ hg fix --all --working-dir
+ abort: cannot specify both --working-dir and --all
+ [255]
#if obsstore-on
$ printf "one\n" > foo.whole