# HG changeset patch # User Pierre-Yves David # Date 1594067873 -7200 # Node ID c068e355cd71b30f5f9a0cb20ff82956b7b14acd # Parent 025ee25b5b2302013013232b7708b2965bc862f7 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 diff -r 025ee25b5b23 -r c068e355cd71 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,