mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-28 20:17:26 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
d177609cb0 | |||
b16b9d26bd |
@ -2197,7 +2197,7 @@ class Project(object):
|
|||||||
ret = prunecmd.Wait()
|
ret = prunecmd.Wait()
|
||||||
if ret:
|
if ret:
|
||||||
break
|
break
|
||||||
output_redir.write('retrying fetch after pruning remote branches')
|
print('retrying fetch after pruning remote branches', file=output_redir)
|
||||||
# Continue right away so we don't sleep as we shouldn't need to.
|
# Continue right away so we don't sleep as we shouldn't need to.
|
||||||
continue
|
continue
|
||||||
elif current_branch_only and is_sha1 and ret == 128:
|
elif current_branch_only and is_sha1 and ret == 128:
|
||||||
@ -2210,10 +2210,11 @@ class Project(object):
|
|||||||
break
|
break
|
||||||
|
|
||||||
# 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 and gitcmd.stdout:
|
||||||
output_redir.write('\n%s:\n%s' % (self.name, gitcmd.stdout))
|
print('\n%s:\n%s' % (self.name, gitcmd.stdout), end='', file=output_redir)
|
||||||
if try_n < retry_fetches - 1:
|
if try_n < retry_fetches - 1:
|
||||||
output_redir.write('sleeping %s seconds before retrying' % retry_cur_sleep)
|
print('%s: sleeping %s seconds before retrying' % (self.name, retry_cur_sleep),
|
||||||
|
file=output_redir)
|
||||||
time.sleep(retry_cur_sleep)
|
time.sleep(retry_cur_sleep)
|
||||||
retry_cur_sleep = min(retry_exp_factor * retry_cur_sleep,
|
retry_cur_sleep = min(retry_exp_factor * retry_cur_sleep,
|
||||||
MAXIMUM_RETRY_SLEEP_SEC)
|
MAXIMUM_RETRY_SLEEP_SEC)
|
||||||
|
@ -469,11 +469,14 @@ later is required to fix a server side protocol bug.
|
|||||||
Args:
|
Args:
|
||||||
opt: Program options returned from optparse. See _Options().
|
opt: Program options returned from optparse. See _Options().
|
||||||
args: Command line args used to filter out projects.
|
args: Command line args used to filter out projects.
|
||||||
all_projects: List of all projects that should be checked out.
|
all_projects: List of all projects that should be fetched.
|
||||||
err_event: Whether an error was hit while processing.
|
err_event: Whether an error was hit while processing.
|
||||||
manifest_name: Manifest file to be reloaded.
|
manifest_name: Manifest file to be reloaded.
|
||||||
load_local_manifests: Whether to load local manifests.
|
load_local_manifests: Whether to load local manifests.
|
||||||
ssh_proxy: SSH manager for clients & masters.
|
ssh_proxy: SSH manager for clients & masters.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
List of all projects that should be checked out.
|
||||||
"""
|
"""
|
||||||
rp = self.manifest.repoProject
|
rp = self.manifest.repoProject
|
||||||
|
|
||||||
@ -520,6 +523,8 @@ later is required to fix a server side protocol bug.
|
|||||||
err_event.set()
|
err_event.set()
|
||||||
fetched.update(new_fetched)
|
fetched.update(new_fetched)
|
||||||
|
|
||||||
|
return all_projects
|
||||||
|
|
||||||
def _CheckoutOne(self, detach_head, force_sync, project):
|
def _CheckoutOne(self, detach_head, force_sync, project):
|
||||||
"""Checkout work tree for one project
|
"""Checkout work tree for one project
|
||||||
|
|
||||||
@ -1006,8 +1011,9 @@ later is required to fix a server side protocol bug.
|
|||||||
with ssh.ProxyManager(manager) as ssh_proxy:
|
with ssh.ProxyManager(manager) as ssh_proxy:
|
||||||
# Initialize the socket dir once in the parent.
|
# Initialize the socket dir once in the parent.
|
||||||
ssh_proxy.sock()
|
ssh_proxy.sock()
|
||||||
self._FetchMain(opt, args, all_projects, err_event, manifest_name,
|
all_projects = self._FetchMain(opt, args, all_projects, err_event,
|
||||||
load_local_manifests, ssh_proxy)
|
manifest_name, load_local_manifests,
|
||||||
|
ssh_proxy)
|
||||||
|
|
||||||
if opt.network_only:
|
if opt.network_only:
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user