changeset 50116:9b49809eb612

large-files: make sure we write newly initialized standin file early Any changing context will have to initialized it before anything else. Not flushing the default (pre-change) content mean we would enter the changing context with a dirty dirstate, which is odd.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 21 Feb 2023 03:22:51 +0100
parents 62f633f751a4
children 3433723d1b9b
files hgext/largefiles/lfutil.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Mon Feb 20 14:06:15 2023 +0100
+++ b/hgext/largefiles/lfutil.py	Tue Feb 21 03:22:51 2023 +0100
@@ -249,6 +249,8 @@
                         wc_tracked=True,
                         possibly_dirty=True,
                     )
+                # avoid getting dirty dirstate before other operations
+                lfdirstate.write(repo.currenttransaction())
         except error.LockError:
             # Assume that whatever was holding the lock was important.
             # If we were doing something important, we would already have