##// END OF EJS Templates
hghave: prefix temporary files with "hg-hghave-"
Patrick Mezard -
r5090:bf60e4bd default
parent child Browse files
Show More
@@ -8,6 +8,8 b' import os'
8 import sys
8 import sys
9 import tempfile
9 import tempfile
10
10
11 tempprefix = 'hg-hghave-'
12
11 def has_symlink():
13 def has_symlink():
12 return hasattr(os, "symlink")
14 return hasattr(os, "symlink")
13
15
@@ -15,7 +17,7 b' def has_fifo():'
15 return hasattr(os, "mkfifo")
17 return hasattr(os, "mkfifo")
16
18
17 def has_executablebit():
19 def has_executablebit():
18 fd, path = tempfile.mkstemp()
20 fd, path = tempfile.mkstemp(prefix=tempprefix)
19 os.close(fd)
21 os.close(fd)
20 try:
22 try:
21 s = os.lstat(path).st_mode
23 s = os.lstat(path).st_mode
@@ -26,7 +28,7 b' def has_executablebit():'
26
28
27 def has_eol_in_paths():
29 def has_eol_in_paths():
28 try:
30 try:
29 fd, path = tempfile.mkstemp(suffix='\n\r')
31 fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
30 os.close(fd)
32 os.close(fd)
31 os.remove(path)
33 os.remove(path)
32 return True
34 return True
General Comments 0
You need to be logged in to leave comments. Login now