Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 39396:34ba47117164
formatter: rename {abspath}/{file} to {path}, and drop relative {path} (BC)
Note that {path} in status is either relative-to-cwd or repository-absolute
depending on the command argument and config knob, which can't be reproduced
by using the {path|relpath} filter. The default template is updated to always
use a relative path.
.. bc::
``{abspath}`` and ``{file}`` in generic templates are renamed to ``{path}``.
Any ``{path}`` is a repository-absolute path. Use ``{path|relpath}`` to
convert it to a filesystem path.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 05 Aug 2018 16:44:16 +0900 |
parents | 5b92a717bfc1 |
children | 90afd61ef8a2 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sun Aug 05 16:27:09 2018 +0900 +++ b/mercurial/cmdutil.py Sun Aug 05 16:44:16 2018 +0900 @@ -2176,8 +2176,8 @@ if needsfctx: fc = ctx[f] fm.write('size flags', '% 10d % 1s ', fc.size(), fc.flags()) - fm.data(abspath=f) - fm.write('path', fmt, m.rel(f)) + fm.data(path=f) + fm.plain(fmt % m.rel(f)) ret = 0 for subpath in sorted(ctx.substate): @@ -2323,7 +2323,7 @@ fm.startitem() fm.context(ctx=ctx) fm.write('data', '%s', data) - fm.data(abspath=path, path=matcher.rel(path)) + fm.data(path=path) def cat(ui, repo, ctx, matcher, basefm, fntemplate, prefix, **opts): err = 1