mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
Add support for creating symbolic links on Windows
Replace all calls to os.symlink with platform_utils.symlink. The Windows implementation calls into the CreateSymbolicLinkW Win32 API, as os.symlink is not supported. Separate the Win32 API definitions into a separate module platform_utils_win32 for clarity. Change-Id: I0714c598664c2df93383734e609d948692c17ec5
This commit is contained in:
committed by
David Pursehouse
parent
2e70291162
commit
d5cec5e752
@@ -32,6 +32,7 @@ else:
|
||||
import gitc_utils
|
||||
from git_config import GitConfig
|
||||
from git_refs import R_HEADS, HEAD
|
||||
import platform_utils
|
||||
from project import RemoteSpec, Project, MetaProject
|
||||
from error import ManifestParseError, ManifestInvalidRevisionError
|
||||
|
||||
@@ -166,7 +167,7 @@ class XmlManifest(object):
|
||||
try:
|
||||
if os.path.lexists(self.manifestFile):
|
||||
os.remove(self.manifestFile)
|
||||
os.symlink(os.path.join('manifests', name), self.manifestFile)
|
||||
platform_utils.symlink(os.path.join('manifests', name), self.manifestFile)
|
||||
except OSError as e:
|
||||
raise ManifestParseError('cannot link manifest %s: %s' % (name, str(e)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user