Commit 9977a2e0 authored by maruel@chromium.org's avatar maruel@chromium.org

Add git cl comments to read rietveld comments without having to use the rietveld UI

R=cmp@chromium.org
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10540035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140865 0039d316-1c4b-4281-b951-d872f2087c98
parent db9b0e3a
...@@ -868,6 +868,22 @@ def CMDissue(parser, args): ...@@ -868,6 +868,22 @@ def CMDissue(parser, args):
return 0 return 0
def CMDcomments(parser, args):
"""show review comments of the current changelist"""
(_, args) = parser.parse_args(args)
if args:
parser.error('Unsupported argument: %s' % args)
cl = Changelist()
if cl.GetIssue():
data = cl.RpcServer().get_issue_properties(cl.GetIssue(), True)
for message in sorted(data['messages'], key=lambda x: x['date']):
print '\n%s %s' % (message['date'].split('.', 1)[0], message['sender'])
if message['text'].strip():
print '\n'.join(' ' + l for l in message['text'].splitlines())
return 0
def CreateDescriptionFromLog(args): def CreateDescriptionFromLog(args):
"""Pulls out the commit log to use as a base for the CL description.""" """Pulls out the commit log to use as a base for the CL description."""
log_args = [] log_args = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment