Mercurial > public > mercurial-scm > hg-stable
diff hgext/highlight/__init__.py @ 44012:e685fac56693
match: resolve filesets against the passed `cwd`, not the current one
This allows filesets to be resolved relative to `repo.root`, the same as other
patterns are since f02d3c0eed18. The current example in contrib/ wasn't working
from the tests directory because of this.
Differential Revision: https://phab.mercurial-scm.org/D7570
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 06 Dec 2019 20:40:02 -0500 |
parents | 687b865b95ad |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/hgext/highlight/__init__.py Thu Dec 12 14:28:31 2019 -0800 +++ b/hgext/highlight/__init__.py Fri Dec 06 20:40:02 2019 -0500 @@ -52,7 +52,7 @@ filenameonly = web.configbool(b'web', b'highlightonlymatchfilename', False) ctx = fctx.changectx() - m = ctx.matchfileset(expr) + m = ctx.matchfileset(fctx.repo().root, expr) if m(fctx.path()): highlight.pygmentize( field, fctx, style, tmpl, guessfilenameonly=filenameonly