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

login
register
mail settings
Submitter Pierre-Yves David
Date July 29, 2020, 4:57 p.m.
Message ID <d1faf95bdf57bf8d1054.1596041863@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/46924/
State Accepted
Headers show

Comments

Pierre-Yves David - July 29, 2020, 4:57 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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