diff options
author | David Pursehouse <dpursehouse@collab.net> | 2017-08-30 10:24:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-30 10:24:03 +0000 |
commit | d1ebc89a083f2966f8c65246bb63e2deaadfab62 (patch) | |
tree | cd6bd047ba2c7b83a25ba045a48efa95393f7fbe /subcmds/init.py | |
parent | 9ead97bb51f5b1ad1d0a45e0c5442f15e1e38fd7 (diff) | |
parent | ad1abcb556bfff2744928a8f29d216aee43fdbe3 (diff) | |
download | git-repo-d1ebc89a083f2966f8c65246bb63e2deaadfab62.tar.gz |
Merge changes from topic "windows-support"
* changes:
Port os.rename calls to work on Windows
Workaround shutil.rmtree limitation on Windows
Add support for creating symbolic links on Windows
Make "git command" and "forall" work on Windows
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 46cdd23a..eeddca06 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -17,7 +17,6 @@ from __future__ import print_function | |||
17 | import os | 17 | import os |
18 | import platform | 18 | import platform |
19 | import re | 19 | import re |
20 | import shutil | ||
21 | import sys | 20 | import sys |
22 | 21 | ||
23 | from pyversion import is_python3 | 22 | from pyversion import is_python3 |
@@ -35,6 +34,7 @@ from error import ManifestParseError | |||
35 | from project import SyncBuffer | 34 | from project import SyncBuffer |
36 | from git_config import GitConfig | 35 | from git_config import GitConfig |
37 | from git_command import git_require, MIN_GIT_VERSION | 36 | from git_command import git_require, MIN_GIT_VERSION |
37 | import platform_utils | ||
38 | 38 | ||
39 | class Init(InteractiveCommand, MirrorSafeCommand): | 39 | class Init(InteractiveCommand, MirrorSafeCommand): |
40 | common = True | 40 | common = True |
@@ -252,7 +252,7 @@ to update the working directory files. | |||
252 | # Better delete the manifest git dir if we created it; otherwise next | 252 | # Better delete the manifest git dir if we created it; otherwise next |
253 | # time (when user fixes problems) we won't go through the "is_new" logic. | 253 | # time (when user fixes problems) we won't go through the "is_new" logic. |
254 | if is_new: | 254 | if is_new: |
255 | shutil.rmtree(m.gitdir) | 255 | platform_utils.rmtree(m.gitdir) |
256 | sys.exit(1) | 256 | sys.exit(1) |
257 | 257 | ||
258 | if opt.manifest_branch: | 258 | if opt.manifest_branch: |