upload: Return correct tuple values in _ProcessResults
Incorrect tuple values were returned with http://go/grev/440221 -
instead of returning (Project, ReviewableBranch), _ProcessResults was
returning (int, ReviewableBranch).
R=jojwang@google.com
Bug: 376731172
Change-Id: I75205f42fd23f5ee6bd8d0c15b18066189b42bd9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/441121
Reviewed-by: Sam Saccone <samccone@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Tested-by: Josip Sokcevic <sokcevic@google.com>
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 9b77b0e..bac2f8a 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -737,8 +737,8 @@
pending = []
for result in results:
project_idx, avail = result
+ project = projects[project_idx]
if avail is None:
- project = projects[project_idx]
logger.error(
'repo: error: %s: Unable to upload branch "%s". '
"You might be able to fix the branch by running:\n"
@@ -748,7 +748,7 @@
project.manifest.branch,
)
elif avail:
- pending.append(result)
+ pending.append((project, avail))
return pending
with self.ParallelContext():