Mercurial > public > mercurial-scm > hg
comparison mercurial/windows.py @ 13890:31eb145b50b6
util: move checklink() to posix.py and return False on Windows
Python added support for Windows 6.0 (Vista) symbolic links in 3.2 [1], but
even these symbolic links aren't what we can expect from a canonical
symbolic link, since creation requires SeCreateSymbolicLinkPrivilege,
which typically only admins have.
So we can safely assume that we don't have symbolic links on Windows.
[1] http://docs.python.org/py3k/library/os.html#os.symlink
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 05 Apr 2011 11:55:52 +0200 |
parents | 5b0a3f6cbead |
children | 9c374cf76b7d |
comparison
equal
deleted
inserted
replaced
13889:9a96efc4af8a | 13890:31eb145b50b6 |
---|---|
133 pass | 133 pass |
134 | 134 |
135 def checkexec(path): | 135 def checkexec(path): |
136 return False | 136 return False |
137 | 137 |
138 def checklink(path): | |
139 return False | |
140 | |
138 def set_binary(fd): | 141 def set_binary(fd): |
139 # When run without console, pipes may expose invalid | 142 # When run without console, pipes may expose invalid |
140 # fileno(), usually set to -1. | 143 # fileno(), usually set to -1. |
141 if hasattr(fd, 'fileno') and fd.fileno() >= 0: | 144 if hasattr(fd, 'fileno') and fd.fileno() >= 0: |
142 msvcrt.setmode(fd.fileno(), os.O_BINARY) | 145 msvcrt.setmode(fd.fileno(), os.O_BINARY) |