Skip to content
Snippets Groups Projects
Commit c30efdf3 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

hgrepo: forbid unicode tags

It was at some point planned to allow unicode tags (5d45e0edfa3f). This plan
was apparently discarded. To play safe, add an assert.
parent c7b17b2a
No related branches found
No related tags found
1 merge request!21Make tests pass on Python 3
......@@ -49,8 +49,7 @@
(tags, tagtypes) = super(hgrepo, self)._findtags()
for tag, rev in compat.iteritems(self.githandler.tags):
if isinstance(tag, unicode):
tag = tag.encode('utf-8')
assert isinstance(tag, bytes)
tags[tag] = bin(rev)
tagtypes[tag] = b'git'
for tag, rev in compat.iteritems(self.githandler.remote_refs):
......@@ -54,8 +53,7 @@
tags[tag] = bin(rev)
tagtypes[tag] = b'git'
for tag, rev in compat.iteritems(self.githandler.remote_refs):
if isinstance(tag, unicode):
tag = tag.encode('utf-8')
assert isinstance(tag, bytes)
tags[tag] = rev
tagtypes[tag] = b'git-remote'
tags.update(self.githandler.remote_refs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment