topic: update the changectx method to respect phases
The topic is no longer returned once the changeset is no longer mutable (unless
explicitly requested).
--- a/hgext3rd/topic/__init__.py Fri Jun 23 10:21:37 2017 +0200
+++ b/hgext3rd/topic/__init__.py Thu Jun 22 09:48:40 2017 +0200
@@ -115,7 +115,9 @@
testedwith = '4.0.2 4.1.3 4.2'
-def _contexttopic(self):
+def _contexttopic(self, force=False):
+ if not (force or self.mutable()):
+ return ''
return self.extra().get(constants.extrakey, '')
context.basectx.topic = _contexttopic