Mercurial > hg
comparison tests/hghave.py @ 43455:6792da448437
hghave: disallow symlinks on Windows
Symlinks on Windows require either a special priviledge, or enabling Developer
Mode. It's probably the latter that is enabled on the new CI machine. But
since Mercurial itself is saying no to symlinks on Windows, the tests for
symlinks shouldn't be attempted. This should fix a lot of the noise in the py3
tests.
Differential Revision: https://phab.mercurial-scm.org/D7233
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 05 Nov 2019 18:32:00 -0500 |
parents | ca0cd0a13514 |
children | 32ac4d0b4102 |
comparison
equal
deleted
inserted
replaced
43454:c8e5b3094a1d | 43455:6792da448437 |
---|---|
429 ) | 429 ) |
430 | 430 |
431 | 431 |
432 @check("symlink", "symbolic links") | 432 @check("symlink", "symbolic links") |
433 def has_symlink(): | 433 def has_symlink(): |
434 if getattr(os, "symlink", None) is None: | 434 # mercurial.windows.checklink() is a hard 'no' at the moment |
435 if os.name == 'nt' or getattr(os, "symlink", None) is None: | |
435 return False | 436 return False |
436 name = tempfile.mktemp(dir='.', prefix=tempprefix) | 437 name = tempfile.mktemp(dir='.', prefix=tempprefix) |
437 try: | 438 try: |
438 os.symlink(".", name) | 439 os.symlink(".", name) |
439 os.unlink(name) | 440 os.unlink(name) |