##// END OF EJS Templates
fix: remove support for :fileset sub-config in favor of :pattern...
Danny Hooper -
r42880:9ed63cd0 default
parent child Browse files
Show More
@@ -152,7 +152,6 b' configitem = registrar.configitem(config'
152 FIXER_ATTRS = {
152 FIXER_ATTRS = {
153 'command': None,
153 'command': None,
154 'linerange': None,
154 'linerange': None,
155 'fileset': None,
156 'pattern': None,
155 'pattern': None,
157 'priority': 0,
156 'priority': 0,
158 'metadata': False,
157 'metadata': False,
@@ -702,10 +701,6 b' def getfixers(ui):'
702 for name in fixernames(ui):
701 for name in fixernames(ui):
703 fixers[name] = Fixer()
702 fixers[name] = Fixer()
704 attrs = ui.configsuboptions('fix', name)[1]
703 attrs = ui.configsuboptions('fix', name)[1]
705 if 'fileset' in attrs and 'pattern' not in attrs:
706 ui.warn(_('the fix.tool:fileset config name is deprecated; '
707 'please rename it to fix.tool:pattern\n'))
708 attrs['pattern'] = attrs['fileset']
709 for key, default in FIXER_ATTRS.items():
704 for key, default in FIXER_ATTRS.items():
710 setattr(fixers[name], pycompat.sysstr('_' + key),
705 setattr(fixers[name], pycompat.sysstr('_' + key),
711 attrs.get(key, default))
706 attrs.get(key, default))
@@ -1161,28 +1161,6 b' until we specify the base, but then we d'
1161
1161
1162 $ cd ..
1162 $ cd ..
1163
1163
1164 The :fileset subconfig was a misnomer, so we renamed it to :pattern. We will
1165 still accept :fileset by itself as if it were :pattern, but this will issue a
1166 warning.
1167
1168 $ hg init filesetispattern
1169 $ cd filesetispattern
1170
1171 $ printf "foo\n" > foo.whole
1172 $ printf "first\nsecond\n" > bar.txt
1173 $ hg add -q
1174 $ hg fix -w --config fix.sometool:fileset=bar.txt \
1175 > --config fix.sometool:command="sort -r"
1176 the fix.tool:fileset config name is deprecated; please rename it to fix.tool:pattern
1177
1178 $ cat foo.whole
1179 FOO
1180 $ cat bar.txt
1181 second
1182 first
1183
1184 $ cd ..
1185
1186 The execution order of tools can be controlled. This example doesn't work if
1164 The execution order of tools can be controlled. This example doesn't work if
1187 you sort after truncating, but the config defines the correct order while the
1165 you sort after truncating, but the config defines the correct order while the
1188 definitions are out of order (which might imply the incorrect order given the
1166 definitions are out of order (which might imply the incorrect order given the
General Comments 0
You need to be logged in to leave comments. Login now