diff options
author | Catalin Marinas <catalin.marinas@gmail.com> | 2009-09-16 13:59:47 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@gmail.com> | 2009-09-16 13:59:47 +0100 |
commit | b56d87814e5986a03efa9079d482a5b020141794 (patch) | |
tree | d63e302c67ef3f7310a55d60ac8315fa2a9c8e96 | |
parent | 8bad45199fc55501b9d9636a238d15482f434609 (diff) | |
download | stgit-b56d87814e5986a03efa9079d482a5b020141794.tar.gz |
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 <catalin.marinas@gmail.com>
-rw-r--r-- | stgit/git.py | 11 |
1 files changed, 2 insertions, 9 deletions
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', |