Mercurial > dotfiles
diff lib/hg/hggit_sync.py @ 322:e7fe049b7f8b
Use UTF8 encoding.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 12 Oct 2015 08:32:35 -0700 |
parents | e40cdce29e5a |
children |
line wrap: on
line diff
--- a/lib/hg/hggit_sync.py Mon Aug 24 22:33:16 2015 -0700 +++ b/lib/hg/hggit_sync.py Mon Oct 12 08:32:35 2015 -0700 @@ -1,6 +1,7 @@ import os import os.path import sys +import codecs import subprocess @@ -78,7 +79,7 @@ if len(sys.argv) > 1: map_file = sys.argv[1] print "Saving map file: %s" % map_file - with open(map_file, 'w') as fp: + with codecs.open(map_file, 'w', encoding='utf8') as fp: for key, val in commit_map.iteritems(): if val[0] is None or val[1] is None: continue