summaryrefslogtreecommitdiff
path: root/util/dependency_updater/main.py
diff options
context:
space:
mode:
authorDaniel Smith <daniel.smith@qt.io>2022-03-07 12:29:22 +0100
committerDaniel Smith <Daniel.Smith@qt.io>2022-03-30 12:08:27 +0000
commite3205793dc15bcc09a49f8080470169c6246a9c5 (patch)
tree867497e22587ea5a232f36533db51275b0efca0c /util/dependency_updater/main.py
parentd192c1e50674ec244e1c2edbbcf41479d91c30b9 (diff)
downloadqtrepotools-e3205793dc15bcc09a49f8080470169c6246a9c5.tar.gz
Have the Submodule Update Utility catch manually merged updates
If a change is manually merged after the utility has marked it as failed, the utility should pick up on this so the round can continue automatically without further user action. This change also updates calls to any() to directly pass an iterator rather than computing a value set through list comprehension. Change-Id: I18a5511de30e92e4276ef596c8ae2011f297dd63 Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Diffstat (limited to 'util/dependency_updater/main.py')
-rw-r--r--util/dependency_updater/main.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/util/dependency_updater/main.py b/util/dependency_updater/main.py
index eaefd60..26f976a 100644
--- a/util/dependency_updater/main.py
+++ b/util/dependency_updater/main.py
@@ -322,11 +322,15 @@ def main():
# Determine how to exit
clear_state = False
- if not any([r.progress for r in config.state_data.values() if
- r.progress < Repo.PROGRESS.DONE.value]):
+ if not any(r.progress < Repo.PROGRESS.DONE for r in config.state_data.values()):
if config.args.simulate:
print("INFO: Done with this round, but not clearing state because --sim was used.")
- elif config.args.pause_on_finish_fail and not config.state_data.get("pause_on_finish_fail"):
+ elif (config.args.pause_on_finish_fail # The args say to pause on failure
+ and not config.state_data.get("pause_on_finish_fail") # And not already paused
+ # And are there any real failures that should cause us to pause.
+ and any(r.progress == Repo.PROGRESS.DONE_FAILED_BLOCKING for r in
+ config.state_data.values())):
+ # Set the flag and report the error.
print(
"Done with this round: Running in Pause On Finish Fail mode. Not resetting state.")
config.state_data["pause_on_finish_fail"] = Repo.Repo(id="pause_on_finish_fail",