# HG changeset patch # User Pierre-Yves David # Date 2023-02-13 22:29:30 # Node ID 9409f2946f16190877cc11c9d30a66bbe76aaa72 # Parent 22cd517bc6b023db56450a1302b403702d270512 dirstate: use `dirstate.change_files` to scope the change in `lfconvert` This is the way. diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -219,7 +219,8 @@ def lfconvert(ui, src, dest, *pats, **op success = True finally: if tolfile: - rdst.dirstate.clear() + with rdst.dirstate.changing_files(rdst): + rdst.dirstate.clear() release(dstlock, dstwlock) if not success: # we failed, remove the new directory