changeset 45232:c068e355cd71

commitctx: consider removed as touched This achieve the same result with clearer code. This is part of a larger refactoring/cleanup of the commitctx code to clarify and augment the logic gathering metadata useful for copy tracing. The current code is a tad too long and entangled to make such update easy. We start with easy and small cleanup. Differential Revision: https://phab.mercurial-scm.org/D8707
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 06 Jul 2020 22:37:53 +0200
parents 025ee25b5b23
children 55464c0b3a89
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Jul 06 22:35:34 2020 +0200
+++ b/mercurial/localrepo.py	Mon Jul 06 22:37:53 2020 +0200
@@ -3164,10 +3164,12 @@
                     rf = metadata.get_removal_filter(ctx, (p1, p2, m1, m2))
                     removed = [f for f in removed if not rf(f)]
 
+                touched.extend(removed)
+
                 if writechangesetcopy:
                     filesremoved = removed
 
-                files = touched + removed
+                files = touched
                 md = None
                 if not files:
                     # if no "files" actually changed in terms of the changelog,