Patchwork D7233: hghave: disallow symlinks on Windows

login
register
mail settings
Submitter phabricator
Date Nov. 6, 2019, 3:48 a.m.
Message ID <7b043013760a7b478267164cf86e1343@localhost.localdomain>
Download mbox | patch
Permalink /patch/42796/
State Not Applicable
Headers show

Comments

phabricator - Nov. 6, 2019, 3:48 a.m.
Closed by commit rHGe494dc63680c: hghave: disallow symlinks on Windows (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7233?vs=17562&id=17600

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7233/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7233

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -431,7 +431,8 @@ 
 
 @check("symlink", "symbolic links")
 def has_symlink():
-    if getattr(os, "symlink", None) is None:
+    # mercurial.windows.checklink() is a hard 'no' at the moment
+    if os.name == 'nt' or getattr(os, "symlink", None) is None:
         return False
     name = tempfile.mktemp(dir='.', prefix=tempprefix)
     try: