diff hgext/largefiles/lfcommands.py @ 48168:df3021c1f093

largefiles: pass current transaction to `lfdirstate.write()` Right now, the largefile dirstate is not included in transaction which makes things complex. Next patch will add code to do so, so let's make it mandatory to pass current transaction and pass from all existing callers. Differential Revision: https://phab.mercurial-scm.org/D11610
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Jul 2021 04:11:08 +0530
parents 5ced12cfa41b
children 6000f5b25c9b
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Thu Oct 07 10:23:57 2021 -0400
+++ b/hgext/largefiles/lfcommands.py	Mon Jul 19 04:11:08 2021 +0530
@@ -569,7 +569,7 @@
                         removed += 1
 
         # largefile processing might be slow and be interrupted - be prepared
-        lfdirstate.write()
+        lfdirstate.write(repo.currenttransaction())
 
         if lfiles:
             lfiles = [f for f in lfiles if f not in dropped]
@@ -619,7 +619,7 @@
 
                 lfutil.synclfdirstate(repo, lfdirstate, lfile, normallookup)
 
-        lfdirstate.write()
+        lfdirstate.write(repo.currenttransaction())
         if lfiles:
             statuswriter(
                 _(b'%d largefiles updated, %d removed\n') % (updated, removed)