[Request] [+ ] D8589: metadata: filter the `removed` set to only contains relevant data
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed May 27 13:17:14 UTC 2020
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8589
AFFECTED FILES
mercurial/metadata.py
CHANGE DETAILS
diff --git a/mercurial/metadata.py b/mercurial/metadata.py
--- a/mercurial/metadata.py
+++ b/mercurial/metadata.py
@@ -94,6 +94,9 @@
for f in ctx.files():
if f not in ctx:
removed.append(f)
+ if removed:
+ rf = get_removal_filter(ctx)
+ removed = [r for r in removed if not rf(r)]
return removed
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200527/be7fd185/attachment.html>
More information about the Mercurial-patches
mailing list