comparison hgext/largefiles/lfcommands.py @ 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 b8fd605b0c88
children 328739ea70c3
comparison
equal deleted inserted replaced
25559:521c1a3139c9 25560:2b2108c35bfc
157 157
158 found, missing = downloadlfiles(ui, rsrc) 158 found, missing = downloadlfiles(ui, rsrc)
159 if missing != 0: 159 if missing != 0:
160 raise util.Abort(_("all largefiles must be present locally")) 160 raise util.Abort(_("all largefiles must be present locally"))
161 161
162 orig = convcmd.converter
162 convcmd.converter = converter 163 convcmd.converter = converter
163 convcmd.convert(ui, src, dest) 164
165 try:
166 convcmd.convert(ui, src, dest)
167 finally:
168 convcmd.converter = orig
164 success = True 169 success = True
165 finally: 170 finally:
166 if tolfile: 171 if tolfile:
167 rdst.dirstate.clear() 172 rdst.dirstate.clear()
168 release(dstlock, dstwlock) 173 release(dstlock, dstwlock)