# HG changeset patch
# User Brendan Cully <brendan@kublai.com>
# Date 2006-08-30 20:42:57
# Node ID 6848528f7ebd6c429e5ed38f0ba2dce8023e21c2
# Parent  efd26ceedafb951f007608d7454ab0e248cd4a3f

Remove temporary git patch files

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -241,9 +241,6 @@ def patch(patchname, ui, strip=1, cwd=No
         fp = os.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
                                            util.shellquote(patchname)))
 
-        if dopatch == 'filter':
-            False and os.unlink(patchname)
-
         for line in fp:
             line = line.rstrip()
             ui.note(line + '\n')
@@ -265,6 +262,9 @@ def patch(patchname, ui, strip=1, cwd=No
                     printed_file = True
                 ui.warn(line + '\n')
             
+        if dopatch == 'filter':
+            os.unlink(patchname)
+
         code = fp.close()
         if code:
             raise util.Abort(_("patch command failed: %s") %