mercurial/commands.py
changeset 3460 2d35a8d2b32d
parent 3455 10b6fc51f672
child 3462 2b3b703b3a2b
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1656,8 +1656,12 @@ def import_(ui, repo, patch1, *patches, 
                 message = None
             ui.debug(_('message:\n%s\n') % message)
 
-            files, fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root)
-            files = patch.updatedir(ui, repo, files, wlock=wlock)
+            files = {}
+            try:
+                fuzz = patch.patch(tmpname, ui, strip=strip, cwd=repo.root,
+                                   files=files)
+            finally:
+                files = patch.updatedir(ui, repo, files, wlock=wlock)
             repo.commit(files, message, user, date, wlock=wlock, lock=lock)
         finally:
             os.unlink(tmpname)