##// END OF EJS Templates
tests/hghave: consistently use dir='.', prefix=tempprefix for tempfiles...
Mads Kiilerich -
r16968:456f457e default
parent child Browse files
Show More
@@ -50,7 +50,7 b' def has_mtn():'
50 50
51 51 def has_eol_in_paths():
52 52 try:
53 fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
53 fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix, suffix='\n\r')
54 54 os.close(fd)
55 55 os.remove(path)
56 56 return True
@@ -60,7 +60,7 b' def has_eol_in_paths():'
60 60 def has_executablebit():
61 61 try:
62 62 EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
63 fh, fn = tempfile.mkstemp(dir=".", prefix='hg-checkexec-')
63 fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix)
64 64 try:
65 65 os.close(fh)
66 66 m = os.stat(fn).st_mode & 0777
@@ -76,7 +76,7 b' def has_executablebit():'
76 76
77 77 def has_icasefs():
78 78 # Stolen from mercurial.util
79 fd, path = tempfile.mkstemp(prefix=tempprefix, dir='.')
79 fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
80 80 os.close(fd)
81 81 try:
82 82 s1 = os.stat(path)
@@ -105,7 +105,7 b' def has_fifo():'
105 105 def has_cacheable_fs():
106 106 from mercurial import util
107 107
108 fd, path = tempfile.mkstemp(prefix=tempprefix)
108 fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
109 109 os.close(fd)
110 110 try:
111 111 return util.cachestat(path).cacheable()
@@ -165,7 +165,7 b' def has_p4():'
165 165 def has_symlink():
166 166 if getattr(os, "symlink", None) is None:
167 167 return False
168 name = tempfile.mktemp(dir=".", prefix='hg-checklink-')
168 name = tempfile.mktemp(dir='.', prefix=tempprefix)
169 169 try:
170 170 os.symlink(".", name)
171 171 os.unlink(name)
@@ -180,7 +180,7 b' def has_gpg():'
180 180 return matchoutput('gpg --version 2>&1', r'GnuPG')
181 181
182 182 def has_unix_permissions():
183 d = tempfile.mkdtemp(prefix=tempprefix, dir=".")
183 d = tempfile.mkdtemp(dir='.', prefix=tempprefix)
184 184 try:
185 185 fname = os.path.join(d, 'foo')
186 186 for umask in (077, 007, 022):
General Comments 0
You need to be logged in to leave comments. Login now