changeset 45230:6979a20ff004

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 07 Jul 2020 11:16:28 +0200
parents e64c35dfc6cb
children 025ee25b5b23
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 '