diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -159,8 +159,13 @@ def lfconvert(ui, src, dest, *pats, **op 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: