diff --git a/hgext/fix.py b/hgext/fix.py --- a/hgext/fix.py +++ b/hgext/fix.py @@ -140,6 +140,7 @@ context, copies, error, + match as matchmod, mdiff, merge, obsolete, @@ -843,7 +844,11 @@ def affects(self, opts, fixctx, path): """Should this fixer run on the file at the given path and context?""" - return scmutil.match(fixctx, [self._pattern], opts)(path) + repo = fixctx.repo() + matcher = matchmod.match( + repo.root, repo.root, [self._pattern], ctx=fixctx + ) + return matcher(path) def shouldoutputmetadata(self): """Should the stdout of this fixer start with JSON and a null byte?""" diff --git a/tests/test-fix.t b/tests/test-fix.t --- a/tests/test-fix.t +++ b/tests/test-fix.t @@ -1321,7 +1321,7 @@ $ echo modified > bar $ hg fix -w bar $ cat bar - modified + $TESTTMP/subprocesscwd $ cd ../..