changeset 4087:7b129ce23fad

branching: merge back with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 Sep 2018 23:30:28 +0200
parents 73f22dc3bbbe (current diff) 8a357f05187d (diff)
children 6f391c2a773b
files hgext3rd/evolve/metadata.py hgext3rd/topic/__init__.py
diffstat 5 files changed, 25 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Sep 03 23:21:39 2018 +0200
+++ b/.hgtags	Mon Sep 03 23:30:28 2018 +0200
@@ -70,3 +70,4 @@
 2c5d79c6459c6fabe0eb8723fc5041ac0dac7a9a 8.1.0
 e7abf863e1130e14cd4d65e53467a199d267b4fd 8.1.1
 f1cde4c97806fc6d6cc4c1e09ea2f4081a3ebaec 8.1.2
+8d8f08245f9715adf48d6f0f59772b04fd7de1f7 8.2.0
--- a/CHANGELOG	Mon Sep 03 23:21:39 2018 +0200
+++ b/CHANGELOG	Mon Sep 03 23:30:28 2018 +0200
@@ -1,7 +1,7 @@
 Changelog
 =========
 
-8.1.2 - in progress
+8.1.2 -- 2018-09-03
 -------------------
 
   * prune: rename `--biject` flag to `--pair` (old flag is kept as an alias)
--- a/debian/changelog	Mon Sep 03 23:21:39 2018 +0200
+++ b/debian/changelog	Mon Sep 03 23:30:28 2018 +0200
@@ -1,3 +1,9 @@
+mercurial-evolve (8.2.0-1) UNRELEASED; urgency=medium
+
+  * New upstrean release
+
+ -- Pierre-Yves David <pierre-yves.david@ens-lyon.org>  Mon, 03 Sep 2018 23:16:46 +0200
+
 mercurial-evolve (8.1.2-1) unstable; urgency=medium
 
   * new upstream release
--- a/hgext3rd/evolve/metadata.py	Mon Sep 03 23:21:39 2018 +0200
+++ b/hgext3rd/evolve/metadata.py	Mon Sep 03 23:30:28 2018 +0200
@@ -5,7 +5,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-__version__ = '8.2.0.dev'
+__version__ = '8.3.0.dev'
 testedwith = '4.3.2 4.4.2 4.5.2 4.6.2 4.7'
 minimumhgversion = '4.3'
 buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/topic/__init__.py	Mon Sep 03 23:21:39 2018 +0200
+++ b/hgext3rd/topic/__init__.py	Mon Sep 03 23:30:28 2018 +0200
@@ -134,6 +134,7 @@
     registrar,
     scmutil,
     templatefilters,
+    templatekw,
     util,
 )
 
@@ -177,7 +178,7 @@
               'topic.active': 'green',
              }
 
-__version__ = '0.11.0.dev'
+__version__ = '0.12.0.dev'
 
 testedwith = '4.3.3 4.4.2 4.5.2 4.6.2 4.7'
 minimumhgversion = '4.3'
@@ -227,7 +228,9 @@
                       default=None,
             )
 
+# we need to do old style declaration for <= 4.5
 templatekeyword = registrar.templatekeyword()
+post45template = 'requires=' in templatekeyword.__doc__
 
 def _contexttopic(self, force=False):
     if not (force or self.mutable()):
@@ -350,6 +353,8 @@
 
     cmdutil.summaryhooks.add('topic', summaryhook)
 
+    if not post45template:
+        templatekw.keywords['topic'] = topickw
     # Wrap workingctx extra to return the topic name
     extensions.wrapfunction(context.workingctx, '__init__', wrapinit)
     # Wrap changelog.add to drop empty topic
@@ -521,11 +526,16 @@
             'topics', 'topic', namemap=_namemap, nodemap=_nodemap,
             listnames=lambda repo: repo.topics))
 
-@templatekeyword('topic', requires={'ctx'})
-def topickw(context, mapping):
-    """:topic: String. The topic of the changeset"""
-    ctx = context.resource(mapping, 'ctx')
-    return ctx.topic()
+if post45template:
+    @templatekeyword('topic', requires={'ctx'})
+    def topickw(context, mapping):
+        """:topic: String. The topic of the changeset"""
+        ctx = context.resource(mapping, 'ctx')
+        return ctx.topic()
+else:
+    def topickw(**args):
+        """:topic: String. The topic of the changeset"""
+        return args['ctx'].topic()
 
 def wrapinit(orig, self, repo, *args, **kwargs):
     orig(self, repo, *args, **kwargs)