##// END OF EJS Templates
ui: convert to/from Unicode on Python 3 in ui.editor()...
Augie Fackler -
r31532:713e984b default
parent child Browse files
Show More
@@ -1196,7 +1196,7 b' class ui(object):'
1196 dir=rdir)
1196 dir=rdir)
1197 try:
1197 try:
1198 f = os.fdopen(fd, pycompat.sysstr("w"))
1198 f = os.fdopen(fd, pycompat.sysstr("w"))
1199 f.write(text)
1199 f.write(encoding.strfromlocal(text))
1200 f.close()
1200 f.close()
1201
1201
1202 environ = {'HGUSER': user}
1202 environ = {'HGUSER': user}
@@ -1219,7 +1219,7 b' class ui(object):'
1219 blockedtag='editor')
1219 blockedtag='editor')
1220
1220
1221 f = open(name)
1221 f = open(name)
1222 t = f.read()
1222 t = encoding.strtolocal(f.read())
1223 f.close()
1223 f.close()
1224 finally:
1224 finally:
1225 os.unlink(name)
1225 os.unlink(name)
General Comments 0
You need to be logged in to leave comments. Login now