--- a/hgext3rd/serverminitopic.py Tue Aug 06 15:06:27 2019 +0200
+++ b/hgext3rd/serverminitopic.py Tue Aug 06 15:06:38 2019 +0200
@@ -33,7 +33,7 @@
configtable = {}
configitem = registrar.configitem(configtable)
- configitem('experimental', 'server-mini-topic',
+ configitem(b'experimental', b'server-mini-topic',
default=False,
)
@@ -44,7 +44,7 @@
"""
enabled = getattr(repo, '_hasminitopic', None)
if enabled is None:
- enabled = (repo.ui.configbool('experimental', 'server-mini-topic')
+ enabled = (repo.ui.configbool(b'experimental', b'server-mini-topic')
and not repo.publishing())
repo._hasminitopic = enabled
return enabled
@@ -54,10 +54,10 @@
def topicbranch(orig, self):
branch = orig(self)
if hasminitopic(self._repo) and self.phase():
- topic = self._changeset.extra.get('topic')
+ topic = self._changeset.extra.get(b'topic')
if topic is not None:
topic = encoding.tolocal(topic)
- branch = '%s:%s' % (branch, topic)
+ branch = b'%s:%s' % (branch, topic)
return branch
### avoid caching topic data in rev-branch-cache
@@ -120,7 +120,7 @@
if revs:
s = hashlib.sha1()
for rev in revs:
- s.update('%d;' % rev)
+ s.update(b'%d;' % rev)
key = s.digest()
return key
@@ -138,8 +138,8 @@
branchmap.branchcache = previous
_publiconly = set([
- 'base',
- 'immutable',
+ b'base',
+ b'immutable',
])
def mighttopic(repo):
@@ -216,7 +216,7 @@
def wireprotocaps(orig, repo, proto):
caps = orig(repo, proto)
if hasminitopic(repo):
- caps.append('topics')
+ caps.append(b'topics')
return caps
# wrap the necessary bit