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.
--- 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