From 75bed39f2a79673eda63b5292af0ee79587b1e1f Mon Sep 17 00:00:00 2001 From: Dong Lin Date: Fri, 18 Jul 2014 13:56:45 -0700 Subject: [PATCH] KAFKA-1550 Patch review tool should use git format-patch to generate patch --- kafka-patch-review.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kafka-patch-review.py b/kafka-patch-review.py index dc45549..c60c784 100644 --- a/kafka-patch-review.py +++ b/kafka-patch-review.py @@ -105,17 +105,19 @@ def main(): print 'ERROR: Your reviewboard was not created/updated. Please run the script with the --debug option to troubleshoot the problem' p.close() sys.exit(1) - p.close() + if p.close() != None: + print 'ERROR: reviewboard update fails. Exit now.' + sys.exit(1) if opt.debug: print 'rb url=',rb_url - git_command="git diff " + opt.branch + " > " + patch_file + git_command="git format-patch " + opt.branch + " --stdout > " + patch_file if opt.debug: print git_command p=os.popen(git_command) p.close() - print 'Creating diff against', opt.branch, 'and uploading patch to JIRA',opt.jira + print 'Creating formatted patch against', opt.branch, 'and uploading patch to JIRA',opt.jira jira=get_jira() issue = jira.issue(opt.jira) attachment=open(patch_file) -- 1.7.12.4