mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-28 20:17:26 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
148e1ce81a | |||
32ca6687ae | |||
0ae9503a86 |
@ -459,6 +459,11 @@ def init_ssh():
|
|||||||
def _open_ssh(host, port=None):
|
def _open_ssh(host, port=None):
|
||||||
global _ssh_master
|
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
|
# 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
|
# 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
|
# 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:
|
if key in _master_keys:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if (not _ssh_master
|
if not _ssh_master or 'GIT_SSH' in os.environ:
|
||||||
or 'GIT_SSH' in os.environ
|
# Failed earlier, so don't retry.
|
||||||
or sys.platform in ('win32', 'cygwin')):
|
|
||||||
# failed earlier, or cygwin ssh can't do this
|
|
||||||
#
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# We will make two calls to ssh; this is the common part of both calls.
|
# We will make two calls to ssh; this is the common part of both calls.
|
||||||
|
@ -2205,7 +2205,7 @@ class Project(object):
|
|||||||
|
|
||||||
# Figure out how long to sleep before the next attempt, if there is one.
|
# Figure out how long to sleep before the next attempt, if there is one.
|
||||||
if not verbose:
|
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:
|
if try_n < retry_fetches - 1:
|
||||||
output_redir.write('sleeping %s seconds before retrying' % retry_cur_sleep)
|
output_redir.write('sleeping %s seconds before retrying' % retry_cur_sleep)
|
||||||
time.sleep(retry_cur_sleep)
|
time.sleep(retry_cur_sleep)
|
||||||
|
@ -887,7 +887,7 @@ later is required to fix a server side protocol bug.
|
|||||||
if previously_missing_set == missing_set:
|
if previously_missing_set == missing_set:
|
||||||
break
|
break
|
||||||
previously_missing_set = missing_set
|
previously_missing_set = missing_set
|
||||||
success, new_fetched = self._Fetch(to_fetch, opt, err_event)
|
success, new_fetched = self._Fetch(missing, opt, err_event)
|
||||||
if not success:
|
if not success:
|
||||||
err_event.set()
|
err_event.set()
|
||||||
fetched.update(new_fetched)
|
fetched.update(new_fetched)
|
||||||
|
Reference in New Issue
Block a user