mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
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.
This commit is contained in:
parent
1c80236266
commit
1695f5ea63
@ -45,9 +45,15 @@ def generate_repo_subclass(baseclass):
|
||||
(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'
|
||||
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user