topic: add the changelog argument to branchinfo()
authorPulkit Goyal <pulkit@yandex-team.ru>
Sun, 21 Oct 2018 00:08:27 +0300
changeset 4187 49d442a2207f
parent 4186 11b12ea01d1e
child 4188 326c043bf89c
topic: add the changelog argument to branchinfo() 47c03042cd1d in core added a changelog argument to revbranchcache.branchinfo() and we wrap that function in topic extension. So let's add this optional argument in topic extension too.
CHANGELOG
hgext3rd/serverminitopic.py
hgext3rd/topic/discovery.py
hgext3rd/topic/topicmap.py
--- a/CHANGELOG	Fri Oct 19 09:02:35 2018 -0700
+++ b/CHANGELOG	Sun Oct 21 00:08:27 2018 +0300
@@ -1,10 +1,11 @@
 Changelog
 =========
 
-8.3.0 - in pprogress
+8.3.0 - in progress
 -------------------
 
  * use "new" unstabilities vocabulary in help
+  * compat: compatibility with Mercurial 4.8rc0
 
 8.3.0 -- 2018-10-12
 -------------------
--- a/hgext3rd/serverminitopic.py	Fri Oct 19 09:02:35 2018 -0700
+++ b/hgext3rd/serverminitopic.py	Sun Oct 21 00:08:27 2018 +0300
@@ -67,7 +67,7 @@
         if 'branchinfo' in vars(self):
             del self.branchinfo
 
-    def branchinfo(self, rev):
+    def branchinfo(self, rev, changelog=None):
         """return branch name and close flag for rev, using and updating
         persistent cache."""
         phase = self._repo._phasecache.phase(self._repo, rev)
--- a/hgext3rd/topic/discovery.py	Fri Oct 19 09:02:35 2018 -0700
+++ b/hgext3rd/topic/discovery.py	Sun Oct 21 00:08:27 2018 +0300
@@ -81,9 +81,8 @@
 
         def revbranchcache(self):
             rbc = super(repocls, self).revbranchcache()
-            changelog = self.changelog
 
-            def branchinfo(rev):
+            def branchinfo(rev, changelog=None):
                 branch, close = changelog.branchinfo(rev)
                 if rev in publishedset:
                     return branch, close
--- a/hgext3rd/topic/topicmap.py	Fri Oct 19 09:02:35 2018 -0700
+++ b/hgext3rd/topic/topicmap.py	Sun Oct 21 00:08:27 2018 +0300
@@ -203,7 +203,7 @@
         unfi = repo.unfiltered()
         oldgetbranchinfo = unfi.revbranchcache().branchinfo
 
-        def branchinfo(r):
+        def branchinfo(r, changelog=None):
             info = oldgetbranchinfo(r)
             topic = ''
             ctx = unfi[r]