Patchwork D8707: commitctx: consider removed as touched

login
register
mail settings
Submitter phabricator
Date July 8, 2020, 8:38 a.m.
Message ID <differential-rev-PHID-DREV-hm2kmipot3bx5scp4lbl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46664/
State Superseded
Headers show

Comments

phabricator - July 8, 2020, 8:38 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8707

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3177,10 +3177,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,