diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-15 11:46:43 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-16 13:01:10 +0200 |
commit | d0a9a6533932b5eaa7e8f3b63edd7eb706084342 (patch) | |
tree | 8ec008aaae58deb304ac98cef26554c9f4ea3466 /src | |
parent | 4ce6aaf3bc589db5527c31c69553bc51bab08c46 (diff) |
Fix re-trying of updates
The gerrit status can be "open" but more likely "new", and we have to
keep the update pending.
Change-Id: I186d2c88daff727abfbeb9f332267a98cbb45acf
Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qtmoduleupdater/moduleupdatebatch.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qtmoduleupdater/moduleupdatebatch.go b/src/qtmoduleupdater/moduleupdatebatch.go index 14d19c75..e779847a 100644 --- a/src/qtmoduleupdater/moduleupdatebatch.go +++ b/src/qtmoduleupdater/moduleupdatebatch.go @@ -132,12 +132,13 @@ func (batch *ModuleUpdateBatch) checkPendingModules(gerrit *gerritInstance) { } else if status == "MERGED" { module.refreshTip() batch.Done[module.RepoPath] = module - } else if status == "OPEN" && len(pendingUpdate.CommitID) > 0 && pendingUpdate.IntegrationAttempts < 3 { + } else if (status == "NEW" || status == "OPEN") && len(pendingUpdate.CommitID) > 0 && pendingUpdate.IntegrationAttempts < 3 { log.Printf(" %v integration attempts for %s - trying again\n", pendingUpdate.IntegrationAttempts, module.RepoPath) pendingUpdate.IntegrationAttempts++ if err = gerrit.reviewAndStageChange(module.RepoPath, module.Branch, pendingUpdate.CommitID, ""); err != nil { log.Printf("error staging change update: %s -- ignoring though", err) } + newPending = append(newPending, pendingUpdate) } else { // Abandoned or tried too many times possibly -- either way an error integrating the update removeAllDirectAndIndirectDependencies(&batch.Todo, module.RepoPath) |