mercurial/util.py
changeset 34002 2ad028635ccd
parent 33853 cfcfbe6c96f8
child 34052 ca6a3852daf0
--- a/mercurial/util.py	Mon Aug 28 14:47:18 2017 -0700
+++ b/mercurial/util.py	Tue Aug 22 00:38:38 2017 +0000
@@ -1525,7 +1525,7 @@
     Returns the name of the temporary file.
     """
     d, fn = os.path.split(name)
-    fd, temp = tempfile.mkstemp(prefix='.%s-' % fn, dir=d)
+    fd, temp = tempfile.mkstemp(prefix='.%s-' % fn, suffix='~', dir=d)
     os.close(fd)
     # Temporary files are created with mode 0600, which is usually not
     # what we want.  If the original file already exists, just copy