Commit Graph

5 Commits

Author SHA1 Message Date
Durham Goode
99aa0a5195 treemanifest: support tree packs in bundles
This makes it possible to put a tree manifest pack in a bundle2 bundle and have
it get loaded into a bundlerepo.
2017-08-29 13:02:22 -07:00
Durham Goode
c8c72f8201 packs: add progress bar to receiving pack files
Summary:
This adds a simple progress bar while the client receives a pack.  We don't know
ahead of time how large it will be, so we can only provide the bouncy bar kind.
But we can show an increasing number of things downloaded, so they know
something is actually happening.

Test Plan:
Ran hg pull with the extension enabled, verified there was a progress
bar during the tree prefetch.

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5098564

Signature: t1:5098564:1495235358:0020b28da890813f11dba70b157e526e7be418f8
2017-05-21 17:09:08 -07:00
Durham Goode
2b12f514c7 treemanifest: include tree pack during pushes
Summary:
To enable pushing between peers (and eventually pushing to the server), let's
teach bundle creation to include the trees being pushed.

Test Plan: Adds a test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: quark, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4957456

Signature: t1:4957456:1493266296:67f98a2b3d691644bde9098a713d05266f349cde
2017-04-27 10:44:34 -07:00
Durham Goode
2b154613e2 pack: switch readers to read from file handle
Summary:
A future patch will move the pack wireprotocol to use bundle2. In this new world
we'll be given a file handle instead of a remote peer, so let's switch the
utility methods to work on a file handle instead.

Test Plan: Ran the tests

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4924553

Signature: t1:4924553:1493050882:7a9ee8b282bf47ef393362dd0114d801dc2a68d5
2017-04-27 10:44:33 -07:00
Durham Goode
902af15d1e remotefilelog: refactor pack wireprotocol to separate file
Summary:
The pack wireprotocol will be useful for exchanging treemanifests, so let's
refactor it out to it's own file. There's a slight protocol change here, where
we terminate the response with 10 null bytes (2 for 0 length filename, 4 for 0
length data, 4 for 0 length history) instead of the original 2 null bytes (for
0 length filename) which didn't let us handle entries with '' as the name.

This pack exchange code isn't even used in production, since most remotefilelog
downloads are done via the lose file (getfile/getfiles) format.

Test Plan:
Ran the tests. Even though this code isn't used in production, the
prefetch and repack tests still cover it.

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4860556

Signature: t1:4860556:1491853521:c3810a4a681606571354b270b957e8df0962c86a
2017-04-10 17:56:01 -07:00