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
--- 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,