changeset 6242:a433fe0cea21

topic: add ctx.fqbn() method It will be tested in the next commit via {fqbn} template keyword.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 24 May 2022 19:30:27 +0400
parents 85abf58c3d8c
children 91d9a279b84a
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Wed May 04 15:55:34 2022 +0400
+++ b/hgext3rd/topic/__init__.py	Tue May 24 19:30:27 2022 +0400
@@ -341,6 +341,14 @@
         return None
 context.basectx.topicidx = _contexttopicidx
 
+def _contextfqbn(self):
+    """return branch//namespace/topic of the changeset, also known as fully
+    qualified branch name
+    """
+    return common.formatfqbn(self.branch(), self.topic_namespace(), self.topic())
+
+context.basectx.fqbn = _contextfqbn
+
 stackrev = re.compile(br'^s\d+$')
 topicrev = re.compile(br'^t\d+$')