Bug 1635809 - Prevent crash in converter.py on debug output with non-ascii hg log data. r=kvark

This is just in debug output, so the fact that we ignore non-utf-8 chars is ok.

Depends on D74064

Differential Revision: https://phabricator.services.mozilla.com/D74065
This commit is contained in:
Kartikaya Gupta 2020-05-06 16:08:58 +00:00
Родитель 21f0ab510f
Коммит 2c61b5048f
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -398,7 +398,7 @@ if DEBUG:
'-r', 'descendants(' + base_hg_rev + ')', '-r', 'descendants(' + base_hg_rev + ')',
'--template', '{node} {desc|firstline}\\n']) '--template', '{node} {desc|firstline}\\n'])
for line in output.splitlines(): for line in output.splitlines():
eprint(str(line, "ascii")) eprint(line.decode('utf-8', 'ignore'))
# Also flag any changes that touch the project # Also flag any changes that touch the project
query = '(' + wider_range + ') & modifies("glob:' + relative_path + '/**")' query = '(' + wider_range + ') & modifies("glob:' + relative_path + '/**")'