mirror of
https://git.codelinaro.org/clo/tools/repo.git
synced 2025-08-06 05:35:03 +08:00
Support --push-option in upload subcommand
Change-Id: I44836f8c66ded5a96cbf5431912e027e681f6529
This commit is contained in:
13
project.py
13
project.py
@ -180,7 +180,8 @@ class ReviewableBranch(object):
|
||||
private=False,
|
||||
wip=False,
|
||||
dest_branch=None,
|
||||
validate_certs=True):
|
||||
validate_certs=True,
|
||||
push_options=None):
|
||||
self.project.UploadForReview(self.name,
|
||||
people,
|
||||
auto_topic=auto_topic,
|
||||
@ -188,7 +189,8 @@ class ReviewableBranch(object):
|
||||
private=private,
|
||||
wip=wip,
|
||||
dest_branch=dest_branch,
|
||||
validate_certs=validate_certs)
|
||||
validate_certs=validate_certs,
|
||||
push_options=push_options)
|
||||
|
||||
def GetPublishedRefs(self):
|
||||
refs = {}
|
||||
@ -1117,7 +1119,8 @@ class Project(object):
|
||||
private=False,
|
||||
wip=False,
|
||||
dest_branch=None,
|
||||
validate_certs=True):
|
||||
validate_certs=True,
|
||||
push_options=None):
|
||||
"""Uploads the named branch for code review.
|
||||
"""
|
||||
if branch is None:
|
||||
@ -1155,6 +1158,10 @@ class Project(object):
|
||||
rp.append('--cc=%s' % sq(e))
|
||||
cmd.append('--receive-pack=%s' % " ".join(rp))
|
||||
|
||||
for push_option in (push_options or []):
|
||||
cmd.append('-o')
|
||||
cmd.append(push_option)
|
||||
|
||||
cmd.append(url)
|
||||
|
||||
if dest_branch.startswith(R_HEADS):
|
||||
|
Reference in New Issue
Block a user