diff hgext/keyword.py @ 39369: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 67dc32d4e790
children 5bf99c27a7b6
line wrap: on
line diff
--- a/hgext/keyword.py	Sun Aug 05 16:27:09 2018 +0900
+++ b/hgext/keyword.py	Sun Aug 05 16:44:16 2018 +0900
@@ -576,8 +576,8 @@
         label = 'kwfiles.' + kwstate
         for f in filenames:
             fm.startitem()
-            fm.write('kwstatus path', fmt, char,
-                     repo.pathto(f, cwd), label=label)
+            fm.data(kwstatus=char, path=f)
+            fm.plain(fmt % (char, repo.pathto(f, cwd)), label=label)
     fm.end()
 
 @command('kwshrink',