This is an archive of the discontinued Mercurial Phabricator instance.

narrow: use diffmatcher to send only new filelogs in non-ellipses widening
ClosedPublic

Authored by pulkit on Sep 17 2018, 9:32 AM.

Details

Summary

Before this patch, when we widen a non-ellipses narrow clone, we downloads all
the filelogs matching the resulting new matcher. This is same as the ellipses
case but can be improved because, we don't pull new csets in non-ellipses cases,
we can only download the new added files instead of downloading all the files
which matches the new matcher.

So, we only download files which matches the new matcher but does not matches
the old matcher. There exists a match.differencematcher() which is used here.

This will lead to significant amount of speedup in extending a non-ellipses
narrow copy on large repos because we will download and process only the new
required filelogs.

The tests changes demonstrate that we are downloading now less files.

Thanks to Augie for pointing that functionality of differencematcher exists in
core.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Sep 17 2018, 9:32 AM
martinvonz accepted this revision.Sep 17 2018, 1:07 PM
martinvonz added a subscriber: martinvonz.

Nice! That was a lot simpler than I expected. I expected some changes would be needed on the client to prevent it from stripping the existing file nodes, but I suppose is still does that and it still works because it re-applies that stripped bundle afterwards.

This revision is now accepted and ready to land.Sep 17 2018, 1:07 PM
This revision was automatically updated to reflect the committed changes.

I expected some changes would be needed on the client to prevent it from stripping the existing file nodes, but I suppose is still does that and it still works because it re-applies that stripped bundle afterwards.

I don't know the details but it works magically ;)