diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-10-31 13:48:01 -0700 |
---|---|---|
committer | Vadim Bendebury <vbendeb@google.com> | 2018-11-05 14:01:05 -0800 |
commit | bd8f658823059a4b5998bea283342f80ae94e4df (patch) | |
tree | ea6ce3a06b93903f7e2ba5d139bab2c3399f179a /project.py | |
parent | 713c5872fb54c8094c0f5fa1523388efd81517cc (diff) | |
download | git-repo-bd8f658823059a4b5998bea283342f80ae94e4df.tar.gz |
Add option for git-repo to support 'silent' uploads
When --ne/--no-emails is added to 'repo upload' command line, gerrit
server will not generate notification emails.
project.py:Project.UploadForReview method is modified to accept a
string recognizable by gerrit to indicate different sets of destination
email addressees, but the upload command line allows only one option -
disable sending emails completely.
Default repo upload behavior is not being changed.
TEST=tried in the Chrome OS repo, observed that patches uploaded with
--ne or --no-emails indeed do not trigger any emails, while
patches uploaded without these command line options still trigger
email notifications.
Change-Id: I0301edec984907aedac277d883bd0e6d3099aedc
Diffstat (limited to 'project.py')
-rwxr-xr-x | project.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -176,6 +176,7 @@ class ReviewableBranch(object): | |||
176 | auto_topic=False, | 176 | auto_topic=False, |
177 | draft=False, | 177 | draft=False, |
178 | private=False, | 178 | private=False, |
179 | notify=None, | ||
179 | wip=False, | 180 | wip=False, |
180 | dest_branch=None, | 181 | dest_branch=None, |
181 | validate_certs=True, | 182 | validate_certs=True, |
@@ -185,6 +186,7 @@ class ReviewableBranch(object): | |||
185 | auto_topic=auto_topic, | 186 | auto_topic=auto_topic, |
186 | draft=draft, | 187 | draft=draft, |
187 | private=private, | 188 | private=private, |
189 | notify=notify, | ||
188 | wip=wip, | 190 | wip=wip, |
189 | dest_branch=dest_branch, | 191 | dest_branch=dest_branch, |
190 | validate_certs=validate_certs, | 192 | validate_certs=validate_certs, |
@@ -1118,6 +1120,7 @@ class Project(object): | |||
1118 | auto_topic=False, | 1120 | auto_topic=False, |
1119 | draft=False, | 1121 | draft=False, |
1120 | private=False, | 1122 | private=False, |
1123 | notify=None, | ||
1121 | wip=False, | 1124 | wip=False, |
1122 | dest_branch=None, | 1125 | dest_branch=None, |
1123 | validate_certs=True, | 1126 | validate_certs=True, |
@@ -1174,6 +1177,8 @@ class Project(object): | |||
1174 | 1177 | ||
1175 | opts = ['r=%s' % p for p in people[0]] | 1178 | opts = ['r=%s' % p for p in people[0]] |
1176 | opts += ['cc=%s' % p for p in people[1]] | 1179 | opts += ['cc=%s' % p for p in people[1]] |
1180 | if notify: | ||
1181 | opts += ['notify=' + notify] | ||
1177 | if private: | 1182 | if private: |
1178 | opts += ['private'] | 1183 | opts += ['private'] |
1179 | if wip: | 1184 | if wip: |