diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -501,9 +501,11 @@ class localrepository(repo.repository): for pat, cmd in self.ui.configitems(filter): mf = util.matcher(self.root, "", [pat], [], [])[1] fn = None + params = cmd for name, filterfn in self._datafilters.iteritems(): if cmd.startswith(name): fn = filterfn + params = cmd[len(name):].lstrip() break if not fn: fn = lambda s, c, **kwargs: util.filter(s, c) @@ -511,7 +513,7 @@ class localrepository(repo.repository): if not inspect.getargspec(fn)[2]: oldfn = fn fn = lambda s, c, **kwargs: oldfn(s, c) - l.append((mf, fn, cmd)) + l.append((mf, fn, params)) self.filterpats[filter] = l for mf, fn, cmd in self.filterpats[filter]: diff --git a/tests/test-custom-filters b/tests/test-custom-filters new file mode 100755 --- /dev/null +++ b/tests/test-custom-filters @@ -0,0 +1,60 @@ +#!/bin/sh + +hg init + +cat > .hg/hgrc < prefix.py < .hgignore < stuff.txt <> stuff.txt < morestuff.txt <