From 07a952a2a303ef99c3032f2d172c7eb1a1392c3c Mon Sep 17 00:00:00 2001 From: Dong Lin Date: Tue, 22 Jul 2014 11:39:50 -0700 Subject: [PATCH] KAFKA-1550 Patch review tool should use git format-patch to generate patch (version 2) --- kafka-patch-review.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kafka-patch-review.py b/kafka-patch-review.py index dc45549..fdb33fc 100644 --- a/kafka-patch-review.py +++ b/kafka-patch-review.py @@ -105,11 +105,13 @@ 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) -- 1.7.12.4