Mercurial > hg > evolve
changeset 2751:417490bdf28a
topic: avoid crash when topic is loaded but not enabled for a repository
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 23 Jun 2017 10:21:37 +0200 |
parents | 320f4faef18c |
children | 4a148ca3e80d |
files | hgext3rd/topic/__init__.py hgext3rd/topic/topicmap.py |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py +++ b/hgext3rd/topic/__init__.py @@ -229,7 +229,7 @@ def branchmap(self, topic=None): if topic is None: - topic = self._autobranchmaptopic + topic = getattr(repo, '_autobranchmaptopic', False) topicfilter = topicmap.topicfilter(self.filtername) if not topic or topicfilter == self.filtername: return super(topicrepo, self).branchmap()
--- a/hgext3rd/topic/topicmap.py +++ b/hgext3rd/topic/topicmap.py @@ -103,7 +103,7 @@ extensions.wrapfunction(branchmap, 'updatecache', _wrapupdatebmcache) def _wrapupdatebmcache(orig, repo): - previous = repo._autobranchmaptopic + previous = getattr(repo, '_autobranchmaptopic', False) try: repo._autobranchmaptopic = False return orig(repo)