Bug 1071133 — Make sure mercurial-setup knows how to handle unicode characters. r=gps

This commit is contained in:
Alexis Metaireau 2014-09-22 20:03:17 +02:00
parent 75000a49cd
commit 98029cd385

View File

@ -5,6 +5,7 @@
from __future__ import unicode_literals
from configobj import ConfigObj
import codecs
import re
import os
@ -43,7 +44,7 @@ class MercurialConfig(object):
# other files, this is not supported by ConfigObj, so throw a useful
# error saying this.
if os.path.exists(infile):
with open(infile, 'r') as f:
with codecs.open(infile, 'r', encoding='utf-8') as f:
for line in f:
if line.startswith('%include'):
raise HgIncludeException(