diff options
| author | Changcheng Xiao <xchangcheng@google.com> | 2017-08-02 16:55:03 +0200 |
|---|---|---|
| committer | Changcheng Xiao <xchangcheng@google.com> | 2017-08-07 15:02:39 +0200 |
| commit | 87984c6db4962043c2b9e5a5a4a30eaf6d066077 (patch) | |
| tree | ab8bb74e27b845419ef57048044d758ff3eb1d3f /project.py | |
| parent | ffc1401327b8240badd6fc62c6f85beca0350b44 (diff) | |
| download | git-repo-87984c6db4962043c2b9e5a5a4a30eaf6d066077.tar.gz | |
Add options for git-repo to support private and wip changes
This change adds options for git-repo tool to support private
changes and work-in-progress changes.
Change-Id: I343491f5949f06f1580d53f9cc0dee2dca09130f
Diffstat (limited to 'project.py')
| -rw-r--r-- | project.py | 11 |
1 files changed, 11 insertions, 0 deletions
| @@ -176,11 +176,15 @@ class ReviewableBranch(object): | |||
| 176 | def UploadForReview(self, people, | 176 | def UploadForReview(self, people, |
| 177 | auto_topic=False, | 177 | auto_topic=False, |
| 178 | draft=False, | 178 | draft=False, |
| 179 | private=False, | ||
| 180 | wip=False, | ||
| 179 | dest_branch=None): | 181 | dest_branch=None): |
| 180 | self.project.UploadForReview(self.name, | 182 | self.project.UploadForReview(self.name, |
| 181 | people, | 183 | people, |
| 182 | auto_topic=auto_topic, | 184 | auto_topic=auto_topic, |
| 183 | draft=draft, | 185 | draft=draft, |
| 186 | private=private, | ||
| 187 | wip=wip, | ||
| 184 | dest_branch=dest_branch) | 188 | dest_branch=dest_branch) |
| 185 | 189 | ||
| 186 | def GetPublishedRefs(self): | 190 | def GetPublishedRefs(self): |
| @@ -1107,6 +1111,8 @@ class Project(object): | |||
| 1107 | people=([], []), | 1111 | people=([], []), |
| 1108 | auto_topic=False, | 1112 | auto_topic=False, |
| 1109 | draft=False, | 1113 | draft=False, |
| 1114 | private=False, | ||
| 1115 | wip=False, | ||
| 1110 | dest_branch=None): | 1116 | dest_branch=None): |
| 1111 | """Uploads the named branch for code review. | 1117 | """Uploads the named branch for code review. |
| 1112 | """ | 1118 | """ |
| @@ -1158,9 +1164,14 @@ class Project(object): | |||
| 1158 | dest_branch) | 1164 | dest_branch) |
| 1159 | if auto_topic: | 1165 | if auto_topic: |
| 1160 | ref_spec = ref_spec + '/' + branch.name | 1166 | ref_spec = ref_spec + '/' + branch.name |
| 1167 | |||
| 1161 | if not url.startswith('ssh://'): | 1168 | if not url.startswith('ssh://'): |
| 1162 | rp = ['r=%s' % p for p in people[0]] + \ | 1169 | rp = ['r=%s' % p for p in people[0]] + \ |
| 1163 | ['cc=%s' % p for p in people[1]] | 1170 | ['cc=%s' % p for p in people[1]] |
| 1171 | if private: | ||
| 1172 | rp = rp + ['private'] | ||
| 1173 | if wip: | ||
| 1174 | rp = rp + ['wip'] | ||
| 1164 | if rp: | 1175 | if rp: |
| 1165 | ref_spec = ref_spec + '%' + ','.join(rp) | 1176 | ref_spec = ref_spec + '%' + ','.join(rp) |
| 1166 | cmd.append(ref_spec) | 1177 | cmd.append(ref_spec) |
