Skip to content
Snippets Groups Projects
Commit 5d45e0ed authored by durin42's avatar durin42
Browse files

hgrepo: ensure all git-origin tags are bytes

If we don't do this we might end up with unicodes being written using
ui, which then breaks in popbuffer in test-encoding.t. This appears to
be an academic concern until we start passing unicode paths to git
repos, which we need to do in order to resolve some other problems. Yay.
parent 1f367cf5
No related branches found
No related tags found
No related merge requests found
......@@ -45,5 +45,7 @@
(tags, tagtypes) = super(hgrepo, self)._findtags()
for tag, rev in self.githandler.tags.iteritems():
if isinstance(tag, unicode):
tag = tag.encode('utf-8')
tags[tag] = bin(rev)
tagtypes[tag] = 'git'
......@@ -48,6 +50,10 @@
tags[tag] = bin(rev)
tagtypes[tag] = 'git'
for tag, rev in self.githandler.remote_refs.iteritems():
if isinstance(tag, unicode):
tag = tag.encode('utf-8')
tags[tag] = rev
tagtypes[tag] = 'git-remote'
tags.update(self.githandler.remote_refs)
return (tags, tagtypes)
......
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