Revert "Remove rietveld.cc to test removing all reitveld config sttuff."
This reverts commit 8c5174b5276efa6375b3ff2f97ce2dab66ee335f.
Reason for revert: Need to replace this before removing.
Original change's description:
> Remove rietveld.cc to test removing all reitveld config sttuff.
>
> Bug:b/266001713
> Change-Id: Ib5342e7519d7f7eaccf0a0a6f4a39c13677406bb
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4178919
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Joanna Wang <jojwang@chromium.org>
Bug: b/266001713
Change-Id: Ief110063e7146f045df669ec138c4f01eccc44d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4182421
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 47c52df..a1bbbeb 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -807,6 +807,9 @@
'rietveld.run-post-upload-hook')
return run_post_upload_hook == "True"
+ def GetDefaultCCList(self):
+ return self._GetConfig('rietveld.cc')
+
def GetUsePython3(self):
return self._GetConfig('rietveld.use-python3')
@@ -1063,7 +1066,9 @@
flag.
"""
if self.cc is None:
- self.cc = ','.join(filter(None, self.more_cc)) or ''
+ base_cc = settings.GetDefaultCCList()
+ more_cc = ','.join(self.more_cc)
+ self.cc = ','.join(filter(None, (base_cc, more_cc))) or ''
return self.cc
def ExtendCC(self, more_cc):
@@ -2533,7 +2538,7 @@
reviewers = sorted(change_desc.get_reviewers())
cc = []
- # Add CCs from WATCHLISTS and git config unless this is
+ # Add CCs from WATCHLISTS and rietveld.cc git config unless this is
# the initial upload, the CL is private, or auto-CCing has ben disabled.
if not (self.GetIssue() or options.private or options.no_autocc):
cc = self.GetCCList().split(',')
@@ -3197,6 +3202,7 @@
SetProperty('server', 'CODE_REVIEW_SERVER')
# Only server setting is required. Other settings can be absent.
# In that case, we ignore errors raised during option deletion attempt.
+ SetProperty('cc', 'CC_LIST', unset_error_ok=True)
SetProperty('tree-status-url', 'STATUS', unset_error_ok=True)
SetProperty('viewvc-url', 'VIEW_VC', unset_error_ok=True)
SetProperty('bug-prefix', 'BUG_PREFIX', unset_error_ok=True)