changeset 5135:bf60e4bd6672

hghave: prefix temporary files with "hg-hghave-"
author Patrick Mezard <pmezard@gmail.com>
date Thu, 09 Aug 2007 23:14:52 +0200
parents 9b5ae133bd5a
children 9555f3b9489d fc6106267198
files tests/hghave
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave
+++ b/tests/hghave
@@ -8,6 +8,8 @@ import os
 import sys
 import tempfile
 
+tempprefix = 'hg-hghave-'
+
 def has_symlink():
     return hasattr(os, "symlink")
 
@@ -15,7 +17,7 @@ def has_fifo():
     return hasattr(os, "mkfifo")
 
 def has_executablebit():
-    fd, path = tempfile.mkstemp()
+    fd, path = tempfile.mkstemp(prefix=tempprefix)
     os.close(fd)
     try:
         s = os.lstat(path).st_mode
@@ -26,7 +28,7 @@ def has_executablebit():
 
 def has_eol_in_paths():
     try:
-        fd, path = tempfile.mkstemp(suffix='\n\r')
+        fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
         os.close(fd)
         os.remove(path)
         return True