changeset 25560:2b2108c35bfc

largefiles: restore the original converter class after lfconvert --to-normal Not sure how much this really matters, but much of the largefiles code that monkey-patches like this restores things when it finishes.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 12 Jun 2015 16:11:42 -0400
parents 521c1a3139c9
children 69e8384a436c
files hgext/largefiles/lfcommands.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Thu Jun 11 13:02:21 2015 -0700
+++ b/hgext/largefiles/lfcommands.py	Fri Jun 12 16:11:42 2015 -0400
@@ -159,8 +159,13 @@
             if missing != 0:
                 raise util.Abort(_("all largefiles must be present locally"))
 
+            orig = convcmd.converter
             convcmd.converter = converter
-            convcmd.convert(ui, src, dest)
+
+            try:
+                convcmd.convert(ui, src, dest)
+            finally:
+                convcmd.converter = orig
         success = True
     finally:
         if tolfile: