This is an archive of the discontinued Mercurial Phabricator instance.

prefetchtrees: add option to repack prefetched trees
ClosedPublic

Authored by singhsrb on Nov 14 2017, 3:43 PM.
Tags
None
Subscribers

Details

Reviewers
durham
Group Reviewers
Restricted Project
Commits
rFBHGX1ebd6b179b2c: prefetchtrees: add option to repack prefetched trees
Summary

The prefetch command has an option to repack the prefetched files.
Eventually, we plan to merge prefetch and prefetchtrees into a single
command and therefore, this commit takes a step towards making the interface to
these commands exactly the same.

Test Plan

Ran all the tests.

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.

Event Timeline

singhsrb created this revision.Nov 14 2017, 3:43 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 14 2017, 3:43 PM
singhsrb added a comment.EditedNov 14 2017, 3:50 PM

This is only an intermediate step to help out with the review. It might be useful to checkout D1417 first to get an idea of what this leads to.

durham requested changes to this revision.Nov 14 2017, 7:28 PM
durham added a subscriber: durham.
durham added inline comments.
tests/test-treemanifest-prefetch.t
378

We need to verify that the repack succeeded. Maybe we could first prefetch commit 0, then prefetch 2+4 and verify that they were all repacked together after debugwaitonrepack exits?

This revision now requires changes to proceed.Nov 14 2017, 7:28 PM
singhsrb planned changes to this revision.Nov 14 2017, 8:26 PM
singhsrb added inline comments.
tests/test-treemanifest-prefetch.t
378

I wasn't sure how to do that. That suggested strategy seems like a reasonable enough way of going about it.

singhsrb updated this revision to Diff 3533.Nov 15 2017, 3:06 PM
durham accepted this revision.Nov 15 2017, 6:03 PM
durham added inline comments.
tests/test-treemanifest-prefetch.t
386

Since all we're verifying is that there should be one pack, doing ls_l $CACHEDIR/master/packs/manifests/*.dataidx | wc -l might be more concise.

This revision is now accepted and ready to land.Nov 15 2017, 6:03 PM
singhsrb added inline comments.Nov 15 2017, 6:06 PM
tests/test-treemanifest-prefetch.t
386

That's a great idea!

singhsrb updated this revision to Diff 3538.Nov 15 2017, 6:33 PM
This revision was automatically updated to reflect the committed changes.