context: schedule file prefetch before comparing for cleanliness
When using a system like remotefilelog, we can occasionally run into scenarios
where the local content cache does not have the data we need to perform these
comparisons. These will be fetched on-demand, but individually; if the
remotefilelog server isn't extremely low latency, the runtime of the command
becomes dominated by the multiple getfile requests for individual files.
By performing the prefetch, we can download these files in bulk, and save server
resources and many network roundtrips.
Differential Revision: https://phab.mercurial-scm.org/D5532
manifest: convert a recursive function to iterative one using stacks
I am debugging a memory issue from yesterday where `hg update` goes upto taking
22GB of memory on our internal treemanifest repository. This is an interesting
function and I saw memory consumption increasing while this function was
running.
It's sometimes hard to understand a recursive function and also the profile
won't show you actual operations which took time, rather it will show you the
function again and again in profile.
I am yet to notice any memory consumption decrease with this patch, but I
believe this will help like in making this a generator.
Differential Revision: https://phab.mercurial-scm.org/D5413
obsutil: fix the
issue5686
While traversing the obsolescence graph to find the successors sets
of csets:
In its 4th case (read comments of obsutil.successorssets to see
all 4 cases) where we know successors sets of all direct successors
of CURRENT, we were just missing a condition to filter out the case
when a cset is pruned.
And without this condition (that this patch added) it was making a whole
successor set to [] just because of one pruned marker.
For e.g:if following is the successors set of a cset A:
A -> [a, b, c]
if we prune c, we expect A's successors set to be [a, b] but
you would get:
A -> []
So this patch make sure that we calculate the right successorsset of csets
considering the pruned cset (in split case).
Differential Revision: https://phab.mercurial-scm.org/D5474