This is an archive of the discontinued Mercurial Phabricator instance.

narrow: build the known set of nodes only when ellipses is enabled
ClosedPublic

Authored by pulkit on Sep 10 2018, 11:13 AM.

Details

Summary

We don't need to build the known set in non-ellipses case because we don't have
a shallow repo. In this patch, this checks whether the server has ellipses
enabled or not using the server capability and then build the known set of
nodes.

Building the known set of nodes can take ~3-4 minutes on repositories with
millions of csets so this patch speeds up extending a non-shallow narrow clone
on large repositories.

In future, we should first check whether local repository is an ellipses repo
using a new ellipses repo requirement and then control all the combinations
between local repo requirement and server capability.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Sep 10 2018, 11:13 AM
martinvonz added inline comments.
hgext/narrow/narrowcommands.py
190

Could you fix my typo (s/serialized/serializes/) while you're at it? Thanks.

pulkit edited the summary of this revision. (Show Details)Sep 11 2018, 5:56 AM
pulkit updated this revision to Diff 10874.
martinvonz accepted this revision.Sep 11 2018, 11:47 AM
This revision is now accepted and ready to land.Sep 11 2018, 11:47 AM
This revision was automatically updated to reflect the committed changes.