commitctx: more filesremoved assignment closer to removed computation
A small change that makes the code flow clearer.
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/D8704
--- a/mercurial/localrepo.py Mon Jul 06 20:03:30 2020 +0200
+++ b/mercurial/localrepo.py Tue Jul 07 11:16:28 2020 +0200
@@ -3164,6 +3164,9 @@
rf = metadata.get_removal_filter(ctx, (p1, p2, m1, m2))
removed = [f for f in removed if not rf(f)]
+ if writechangesetcopy:
+ filesremoved = removed
+
files = changed + removed
md = None
if not files:
@@ -3194,9 +3197,6 @@
drop,
match=self.narrowmatch(),
)
-
- if writechangesetcopy:
- filesremoved = removed
else:
self.ui.debug(
b'reusing manifest from p1 (listed files '