D6370: templatekw: move showfileadds() close to showfile{mods, dels}()
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat May 11 07:18:45 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6370
AFFECTED FILES
mercurial/templatekw.py
CHANGE DETAILS
diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -290,13 +290,6 @@
statmap.update((f, char) for f in files)
return revcache['filestatusmap'] # {path: statchar}
- at templatekeyword('file_adds', requires={'ctx', 'revcache'})
-def showfileadds(context, mapping):
- """List of strings. Files added by this changeset."""
- ctx = context.resource(mapping, 'ctx')
- return templateutil.compatfileslist(context, mapping, 'file_add',
- ctx.added())
-
@templatekeyword('file_copies',
requires={'repo', 'ctx', 'cache', 'revcache'})
def showfilecopies(context, mapping):
@@ -331,6 +324,13 @@
return templateutil.compatfilecopiesdict(context, mapping, 'file_copy',
copies)
+ at templatekeyword('file_adds', requires={'ctx', 'revcache'})
+def showfileadds(context, mapping):
+ """List of strings. Files added by this changeset."""
+ ctx = context.resource(mapping, 'ctx')
+ return templateutil.compatfileslist(context, mapping, 'file_add',
+ ctx.added())
+
@templatekeyword('file_dels', requires={'ctx', 'revcache'})
def showfiledels(context, mapping):
"""List of strings. Files removed by this changeset."""
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list