refactoring: rename obsfate template to obsfate_quiet
authorBoris Feld <boris.feld@octobus.net>
Mon, 29 May 2017 11:03:13 +0200
changeset 2494 17bc96b54255
parent 2493 3ee8e9a12f41
child 2495 0db53f48db2d
refactoring: rename obsfate template to obsfate_quiet As I don't know how to handle templates arguments, create different templates for each verbosity level wanted.
hgext3rd/evolve/templatekw.py
tests/test-evolve-templates.t
--- a/hgext3rd/evolve/templatekw.py	Mon May 29 16:39:32 2017 +0200
+++ b/hgext3rd/evolve/templatekw.py	Mon May 29 11:03:13 2017 +0200
@@ -97,8 +97,8 @@
 
     return ', '.join(final)
 
-@eh.templatekw("obsfate")
-def showobsfate(repo, ctx, templ, **args):
+@eh.templatekw("obsfate_quiet")
+def showobsfate_quiet(repo, ctx, templ, **args):
     if not ctx.obsolete():
         return ''
 
--- a/tests/test-evolve-templates.t	Mon May 29 16:39:32 2017 +0200
+++ b/tests/test-evolve-templates.t	Mon May 29 11:03:13 2017 +0200
@@ -12,7 +12,7 @@
   > [extensions]
   > evolve =
   > [alias]
-  > tlog = log -G -T '{node|short} Precursors: {precursors} | Successors: {successors} | Fate: {obsfate}\n'
+  > tlog = log -G -T '{node|short} Precursors: {precursors} | Successors: {successors} | Fate: {obsfate_quiet}\n'
   > EOF
 
 Test templates on amended commit