changeset 14258:50e3fb2ab9fa

record: unconditionally update the working dir after patching
author Patrick Mezard <pmezard@gmail.com>
date Sun, 08 May 2011 17:48:29 +0200
parents d035ede73434
children df9ccd39828c
files hgext/record.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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