git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Catalin Marinas <catalin.marinas@gmail.com>
To: "Karl Hasselström" <kha@treskal.com>, git@vger.kernel.org
Subject: [StGit PATCH 1/5] Remove the 'fail_dump' argument to git.apply_patch()
Date: Wed, 16 Sep 2009 22:40:55 +0100	[thread overview]
Message-ID: <20090916214055.6622.96912.stgit@toshiba-laptop> (raw)
In-Reply-To: <20090916214049.6622.44662.stgit@toshiba-laptop>

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>
---
 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',

  reply	other threads:[~2009-09-16 21:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16 21:40 [StGit PATCH 0/5] More UI clean-up Catalin Marinas
2009-09-16 21:40 ` Catalin Marinas [this message]
2009-09-16 21:41 ` [StGit PATCH 2/5] Add the --reject option to fold Catalin Marinas
2009-09-16 21:41 ` [StGit PATCH 3/5] Do not create an empty patch if import failed without --reject Catalin Marinas
2009-09-16 21:41 ` [StGit PATCH 4/5] Add the -p option to fold Catalin Marinas
2009-09-16 21:41 ` [StGit PATCH 5/5] Autosign imported patches Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090916214055.6622.96912.stgit@toshiba-laptop \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).