summaryrefslogtreecommitdiffstats
path: root/subcmds/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r--subcmds/upload.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index bac2f8ac..4f817ddf 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -267,7 +267,6 @@ Gerrit Code Review: https://www.gerritcodereview.com/
267 "--cc", 267 "--cc",
268 type="string", 268 type="string",
269 action="append", 269 action="append",
270 dest="cc",
271 help="also send email to these email addresses", 270 help="also send email to these email addresses",
272 ) 271 )
273 p.add_option( 272 p.add_option(
@@ -281,7 +280,6 @@ Gerrit Code Review: https://www.gerritcodereview.com/
281 p.add_option( 280 p.add_option(
282 "-c", 281 "-c",
283 "--current-branch", 282 "--current-branch",
284 dest="current_branch",
285 action="store_true", 283 action="store_true",
286 help="upload current git branch", 284 help="upload current git branch",
287 ) 285 )
@@ -310,7 +308,6 @@ Gerrit Code Review: https://www.gerritcodereview.com/
310 "-p", 308 "-p",
311 "--private", 309 "--private",
312 action="store_true", 310 action="store_true",
313 dest="private",
314 default=False, 311 default=False,
315 help="upload as a private change (deprecated; use --wip)", 312 help="upload as a private change (deprecated; use --wip)",
316 ) 313 )
@@ -318,7 +315,6 @@ Gerrit Code Review: https://www.gerritcodereview.com/
318 "-w", 315 "-w",
319 "--wip", 316 "--wip",
320 action="store_true", 317 action="store_true",
321 dest="wip",
322 default=False, 318 default=False,
323 help="upload as a work-in-progress change", 319 help="upload as a work-in-progress change",
324 ) 320 )
@@ -628,6 +624,16 @@ Gerrit Code Review: https://www.gerritcodereview.com/
628 branch.uploaded = False 624 branch.uploaded = False
629 return 625 return
630 626
627 # If using superproject, add the root repo as a push option.
628 manifest = branch.project.manifest
629 push_options = list(opt.push_options)
630 if manifest.manifestProject.use_superproject:
631 sp = manifest.superproject
632 if sp:
633 r_id = sp.repo_id
634 if r_id:
635 push_options.append(f"custom-keyed-value=rootRepo:{r_id}")
636
631 branch.UploadForReview( 637 branch.UploadForReview(
632 people, 638 people,
633 dryrun=opt.dryrun, 639 dryrun=opt.dryrun,
@@ -640,7 +646,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/
640 ready=opt.ready, 646 ready=opt.ready,
641 dest_branch=destination, 647 dest_branch=destination,
642 validate_certs=opt.validate_certs, 648 validate_certs=opt.validate_certs,
643 push_options=opt.push_options, 649 push_options=push_options,
644 patchset_description=opt.patchset_description, 650 patchset_description=opt.patchset_description,
645 ) 651 )
646 652