[PATCH 13 of 15] commitctx: create the `ChangingFiles` object sooner

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Jul 29 16:57:43 UTC 2020


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1596034111 -7200
#      Wed Jul 29 16:48:31 2020 +0200
# Node ID d1faf95bdf57bf8d1054b2ea717d24052a7692c1
# Parent  3a8c3c3dcf9dbe0c8c154048ff57ca68193eb9c9
# EXP-Topic files-change
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r d1faf95bdf57
commitctx: create the `ChangingFiles` object sooner

Let us change the `_commit_manifest` call before other changes.

diff --git a/mercurial/commit.py b/mercurial/commit.py
--- a/mercurial/commit.py
+++ b/mercurial/commit.py
@@ -202,12 +202,10 @@ def _process_files(tr, ctx, error=False)
 
     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
 




More information about the Mercurial-devel mailing list