Make sure that svnlook outputs UTF8.
Since we have an empty environment, svnlook defaults to ASCII, outputting {U+xxxx} instead of UTF8 characters. We can either re-interpret those, or just make sure we get UTF8 in the first place.
This commit is contained in:
@@ -10,6 +10,7 @@ Example call:
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -42,6 +43,9 @@ except KeyError:
|
||||
|
||||
url = parse.urljoin(PILLAR_URL, '/attract/api/%s/subversion/log' % project_url)
|
||||
|
||||
# Make sure that svnlook outputs UTF8. Without this, since we have an empty environment,
|
||||
# it defaults to ASCII, outputting {U+xxxx} instead of UTF8 characters.
|
||||
os.environ['LANG'] = 'en_US.utf8'
|
||||
|
||||
def svnlook(subcmd):
|
||||
info = subprocess.check_output(['/usr/bin/svnlook', subcmd, svn_repo, '-r', str(svn_revision)])
|
||||
|
Reference in New Issue
Block a user