commitctx: consider removed as touched
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 06 Jul 2020 22:37:53 +0200
changeset 45196 c068e355cd71
parent 45195 025ee25b5b23
child 45197 55464c0b3a89
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
mercurial/localrepo.py
--- 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,