diff hgext/mq.py @ 14260:00a881581400

patch: make patch()/internalpatch() always update the dirstate
author Patrick Mezard <pmezard@gmail.com>
date Sun, 08 May 2011 17:48:31 +0200
parents df9ccd39828c
children 6332c02b3d68
line wrap: on
line diff
--- a/hgext/mq.py	Sun May 08 17:48:30 2011 +0200
+++ b/hgext/mq.py	Sun May 08 17:48:31 2011 +0200
@@ -614,17 +614,14 @@
         patchfile: name of patch file'''
         files = {}
         try:
-            try:
-                fuzz = patchmod.patch(patchfile, self.ui, strip=1,
-                                      cwd=repo.root, files=files, eolmode=None)
-            finally:
-                files = patchmod.updatedir(self.ui, repo, files)
-            return (True, files, fuzz)
+            fuzz = patchmod.patch(self.ui, repo, patchfile, strip=1,
+                                  cwd=repo.root, files=files, eolmode=None)
+            return (True, list(files), fuzz)
         except Exception, inst:
             self.ui.note(str(inst) + '\n')
             if not self.ui.verbose:
                 self.ui.warn(_("patch failed, unable to continue (try -v)\n"))
-            return (False, files, False)
+            return (False, list(files), False)
 
     def apply(self, repo, series, list=False, update_status=True,
               strict=False, patchdir=None, merge=None, all_files=None):