comparison hgext3rd/topic/__init__.py @ 6874:4dbbd7b4682b

topic: use dirstate.fqbn() instead of assembling all the components by hand
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 19 Sep 2024 16:31:29 +0400
parents 12a031f3587f
children 6209891ff220
comparison
equal deleted inserted replaced
6873:9af9b8630ef3 6874:4dbbd7b4682b
773 return super(topicrepo, self).branchmap() 773 return super(topicrepo, self).branchmap()
774 return self.filtered(topicfilter).branchmap() 774 return self.filtered(topicfilter).branchmap()
775 775
776 def branchheads(self, branch=None, start=None, closed=False): 776 def branchheads(self, branch=None, start=None, closed=False):
777 if branch is None: 777 if branch is None:
778 # using dirstate.branch() instead of self[None].branch() 778 branch = self.dirstate.fqbn()
779 # because we wrap context.branch method to return branch
780 # already in FQBN format, and we can't give it to formatfqbn()
781 # again directly
782 branch = self.dirstate.branch()
783 branch = common.formatfqbn(branch, self.currenttns, self.currenttopic)
784 return super(topicrepo, self).branchheads(branch=branch, 779 return super(topicrepo, self).branchheads(branch=branch,
785 start=start, 780 start=start,
786 closed=closed) 781 closed=closed)
787 782
788 def invalidatecaches(self): 783 def invalidatecaches(self):