diff hgext3rd/topic/__init__.py @ 6745:71c4b6c2bcdc

topic: drop branchmap._entries compatibility for hg 4.9
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 11 Jan 2024 15:31:13 -0300
parents 3076dba01b86
children 6adcc5c7c1f1
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Thu Mar 14 15:12:18 2024 -0300
+++ b/hgext3rd/topic/__init__.py	Thu Jan 11 15:31:13 2024 -0300
@@ -751,14 +751,13 @@
                 return super(topicrepo, self).branchmap()
             bm = self.filtered(topicfilter).branchmap()
             if convertbm:
-                entries = compat.bcentries(bm)
-                for key in list(entries):
+                for key in list(bm._entries):
                     branch, tns, topic = common.parsefqbn(key)
                     if topic:
-                        value = entries.pop(key)
+                        value = bm._entries.pop(key)
                         # we lose namespace when converting to ":" format
                         key = b'%s:%s' % (branch, topic)
-                        entries[key] = value
+                        bm._entries[key] = value
             return bm
 
         def branchmaptns(self, topic=None):
@@ -815,7 +814,7 @@
                         else:
                             # only changesets in the selected topic namespaces are visible
                             h = []
-                            entries = compat.bcentries(self._repo.branchmaptns())
+                            entries = self._repo.branchmaptns()._entries
                             for branch, nodes in compat.branchmapitems(entries):
                                 namedbranch, tns, topic = common.parsefqbn(branch)
                                 if tns == b'none' or tns in namespaces: