treemanifest: expose prefetchtrees() publicly
ClosedPublic

Authored by simpkins on Nov 14 2017, 10:27 PM.

Details

Reviewers
durham
Group Reviewers
Restricted Project
Commits
rFBHGX6f34fada90d4: treemanifest: expose prefetchtrees() publicly
Summary

Rename _prefetchtrees() to prefetchtrees(). Also change it to throw a
new MissingNodesError() exception type when it fails to download some nodes.
This makes it possible for callers to easily distinguish missing nodes from
other unexpected errors.

Test Plan

Confirmed the existing unit tests pass. test-treemanifest-infinitepush.t
exercises the MissingNodesError code path.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
simpkins created this revision.Nov 14 2017, 10:27 PM
durham accepted this revision.Nov 15 2017, 6:58 PM
durham added a subscriber: singhsrb.

@singhsrb is doing some refactors in this area, so you may want to coordinate with him on landing.

This revision is now accepted and ready to land.Nov 15 2017, 6:58 PM
simpkins updated this revision to Diff 3959.Nov 28 2017, 11:07 PM

Rebase and resolve conflicts with @singhsrb's changes

durham accepted this revision.Nov 29 2017, 2:45 PM
This revision was automatically updated to reflect the committed changes.