D6693: fix: ignore fixer tool configurations that are missing patterns

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Jul 25 12:01:48 EDT 2019


martinvonz added inline comments.

INLINE COMMENTS

> fix.py:738-739
>          """Should this fixer run on the file at the given path and context?"""
> -        return scmutil.match(fixctx, [self._pattern], opts)(path)
> +        return (self._pattern is not None and
> +                scmutil.match(fixctx, [self._pattern], opts)(path))
>  

Is this change needed given the change above?

> test-fix.t:1280
> +  $ hg add -q
> +  $ hg fix --debug --working-dir --config "fix.nopattern:command=echo fixed"
> +  fixer tool has no pattern configuration: nopattern

nit: The `--debug` seems unnecessary, unless we want to make sure that we *don't* get any output.

REPOSITORY
  rHG Mercurial

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

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

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


More information about the Mercurial-devel mailing list