checklink: use an explicit prefix for the temporary file stable
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 14 Apr 2010 08:48:26 +0200
branchstable
changeset 10901 997173e49115
parent 10896 2d61b612a09d
child 10902 4eb6311d217a
checklink: use an explicit prefix for the temporary file
mercurial/util.py
--- a/mercurial/util.py	Tue Apr 13 21:54:59 2010 +0200
+++ b/mercurial/util.py	Wed Apr 14 08:48:26 2010 +0200
@@ -682,7 +682,7 @@
     """check whether the given path is on a symlink-capable filesystem"""
     # mktemp is not racy because symlink creation will fail if the
     # file already exists
-    name = tempfile.mktemp(dir=path)
+    name = tempfile.mktemp(dir=path, prefix='hg-checklink-')
     try:
         os.symlink(".", name)
         os.unlink(name)