changeset 50051:9409f2946f16

dirstate: use `dirstate.change_files` to scope the change in `lfconvert` This is the way.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 13 Feb 2023 23:29:30 +0100
parents 22cd517bc6b0
children 1b044a63a98a
files hgext/largefiles/lfcommands.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Sun Feb 05 12:09:52 2023 +0100
+++ b/hgext/largefiles/lfcommands.py	Mon Feb 13 23:29:30 2023 +0100
@@ -219,7 +219,8 @@
         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