dirstate: rename the filegenerator used for writing
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 31 Jan 2022 14:26:35 +0100
changeset 48683 111f5a0cbcaa
parent 48682 cdb0d857afe2
child 48684 568f63b5a30f
dirstate: rename the filegenerator used for writing We will need a different name in the next changesets. Changing the name is actually not that trivial so we do it in its own changeset. Differential Revision: https://phab.mercurial-scm.org/D12123
mercurial/dirstate.py
mercurial/transaction.py
--- a/mercurial/dirstate.py	Mon Jan 31 08:23:54 2022 +0100
+++ b/mercurial/dirstate.py	Mon Jan 31 14:26:35 2022 +0100
@@ -706,7 +706,7 @@
         if tr:
             # delay writing in-memory changes out
             tr.addfilegenerator(
-                b'dirstate',
+                b'dirstate-1-main',
                 (self._filename,),
                 lambda f: self._writedirstate(tr, f),
                 location=b'plain',
@@ -1374,7 +1374,7 @@
             # changes written out above, even if dirstate is never
             # changed after this
             tr.addfilegenerator(
-                b'dirstate',
+                b'dirstate-1-main',
                 (self._filename,),
                 lambda f: self._writedirstate(tr, f),
                 location=b'plain',
--- a/mercurial/transaction.py	Mon Jan 31 08:23:54 2022 +0100
+++ b/mercurial/transaction.py	Mon Jan 31 14:26:35 2022 +0100
@@ -28,7 +28,10 @@
 # These are the file generators that should only be executed after the
 # finalizers are done, since they rely on the output of the finalizers (like
 # the changelog having been written).
-postfinalizegenerators = {b'bookmarks', b'dirstate'}
+postfinalizegenerators = {
+    b'bookmarks',
+    b'dirstate-1-main',
+}
 
 GEN_GROUP_ALL = b'all'
 GEN_GROUP_PRE_FINALIZE = b'prefinalize'