Mercurial > hg-stable
diff hgext/fix.py @ 43220:d3d1a3afe7aa
fix: warn when a fixer doesn't have a configured command
It seems we currently produce an empty command line and then decide to
not run it, but it seems better to skip that part too.
Differential Revision: https://phab.mercurial-scm.org/D7085
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 26 Jul 2019 08:43:57 -0700 |
parents | 0101db49606f |
children | 0e2a2fab4b2e |
line wrap: on
line diff
--- a/hgext/fix.py Sat Oct 12 11:00:20 2019 -0700 +++ b/hgext/fix.py Fri Jul 26 08:43:57 2019 -0700 @@ -800,7 +800,11 @@ # dangerous to let it affect all files. It would be pointless to let it # affect no files. There is no reasonable subset of files to use as the # default. - if pattern is None: + if command is None: + ui.warn( + _(b'fixer tool has no command configuration: %s\n') % (name,) + ) + elif pattern is None: ui.warn( _(b'fixer tool has no pattern configuration: %s\n') % (name,) )