diff options
-rw-r--r-- | subcmds/upload.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 526dcd57..e2fa261e 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -89,6 +89,11 @@ to "true" then repo will assume you always answer "y" at the prompt, | |||
89 | and will not prompt you further. If it is set to "false" then repo | 89 | and will not prompt you further. If it is set to "false" then repo |
90 | will assume you always answer "n", and will abort. | 90 | will assume you always answer "n", and will abort. |
91 | 91 | ||
92 | review.URL.autoreviewer: | ||
93 | |||
94 | To automatically append a user or mailing list to reviews, you can set | ||
95 | a per-project or global Git option to do so. | ||
96 | |||
92 | review.URL.autocopy: | 97 | review.URL.autocopy: |
93 | 98 | ||
94 | To automatically copy a user or mailing list to all uploaded reviews, | 99 | To automatically copy a user or mailing list to all uploaded reviews, |
@@ -293,14 +298,20 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
293 | 298 | ||
294 | self._UploadAndReport(opt, todo, people) | 299 | self._UploadAndReport(opt, todo, people) |
295 | 300 | ||
296 | def _AppendAutoCcList(self, branch, people): | 301 | def _AppendAutoList(self, branch, people): |
297 | """ | 302 | """ |
303 | Appends the list of reviewers in the git project's config. | ||
298 | Appends the list of users in the CC list in the git project's config if a | 304 | Appends the list of users in the CC list in the git project's config if a |
299 | non-empty reviewer list was found. | 305 | non-empty reviewer list was found. |
300 | """ | 306 | """ |
301 | |||
302 | name = branch.name | 307 | name = branch.name |
303 | project = branch.project | 308 | project = branch.project |
309 | |||
310 | key = 'review.%s.autoreviewer' % project.GetBranch(name).remote.review | ||
311 | raw_list = project.config.GetString(key) | ||
312 | if not raw_list is None: | ||
313 | people[0].extend([entry.strip() for entry in raw_list.split(',')]) | ||
314 | |||
304 | key = 'review.%s.autocopy' % project.GetBranch(name).remote.review | 315 | key = 'review.%s.autocopy' % project.GetBranch(name).remote.review |
305 | raw_list = project.config.GetString(key) | 316 | raw_list = project.config.GetString(key) |
306 | if not raw_list is None and len(people[0]) > 0: | 317 | if not raw_list is None and len(people[0]) > 0: |
@@ -323,7 +334,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
323 | for branch in todo: | 334 | for branch in todo: |
324 | try: | 335 | try: |
325 | people = copy.deepcopy(original_people) | 336 | people = copy.deepcopy(original_people) |
326 | self._AppendAutoCcList(branch, people) | 337 | self._AppendAutoList(branch, people) |
327 | 338 | ||
328 | # Check if there are local changes that may have been forgotten | 339 | # Check if there are local changes that may have been forgotten |
329 | if branch.project.HasChanges(): | 340 | if branch.project.HasChanges(): |