Page MenuHomePhabricator

treemanifest: expose prefetchtrees() publicly

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


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

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

rFBHGX Facebook Mercurial Extensions
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

simpkins created this revision.Nov 14 2017, 10:27 PM
durham accepted this revision.

@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.