comparison hgext3rd/topic/discovery.py @ 4192:e527df0f2a68 stable

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.
author Pulkit Goyal <pulkit@yandex-team.ru>
date Sun, 21 Oct 2018 00:08:27 +0300
parents 119fced5a891
children cae466b70bf1
comparison
equal deleted inserted replaced
4191:5c734be63c3e 4192:e527df0f2a68
79 ctx.branch = branch 79 ctx.branch = branch
80 return ctx 80 return ctx
81 81
82 def revbranchcache(self): 82 def revbranchcache(self):
83 rbc = super(repocls, self).revbranchcache() 83 rbc = super(repocls, self).revbranchcache()
84 changelog = self.changelog 84 localchangelog = self.changelog
85 85
86 def branchinfo(rev): 86 def branchinfo(rev, changelog=None):
87 if changelog is None:
88 changelog = localchangelog
87 branch, close = changelog.branchinfo(rev) 89 branch, close = changelog.branchinfo(rev)
88 if rev in publishedset: 90 if rev in publishedset:
89 return branch, close 91 return branch, close
90 topic = repo[rev].topic() 92 topic = repo[rev].topic()
91 if topic: 93 if topic: