record: unconditionally update the working dir after patching
authorPatrick Mezard <pmezard@gmail.com>
Sun, 08 May 2011 17:48:29 +0200
changeset 14258 50e3fb2ab9fa
parent 14257 d035ede73434
child 14259 df9ccd39828c
record: unconditionally update the working dir after patching
hgext/record.py
--- a/hgext/record.py	Sun May 08 17:48:29 2011 +0200
+++ b/hgext/record.py	Sun May 08 17:48:29 2011 +0200
@@ -478,9 +478,11 @@
                     ui.debug('applying patch\n')
                     ui.debug(fp.getvalue())
                     pfiles = {}
-                    patch.internalpatch(fp, ui, 1, repo.root, files=pfiles,
-                                        eolmode=None)
-                    cmdutil.updatedir(ui, repo, pfiles)
+                    try:
+                        patch.internalpatch(fp, ui, 1, repo.root, files=pfiles,
+                                            eolmode=None)
+                    finally:
+                        cmdutil.updatedir(ui, repo, pfiles)
                 except patch.PatchError, err:
                     raise util.Abort(str(err))
             del fp