comparison hgext3rd/serverminitopic.py @ 4804:079dbf36e884

python3: add raw prefix in cases harder to analyze at the token level The `byteify-strings.py` script would be a lot more complicated if it had to do backtracking and other more advanced static analysis to figure our those cases, so we have to add the raw prefix to those cases manually.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 06 Aug 2019 11:26:29 +0200
parents f0ecf2137824
children 48b30ff742cb
comparison
equal deleted inserted replaced
4803:88472e743c64 4804:079dbf36e884
65 class revbranchcacheoverlay(object): 65 class revbranchcacheoverlay(object):
66 """revbranch mixin that don't use the cache for non public changeset""" 66 """revbranch mixin that don't use the cache for non public changeset"""
67 67
68 def _init__(self, *args, **kwargs): 68 def _init__(self, *args, **kwargs):
69 super(revbranchcacheoverlay, self).__init__(*args, **kwargs) 69 super(revbranchcacheoverlay, self).__init__(*args, **kwargs)
70 if 'branchinfo' in vars(self): 70 if r'branchinfo' in vars(self):
71 del self.branchinfo 71 del self.branchinfo
72 72
73 def branchinfo(self, rev, changelog=None): 73 def branchinfo(self, rev, changelog=None):
74 """return branch name and close flag for rev, using and updating 74 """return branch name and close flag for rev, using and updating
75 persistent cache.""" 75 persistent cache."""
93 cache = super(minitopicrepo, self).revbranchcache() 93 cache = super(minitopicrepo, self).revbranchcache()
94 94
95 class topicawarerbc(revbranchcacheoverlay, cache.__class__): 95 class topicawarerbc(revbranchcacheoverlay, cache.__class__):
96 pass 96 pass
97 cache.__class__ = topicawarerbc 97 cache.__class__ = topicawarerbc
98 if 'branchinfo' in vars(cache): 98 if r'branchinfo' in vars(cache):
99 del cache.branchinfo 99 del cache.branchinfo
100 self._revbranchcache = cache 100 self._revbranchcache = cache
101 return self._revbranchcache 101 return self._revbranchcache
102 102
103 repo.__class__ = minitopicrepo 103 repo.__class__ = minitopicrepo