Patchwork D8284: fix: disallow `hg fix --all --working-dir`

login
register
mail settings
Submitter phabricator
Date March 17, 2020, 3:04 a.m.
Message ID <31ce01f1e6adf4be050771bb445ebdd7@localhost.localdomain>
Download mbox | patch
Permalink /patch/45800/
State Not Applicable
Headers show

Comments

phabricator - March 17, 2020, 3:04 a.m.
Closed by commit rHG40f4a75938ba: fix: disallow `hg fix --all --working-dir` (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8284?vs=20771&id=20803

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8284/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8284

AFFECTED FILES
  hgext/fix.py
  tests/test-fix-topology.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers, mharbison72
Cc: marmoute, mercurial-devel

Patch

diff --git a/tests/test-fix-topology.t b/tests/test-fix-topology.t
--- a/tests/test-fix-topology.t
+++ b/tests/test-fix-topology.t
@@ -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
diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -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