diff hgext/largefiles/lfutil.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 6f54afb094bd
children 1e98f9b5bc71
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Thu Oct 07 10:23:57 2021 -0400
+++ b/hgext/largefiles/lfutil.py	Mon Jul 19 04:11:08 2021 +0530
@@ -191,7 +191,7 @@
     def _ignore(self, f):
         return False
 
-    def write(self, tr=False):
+    def write(self, tr):
         # (1) disable PENDING mode always
         #     (lfdirstate isn't yet managed as a part of the transaction)
         # (2) avoid develwarn 'use dirstate.write with ....'
@@ -588,7 +588,7 @@
             lfile = splitstandin(f)
             if lfile is not None:
                 synclfdirstate(repo, lfdirstate, lfile, False)
-    lfdirstate.write()
+    lfdirstate.write(repo.currenttransaction())
 
     # As part of committing, copy all of the largefiles into the cache.
     #