From: Catalin Marinas Date: Wed, 16 Sep 2009 12:59:47 +0000 (+0100) Subject: Remove the 'fail_dump' argument to git.apply_patch() X-Git-Tag: v0.15-rc4~13 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/b56d87814e5986a03efa9079d482a5b020141794?ds=inline Remove the 'fail_dump' argument to git.apply_patch() Since we have a 'reject' argument, there is no need for the failed diff to be dumped. Signed-off-by: Catalin Marinas --- diff --git a/stgit/git.py b/stgit/git.py index 012e282..97b1e96 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -818,7 +818,7 @@ def repack(): GRun('repack', '-a', '-d', '-f').run() def apply_patch(filename = None, diff = None, base = None, - fail_dump = True, reject = False, strip = None): + reject = False, strip = None): """Apply a patch onto the current or given index. There must not be any local changes in the tree, otherwise the command fails """ @@ -847,14 +847,7 @@ def apply_patch(filename = None, diff = None, base = None, except GitRunException: if base: switch(orig_head) - if fail_dump: - # write the failed diff to a file - f = file('.stgit-failed.patch', 'w+') - f.write(diff) - f.close() - out.warn('Diff written to the .stgit-failed.patch file') - - raise + raise GitException('Diff does not apply cleanly') if base: top = commit(message = 'temporary commit used for applying a patch',