mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
sync: update event is_set API
Python 3 renamed this method from isSet to is_set. Change-Id: I8f9bb0b302d55873bed3cb20f2d994fa2d082157 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297742 Reviewed-by: Michael Mortensen <mmortensen@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
c87c1863b1
commit
be24a54d9c
@ -415,7 +415,7 @@ later is required to fix a server side protocol bug.
|
|||||||
for project_list in objdir_project_map.values():
|
for project_list in objdir_project_map.values():
|
||||||
# Check for any errors before running any more tasks.
|
# Check for any errors before running any more tasks.
|
||||||
# ...we'll let existing threads finish, though.
|
# ...we'll let existing threads finish, though.
|
||||||
if err_event.isSet() and opt.fail_fast:
|
if err_event.is_set() and opt.fail_fast:
|
||||||
break
|
break
|
||||||
|
|
||||||
sem.acquire()
|
sem.acquire()
|
||||||
@ -562,7 +562,7 @@ later is required to fix a server side protocol bug.
|
|||||||
for project in all_projects:
|
for project in all_projects:
|
||||||
# Check for any errors before running any more tasks.
|
# Check for any errors before running any more tasks.
|
||||||
# ...we'll let existing threads finish, though.
|
# ...we'll let existing threads finish, though.
|
||||||
if err_event.isSet() and opt.fail_fast:
|
if err_event.is_set() and opt.fail_fast:
|
||||||
break
|
break
|
||||||
|
|
||||||
sem.acquire()
|
sem.acquire()
|
||||||
@ -638,7 +638,7 @@ later is required to fix a server side protocol bug.
|
|||||||
sem.release()
|
sem.release()
|
||||||
|
|
||||||
for bare_git in gc_gitdirs.values():
|
for bare_git in gc_gitdirs.values():
|
||||||
if err_event.isSet() and opt.fail_fast:
|
if err_event.is_set() and opt.fail_fast:
|
||||||
break
|
break
|
||||||
sem.acquire()
|
sem.acquire()
|
||||||
t = _threading.Thread(target=GC, args=(bare_git,))
|
t = _threading.Thread(target=GC, args=(bare_git,))
|
||||||
@ -949,7 +949,7 @@ later is required to fix a server side protocol bug.
|
|||||||
_PostRepoFetch(rp, opt.repo_verify)
|
_PostRepoFetch(rp, opt.repo_verify)
|
||||||
if opt.network_only:
|
if opt.network_only:
|
||||||
# bail out now; the rest touches the working tree
|
# bail out now; the rest touches the working tree
|
||||||
if err_event.isSet():
|
if err_event.is_set():
|
||||||
print('\nerror: Exited sync due to fetch errors.\n', file=sys.stderr)
|
print('\nerror: Exited sync due to fetch errors.\n', file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return
|
return
|
||||||
@ -976,7 +976,7 @@ later is required to fix a server side protocol bug.
|
|||||||
fetched.update(self._Fetch(missing, opt, err_event))
|
fetched.update(self._Fetch(missing, opt, err_event))
|
||||||
|
|
||||||
# If we saw an error, exit with code 1 so that other scripts can check.
|
# If we saw an error, exit with code 1 so that other scripts can check.
|
||||||
if err_event.isSet():
|
if err_event.is_set():
|
||||||
err_network_sync = True
|
err_network_sync = True
|
||||||
if opt.fail_fast:
|
if opt.fail_fast:
|
||||||
print('\nerror: Exited sync due to fetch errors.\n'
|
print('\nerror: Exited sync due to fetch errors.\n'
|
||||||
@ -999,7 +999,7 @@ later is required to fix a server side protocol bug.
|
|||||||
|
|
||||||
err_results = []
|
err_results = []
|
||||||
self._Checkout(all_projects, opt, err_event, err_results)
|
self._Checkout(all_projects, opt, err_event, err_results)
|
||||||
if err_event.isSet():
|
if err_event.is_set():
|
||||||
err_checkout = True
|
err_checkout = True
|
||||||
# NB: We don't exit here because this is the last step.
|
# NB: We don't exit here because this is the last step.
|
||||||
|
|
||||||
@ -1009,7 +1009,7 @@ later is required to fix a server side protocol bug.
|
|||||||
print(self.manifest.notice)
|
print(self.manifest.notice)
|
||||||
|
|
||||||
# If we saw an error, exit with code 1 so that other scripts can check.
|
# If we saw an error, exit with code 1 so that other scripts can check.
|
||||||
if err_event.isSet():
|
if err_event.is_set():
|
||||||
print('\nerror: Unable to fully sync the tree.', file=sys.stderr)
|
print('\nerror: Unable to fully sync the tree.', file=sys.stderr)
|
||||||
if err_network_sync:
|
if err_network_sync:
|
||||||
print('error: Downloading network changes failed.', file=sys.stderr)
|
print('error: Downloading network changes failed.', file=sys.stderr)
|
||||||
|
Loading…
Reference in New Issue
Block a user