mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-26 20:17:52 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
32ca6687ae | |||
0ae9503a86 | |||
cd89ec147a | |||
d41eed0b36 | |||
d2b086bea9 |
@ -459,6 +459,11 @@ def init_ssh():
|
||||
def _open_ssh(host, port=None):
|
||||
global _ssh_master
|
||||
|
||||
# Bail before grabbing the lock if we already know that we aren't going to
|
||||
# try creating new masters below.
|
||||
if sys.platform in ('win32', 'cygwin'):
|
||||
return False
|
||||
|
||||
# Acquire the lock. This is needed to prevent opening multiple masters for
|
||||
# the same host when we're running "repo sync -jN" (for N > 1) _and_ the
|
||||
# manifest <remote fetch="ssh://xyz"> specifies a different host from the
|
||||
@ -476,11 +481,8 @@ def _open_ssh(host, port=None):
|
||||
if key in _master_keys:
|
||||
return True
|
||||
|
||||
if (not _ssh_master
|
||||
or 'GIT_SSH' in os.environ
|
||||
or sys.platform in ('win32', 'cygwin')):
|
||||
# failed earlier, or cygwin ssh can't do this
|
||||
#
|
||||
if not _ssh_master or 'GIT_SSH' in os.environ:
|
||||
# Failed earlier, so don't retry.
|
||||
return False
|
||||
|
||||
# We will make two calls to ssh; this is the common part of both calls.
|
||||
|
@ -1051,7 +1051,7 @@ class Project(object):
|
||||
prune=False,
|
||||
submodules=False,
|
||||
clone_filter=None,
|
||||
partial_clone_exclude=None):
|
||||
partial_clone_exclude=set()):
|
||||
"""Perform only the network IO portion of the sync process.
|
||||
Local working directory/branch state is not affected.
|
||||
"""
|
||||
@ -2205,7 +2205,7 @@ class Project(object):
|
||||
|
||||
# Figure out how long to sleep before the next attempt, if there is one.
|
||||
if not verbose:
|
||||
output_redir.write('\n%s:\n%s' % (self.name, gitcmd.stdout), file=sys.stderr)
|
||||
output_redir.write('\n%s:\n%s' % (self.name, gitcmd.stdout))
|
||||
if try_n < retry_fetches - 1:
|
||||
output_redir.write('sleeping %s seconds before retrying' % retry_cur_sleep)
|
||||
time.sleep(retry_cur_sleep)
|
||||
|
2
repo
2
repo
@ -298,7 +298,7 @@ def InitParser(parser, gitc_init=False):
|
||||
help='manifest repository location', metavar='URL')
|
||||
group.add_option('-b', '--manifest-branch', metavar='REVISION',
|
||||
help='manifest branch or revision (use HEAD for default)')
|
||||
group.add_option('-m', '--manifest-name',
|
||||
group.add_option('-m', '--manifest-name', default='default.xml',
|
||||
help='initial manifest file', metavar='NAME.xml')
|
||||
group.add_option('-g', '--groups', default='default',
|
||||
help='restrict manifest projects to ones with specified '
|
||||
|
@ -51,7 +51,7 @@ import git_superproject
|
||||
import gitc_utils
|
||||
from project import Project
|
||||
from project import RemoteSpec
|
||||
from command import Command, MirrorSafeCommand
|
||||
from command import Command, MirrorSafeCommand, WORKER_BATCH_SIZE
|
||||
from error import RepoChangedException, GitError, ManifestParseError
|
||||
import platform_utils
|
||||
from project import SyncBuffer
|
||||
|
Reference in New Issue
Block a user