commitctx: create the `ChangingFiles` object sooner
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 29 Jul 2020 16:48:31 +0200
changeset 45330 a852e5058e69
parent 45329 dcbad0f17d76
child 45331 027f3dd76302
commitctx: create the `ChangingFiles` object sooner Let us change the `_commit_manifest` call before other changes.
mercurial/commit.py
--- a/mercurial/commit.py	Sat Jul 25 16:34:02 2020 +0200
+++ b/mercurial/commit.py	Wed Jul 29 16:48:31 2020 +0200
@@ -202,12 +202,10 @@
 
     touched.extend(removed)
 
-    files = touched
-    mn = _commit_manifest(tr, linkrev, ctx, mctx, m, files, added, drop)
-
     files = metadata.ChangingFiles(
-        touched=files, added=filesadded, removed=removed
+        touched=touched, added=filesadded, removed=removed
     )
+    mn = _commit_manifest(tr, linkrev, ctx, mctx, m, files.touched, added, drop)
 
     return mn, files