# HG changeset patch # User Pierre-Yves David # Date 2020-07-25 14:34:02 # Node ID dcbad0f17d76c940458e208571c7a00785b28ba8 # Parent e52031f5e046fe1aeb9bf67b638933777a09b816 commitctx: move ChangingFiles creation directly inside `_process_files` As announced, we move it there. We focus on the signature change first, we will update the code afterward. diff --git a/mercurial/commit.py b/mercurial/commit.py --- a/mercurial/commit.py +++ b/mercurial/commit.py @@ -129,13 +129,7 @@ def _prepare_files(tr, ctx, error=False, mn = p1.manifestnode() files = metadata.ChangingFiles() else: - mn, touched, added, removed = _process_files(tr, ctx, error=error) - files = metadata.ChangingFiles() - files.update_touched(touched) - if added: - files.update_added(added) - if removed: - files.update_removed(removed) + mn, files = _process_files(tr, ctx, error=error) if origctx and origctx.manifestnode() == mn: origfiles = origctx.files() @@ -211,7 +205,11 @@ def _process_files(tr, ctx, error=False) files = touched mn = _commit_manifest(tr, linkrev, ctx, mctx, m, files, added, drop) - return mn, files, filesadded, removed + files = metadata.ChangingFiles( + touched=files, added=filesadded, removed=removed + ) + + return mn, files def _filecommit(