diff options
-rwxr-xr-x | git-bz | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1766,10 +1766,11 @@ def do_apply(*args): if opt == "n": continue else: - applied = do_apply(d_id, { 'do_not_add_url': 1} ) - if applied is None: + try: + applied = do_apply(d_id, { 'do_not_add_url': 1} ) + bugs_applied.extend(applied) + except BaseException: die("\nCannot apply cleanly patches from bug %s. Everything will be left dirty.\ngit bz apply --continue will not continue the process if patches from other bug reports need to be applied." % d_id) - bugs_applied.extend(applied) orig_head = git.rev_parse("HEAD") @@ -1862,8 +1863,7 @@ FIXME: need commit message. for i in range(patches.index(patch) + 1, len(patches)): f.write("%s\n" % patches[i].attach_id) f.close() - print "Patch left in %s" % filename - return None # Better would be to raise an exception + die("Patch left in %s" % filename); os.remove(filename) |