changeset 6875:6209891ff220

topic: add `short` keyword argument to callers of common.formatfqbn() The default value (True) is the same as in common.formatfqbn().
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 19 Sep 2024 16:48:48 +0400
parents 4dbbd7b4682b
children 2edffcd94850
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Thu Sep 19 16:31:29 2024 +0400
+++ b/hgext3rd/topic/__init__.py	Thu Sep 19 16:48:48 2024 +0400
@@ -380,12 +380,12 @@
         return None
 context.basectx.topicidx = _contexttopicidx
 
-def _contextfqbn(self):
+def _contextfqbn(self, short=True):
     """return branch//namespace/topic of the changeset, also known as fully
     qualified branch name
     """
     branch = encoding.tolocal(self.extra()[b'branch'])
-    return common.formatfqbn(branch, self.topic_namespace(), self.topic())
+    return common.formatfqbn(branch, self.topic_namespace(), self.topic(), short=short)
 
 context.basectx.fqbn = _contextfqbn
 
@@ -974,11 +974,11 @@
             if ce:
                 ce.refresh()
 
-        def fqbn(self):
+        def fqbn(self, short=True):
             branch = encoding.tolocal(self._branch)
             tns = encoding.tolocal(self._tns)
             topic = encoding.tolocal(self._topic)
-            return common.formatfqbn(branch, tns, topic)
+            return common.formatfqbn(branch, tns, topic, short=short)
 
     dirstate.dirstate = topicdirstate