changeset 6268:63d6cc96557c

topic: get branch from extra data in ctx.fqbn() At some point ctx.branch() will be wrapped to return ctx.fqbn() and this patch lets us avoid infinite recursion.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 08 Jul 2022 17:49:48 +0400
parents 1eb543272657
children 16f6b18b9ec0
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Mon Jun 27 19:02:25 2022 +0400
+++ b/hgext3rd/topic/__init__.py	Fri Jul 08 17:49:48 2022 +0400
@@ -345,7 +345,8 @@
     """return branch//namespace/topic of the changeset, also known as fully
     qualified branch name
     """
-    return common.formatfqbn(self.branch(), self.topic_namespace(), self.topic())
+    branch = encoding.tolocal(self.extra()[b'branch'])
+    return common.formatfqbn(branch, self.topic_namespace(), self.topic())
 
 context.basectx.fqbn = _contextfqbn