diff mercurial/ui.py @ 38197:aac4be30e250

py3: wrap tempfile.mkstemp() to use bytes path This patch just flips the default to use a bytes path on Python 3. ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 26 May 2018 12:14:04 +0900
parents 6acf41bb8d40
children bec1212eceaa
line wrap: on
line diff
--- a/mercurial/ui.py	Thu May 03 18:39:58 2018 +0900
+++ b/mercurial/ui.py	Sat May 26 12:14:04 2018 +0900
@@ -18,7 +18,6 @@
 import socket
 import subprocess
 import sys
-import tempfile
 import traceback
 
 from .i18n import _
@@ -1446,7 +1445,7 @@
         rdir = None
         if self.configbool('experimental', 'editortmpinhg'):
             rdir = repopath
-        (fd, name) = tempfile.mkstemp(prefix='hg-' + extra['prefix'] + '-',
+        (fd, name) = pycompat.mkstemp(prefix='hg-' + extra['prefix'] + '-',
                                       suffix=suffix,
                                       dir=rdir)
         try: