Patchwork D6370: templatekw: move showfileadds() close to showfile{mods, dels}()

login
register
mail settings
Submitter phabricator
Date May 11, 2019, 7:18 a.m.
Message ID <differential-rev-PHID-DREV-dqvakozibpvjl6ozhgqt-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40010/
State Superseded
Headers show

Comments

phabricator - May 11, 2019, 7:18 a.m.
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




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

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}
 
-@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)
 
+@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."""