changeset 322:e7fe049b7f8b

Use UTF8 encoding.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 12 Oct 2015 08:32:35 -0700
parents 7ab2a4418eaf
children e2d944ecda66
files lib/hg/hggit_sync.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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