From ac98e29f58b6caa07e685d6acd277aad9aa8182b Mon Sep 17 00:00:00 2001 From: "dtseng@chromium.org" Date: Mon, 13 Jan 2014 17:48:49 +0000 Subject: [PATCH] Add an "add_inline_comment" method to rietveld.py With the addition of this method, rietveld.py can be used to create cli-based tools to review Chromium code. BUG=none Review URL: https://codereview.chromium.org/127083003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244529 0039d316-1c4b-4281-b951-d872f2087c98 --- rietveld.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rietveld.py b/rietveld.py index 7e476fb6d..5528c551a 100644 --- a/rietveld.py +++ b/rietveld.py @@ -253,6 +253,18 @@ class Rietveld(object): ('send_mail', 'True'), ('no_redirect', 'True')]) + def add_inline_comment( + self, issue, text, side, snapshot, patchset, patchid, lineno): + logging.info('add inline comment for issue %d' % issue) + return self.post('/inline_draft', [ + ('issue', str(issue)), + ('text', text), + ('side', side), + ('snapshot', snapshot), + ('patchset', str(patchset)), + ('patch', str(patchid)), + ('lineno', str(lineno))]) + def set_flag(self, issue, patchset, flag, value): return self.post('/%d/edit_flags' % issue, [ ('last_patchset', str(patchset)),