comparison mercurial/metadata.py @ 44942:25512a65cefd

metadata: filter the `removed` set to only contains relevant data The `files` entry can be bogus and contains too many entries. This can badly combines with the computation of `removed` inflating the set size. The can lead to the changesets centric rename computation to process much more data than needed, slowing it down (and increasing space taken by data storage). In practice newer commits already that reduced set, this applies this "fix" to older changeset. Differential Revision: https://phab.mercurial-scm.org/D8589
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 May 2020 12:56:13 +0200
parents edd08aa193fb
children aea6a812f7cb
comparison
equal deleted inserted replaced
44941:edd08aa193fb 44942:25512a65cefd
92 """ 92 """
93 removed = [] 93 removed = []
94 for f in ctx.files(): 94 for f in ctx.files():
95 if f not in ctx: 95 if f not in ctx:
96 removed.append(f) 96 removed.append(f)
97 if removed:
98 rf = get_removal_filter(ctx)
99 removed = [r for r in removed if not rf(r)]
97 return removed 100 return removed
98 101
99 102
100 def computechangesetcopies(ctx): 103 def computechangesetcopies(ctx):
101 """return the copies data for a changeset 104 """return the copies data for a changeset