Patchwork D6691: fix: remove support for :fileset sub-config in favor of :pattern

login
register
mail settings
Submitter phabricator
Date July 26, 2019, 4:05 p.m.
Message ID <bf6512024c394d3cce9269daa0abd695@localhost.localdomain>
Download mbox | patch
Permalink /patch/41082/
State Not Applicable
Headers show

Comments

phabricator - July 26, 2019, 4:05 p.m.
Closed by commit rHG9ed63cd0026c: fix: remove support for :fileset sub-config in favor of :pattern (authored by hooper).
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/D6691?vs=16060&id=16079

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

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

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

CHANGE DETAILS




To: hooper, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -1161,28 +1161,6 @@ 
 
   $ cd ..
 
-The :fileset subconfig was a misnomer, so we renamed it to :pattern. We will
-still accept :fileset by itself as if it were :pattern, but this will issue a
-warning.
-
-  $ hg init filesetispattern
-  $ cd filesetispattern
-
-  $ printf "foo\n" > foo.whole
-  $ printf "first\nsecond\n" > bar.txt
-  $ hg add -q
-  $ hg fix -w --config fix.sometool:fileset=bar.txt \
-  >           --config fix.sometool:command="sort -r"
-  the fix.tool:fileset config name is deprecated; please rename it to fix.tool:pattern
-
-  $ cat foo.whole
-  FOO
-  $ cat bar.txt
-  second
-  first
-
-  $ cd ..
-
 The execution order of tools can be controlled. This example doesn't work if
 you sort after truncating, but the config defines the correct order while the
 definitions are out of order (which might imply the incorrect order given the
diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -152,7 +152,6 @@ 
 FIXER_ATTRS = {
     'command': None,
     'linerange': None,
-    'fileset': None,
     'pattern': None,
     'priority': 0,
     'metadata': False,
@@ -702,10 +701,6 @@ 
     for name in fixernames(ui):
         fixers[name] = Fixer()
         attrs = ui.configsuboptions('fix', name)[1]
-        if 'fileset' in attrs and 'pattern' not in attrs:
-            ui.warn(_('the fix.tool:fileset config name is deprecated; '
-                      'please rename it to fix.tool:pattern\n'))
-            attrs['pattern'] = attrs['fileset']
         for key, default in FIXER_ATTRS.items():
             setattr(fixers[name], pycompat.sysstr('_' + key),
                     attrs.get(key, default))