Index: gcl.py |
diff --git a/gcl.py b/gcl.py |
index de9e49ca35ba0f80d22a446765aae083c742e614..9da62d9c9c88a1099ed9bf8b526f7b64b60bd9de 100755 |
--- a/gcl.py |
+++ b/gcl.py |
@@ -398,6 +398,11 @@ class ChangeInfo(object): |
As a side effect, this will email everyone associated with the issue.""" |
return self.RpcServer().add_comment(self.issue, comment) |
+ def GetIssueProperties(self, messages=False): |
+ """Returns the issue properties as a JSON-style object. |
+ Can optionally retrieve the messages as well.""" |
+ return self.RpcServer().get_issue_properties(self.issue, messages) |
+ |
def PrimeLint(self): |
"""Do background work on Rietveld to lint the file so that the results are |
ready when the issue is viewed.""" |
@@ -1045,7 +1050,8 @@ def CMDcommit(change_info, args): |
elif revision: |
change_info.description += "\nCommitted: " + revision |
change_info.CloseIssue() |
- comment = "Committed manually as r%s" % revision |
+ patch_num = len(change_info.GetIssueProperties()['patchsets']) |
M-A Ruel
2013/02/15 22:43:34
I'd be fine with:
change_info.RpcServer().get_issu
iannucci
2013/02/15 23:09:00
Done. (Though it made the test a little (more) awk
M-A Ruel
2013/02/15 23:12:08
As you prefer
|
+ comment = "Committed patch #%d manually as r%s" % (patch_num, revision) |
M-A Ruel
2013/02/15 22:43:34
s/patch/patchset/
iannucci
2013/02/15 23:09:00
Done.
|
comment += ' (presubmit successful).' if not bypassed else '.' |
change_info.AddComment(comment) |
return 0 |
@@ -1111,7 +1117,7 @@ def CMDchange(args): |
"---Repository Root: " + change_info.GetLocalRoot() + "\n" |
"---Paths in this changelist (" + change_info.name + "):\n") |
separator2 = "\n\n---Paths modified but not in any changelist:\n\n" |
- |
+ |
text = (description + separator1 + '\n' + |
'\n'.join([f[0] + f[1] for f in change_info.GetFiles()])) |