Index: gcl.py |
diff --git a/gcl.py b/gcl.py |
index 6f0cc744f47071b902247567a3f127ac1be08c33..363dc0c7a8a6b532306790668b3d6b4a07909ba8 100755 |
--- a/gcl.py |
+++ b/gcl.py |
@@ -299,6 +299,9 @@ class ChangeInfo(object): |
def get_reviewers(self): |
return self._desc.get_reviewers() |
+ def update_reviewers(self, reviewers): |
+ self._desc.update_reviewers(reviewers) |
+ |
def NeedsUpload(self): |
return self.needs_upload |
@@ -379,6 +382,11 @@ class ChangeInfo(object): |
self._desc = git_cl.ChangeDescription( |
self.SendToRietveld('/%d/description' % self.issue)) |
+ def GetIssueReviewers(self): |
+ """Returns the issue reviewers list from Rietveld.""" |
+ return git_cl.get_real_reviewers( |
+ self.rietveld.get_issue_properties(self.issue, False)) |
+ |
def AddComment(self, comment): |
"""Adds a comment for an issue on Rietveld. |
As a side effect, this will email everyone associated with the issue.""" |
@@ -991,6 +999,9 @@ def CMDcommit(change_info, args): |
# Get the latest description from Rietveld. |
change_info.UpdateDescriptionFromIssue() |
+ actual_reviewers = ','.join(change_info.GetIssueReviewers()) |
+ change_info.update_reviewers(actual_reviewers) |
+ |
commit_desc = git_cl.ChangeDescription(change_info.description) |
if change_info.issue: |
server = change_info.rietveld |