( )⚙ D1421 treemanifest: expose prefetchtrees() publicly

This is an archive of the discontinued Mercurial Phabricator instance.

treemanifest: expose prefetchtrees() publicly
ClosedPublic

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

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
Branch
default
Lint
Lint OK
Unit
Unit Tests OK

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.