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/sync.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/sync.py')
-rw-r--r-- | subcmds/sync.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 8de730bc..b88c596d 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -19,7 +19,6 @@ import netrc | |||
19 | from optparse import SUPPRESS_HELP | 19 | from optparse import SUPPRESS_HELP |
20 | import os | 20 | import os |
21 | import re | 21 | import re |
22 | import shutil | ||
23 | import socket | 22 | import socket |
24 | import subprocess | 23 | import subprocess |
25 | import sys | 24 | import sys |
@@ -73,6 +72,7 @@ from project import Project | |||
73 | from project import RemoteSpec | 72 | from project import RemoteSpec |
74 | from command import Command, MirrorSafeCommand | 73 | from command import Command, MirrorSafeCommand |
75 | from error import RepoChangedException, GitError, ManifestParseError | 74 | from error import RepoChangedException, GitError, ManifestParseError |
75 | import platform_utils | ||
76 | from project import SyncBuffer | 76 | from project import SyncBuffer |
77 | from progress import Progress | 77 | from progress import Progress |
78 | from wrapper import Wrapper | 78 | from wrapper import Wrapper |
@@ -475,7 +475,7 @@ later is required to fix a server side protocol bug. | |||
475 | # working git repository around. There shouldn't be any git projects here, | 475 | # working git repository around. There shouldn't be any git projects here, |
476 | # so rmtree works. | 476 | # so rmtree works. |
477 | try: | 477 | try: |
478 | shutil.rmtree(os.path.join(path, '.git')) | 478 | platform_utils.rmtree(os.path.join(path, '.git')) |
479 | except OSError: | 479 | except OSError: |
480 | print('Failed to remove %s' % os.path.join(path, '.git'), file=sys.stderr) | 480 | print('Failed to remove %s' % os.path.join(path, '.git'), file=sys.stderr) |
481 | print('error: Failed to delete obsolete path %s' % path, file=sys.stderr) | 481 | print('error: Failed to delete obsolete path %s' % path, file=sys.stderr) |