Mercurial > hg
diff mercurial/commit.py @ 45329:dcbad0f17d76
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 25 Jul 2020 16:34:02 +0200 |
parents | e52031f5e046 |
children | a852e5058e69 |
line wrap: on
line diff
--- a/mercurial/commit.py Sat Jul 25 16:13:32 2020 +0200 +++ b/mercurial/commit.py Sat Jul 25 16:34:02 2020 +0200 @@ -129,13 +129,7 @@ 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 @@ 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(