Summary: It will be used by many things, in particular by gettreepack method
Reviewed By: jsgf
Differential Revision: D6845036
fbshipit-source-id: 3174dfafeeab830ededb70ddff3dd62f6a608d54
Summary:
It will be used in other places, such as repoconfig.
Unfortunately I had to split tests and implementation. The reason is that tests
depend on blobrepo. Blobrepo crate depends on mercurial_types and that causes
circular dependency. It shouldn't be the case, because
mercurial_types_unittests should be a separate crate, so there may be a bug in
the build system. For now I've split the tests and implementation.
Reviewed By: jsgf
Differential Revision: D6857098
fbshipit-source-id: 1c0af234564dd5628ba6d63d28cf54d7a2dc9217
Summary:
Per the title, enable the mysql and sqlite backends for diesel, so
that we can experiment with using diesel with those two DBMSs.
Reviewed By: jsgf
Differential Revision: D6854679
fbshipit-source-id: 66581db1bcafbcc422ababb969500e5d4dd5fafc
Summary:
Add some doc comments. Also added tasks for things that at least need
to be looked at.
Reviewed By: StanislavGlebik
Differential Revision: D6836570
fbshipit-source-id: 107f1f4799a369f11fdec7dbe051764a287e3a24
Summary: Change BlobChangeset and callers to use ChangesetId instead of NodeId
Reviewed By: lukaspiatkowski
Differential Revision: D6835450
fbshipit-source-id: 7b20359837632aef4803e40965380c38f54c9d0a
Summary:
This is a stream of diffs between two manfiests. It will be used in
`gettreepack` wireproto method of treemanifest.
This implementation is slow and simple, because it fetches from blobstore sequentially. We'll make it faster later if needed
Reviewed By: lukaspiatkowski
Differential Revision: D6808892
fbshipit-source-id: 3edcd02a287276b6015ac73fbe977a5b6d8573b5
Summary:
Add a fixture where there are many files and directories.
History is linear for now, but later we may add merge commtis.
It will be used to test gettreepack method.
Reviewed By: lukaspiatkowski
Differential Revision: D6818544
fbshipit-source-id: 798a1bea66eb49491f98fe5e997b172f3c927c53
Summary:
Update tp2 links for rust-crates-io and add corresponding build fixes due to
API changes.
Reviewed By: kulshrax
Differential Revision: D6824642
fbshipit-source-id: 5f30fa75815a6bb2de593878c40c0fa44219c3f3
Summary: Update the bookmarks module to use ChangesetId to represent bookmarks, rather than NodeHash.
Reviewed By: lukaspiatkowski
Differential Revision: D6774650
fbshipit-source-id: 1742e4e78798ad68a7f17ebd345eef14a7de2cec
Summary:
This will (in practice) always be `Arc<Blobstore>`, so push down and
make it the concrete type.
Reviewed By: jsgf
Differential Revision: D6761690
fbshipit-source-id: c279751d98a8882c209b79faa7cbfd3e635beda5
Summary:
Previously parsing code assumed that lookup param is an ident string. This is
incorrect, because ident string accepts only strings that consist only of
digits and small letters and start with a letter. Since a hash can be a lookup
param, this param may start with non-letter. More importantly, any bookmark can
be a lookup parameter. That means that this param can have spaces and
punctuation marks.
Let's use simpler parsing that just parses the whole string.
Reviewed By: jsgf
Differential Revision: D6758916
fbshipit-source-id: de2dd144cebfe88c751e8110ef6e3a71d3769800
Summary:
Config to connect to manifold. It's a test version, because it uses in-memory
bookmarks and heads.
Because Manifold BlobRepo require Remote to the tokio_core, I had to do a bit
of refactoring and delay BlobRepo creation. Now it's created after the
corresponding thread is created.
Reviewed By: jsgf
Differential Revision: D6748462
fbshipit-source-id: f14a3c98a6a00f44b5557255bc514df34325420f
Summary:
Super-basic implementation of generating changegroup part in getbundle. All it does is sending changelog
entries - so no manifest and no filelog entries. While it's very simple, it may
actually be enough for a real production use-case. With treemanifest and
remotefilelog we don't need to pull anything except for changelog entries,
everything else will be downloaded on demand.
Reviewed By: jsgf
Differential Revision: D6748070
fbshipit-source-id: 1dcd802a4b3b111f935e713e7696d58f05861b77
Summary:
Previously cs entry generation would always add " " after timezone even if
extras are empty. That's incorrect and this diff fixes it.
Reviewed By: jsgf
Differential Revision: D6747886
fbshipit-source-id: 03b33a7b3be8041f84cdbc5e0324fc78339b6802
Summary: This method will be used during pull to generate changegroup parts
Reviewed By: jsgf
Differential Revision: D6737183
fbshipit-source-id: 8b0df5199abd8fceb990323346684075b93b880d
Summary:
`complete!` had to be wrapped around both the separator and the input parser.
`separated_list_complete!` does that automatically, which is nice.
Reviewed By: jsgf
Differential Revision: D6758479
fbshipit-source-id: a2fe94a422a1b4a1c09bbfa915cde19d968d3273
Summary:
This doesn't have any integration tests yet, but it should work and hopefully
unblock StanislavGlebik.
Reviewed By: jsgf
Differential Revision: D6753800
fbshipit-source-id: be05e45d33e433b5cd002b8e7ae8feb255369900
Summary:
Previously if we had two different tasks (or the same tasks but with different
Notify, as in
[FuturesUnordered](http://alexcrichton.com/futures-rs/futures/stream/futures_unordered/struct.FuturesUnordered.html)),
interchangebly polling the future, only one latest future completes, and all
other futures receive no `notify()` call and may never finish.
This diff fixes it by storing a list of tasks that ever polled a future.
Note that if future was polled twice by the same task, the task will be
recorded twice. This is not great, but unfortunately one can't compare Tokio's
tasks.
Reviewed By: lukaspiatkowski
Differential Revision: D6611511
fbshipit-source-id: 2742cb85b13a684699a13a874e36e17b29fb4480
Summary:
There was a bug when if the entry with the same key is present in the hash and
the hash is full, then some entry will be evicted even though it's not
necessary.
It adds one hash map lookup, but it shouldn't be a big problem
Reviewed By: jsgf
Differential Revision: D6702001
fbshipit-source-id: 1c8cadc5e4bad6f6d95279b21edf00ed99f62c49
Summary: The Framed and FramedParts duet fits following diffs a bit better than FramedStream and ReadLeadingBuffer.
Reviewed By: jsgf
Differential Revision: D6567554
fbshipit-source-id: 88d117ad9e8227f9de278037b333da7ffc4fdf1f
Summary:
- Added test for checking if decompressing isn't overreading it's input
- As a result removed ZSTD decompression which is overreading input
- Changes in decompression code propagated usage of BufRead in bundle2 parsing code
- As a result a bug in OuterDecoder was found where the buf was not consumed if the header value is "0"
Reviewed By: jsgf
Differential Revision: D6557440
fbshipit-source-id: 89a9f4c8790017c5b86d28d467e45f687d7323f6
Summary:
The no-compression decompressor cann't provide framing as other decompressors, so a safe approach would be not to have it at all.
I replaced occurances of no-compression with `Either` reader that seem to be a pattern present in the community (f.e. `futures::future::Either` or `itertools::Either`)
Reviewed By: jsgf
Differential Revision: D6555922
fbshipit-source-id: 998dafab8d9b2f00d058ce2f9e0aced76cf15b4e
Summary:
We're never going to serve RevlogRepo in production, and we're down to
a single BlobRepo type that will have different backing stores. Remove the
unused trait, and use BlobRepo everywhere bar blobimport and repo_config
(because we previously hardcoded revlog here - we want to change to a BlobRepo
once blobimport is full-fidelity).
Reviewed By: jsgf
Differential Revision: D6596164
fbshipit-source-id: ba6e76e78c495720792cbe77ae6037f7802ec126
Summary:
One config option is now obsolete, and the other one got renamed.
(Note: this ignores all push blocking failures!)
Reviewed By: farnz
Differential Revision: D6668021
fbshipit-source-id: aff949662a9584b7aead3f571512787aa1e9a260
Summary: It removes a bit of copy-pastes code
Reviewed By: sid0
Differential Revision: D6627250
fbshipit-source-id: b110dcad998a240b6da60bc3347c7c5c0370aae0
Summary:
It won't be used in prod anyway, and for local use rocksdb blob state is still
preferable
Reviewed By: sid0
Differential Revision: D6627197
fbshipit-source-id: d9ca55b0221c050e8e8e35914aff22906198874a
Summary:
The test wasn't waiting for the Mononoke server to be available. Also
improve the error message slightly.
Reviewed By: jsgf
Differential Revision: D6606102
fbshipit-source-id: d0fde39aef8b3423fd1a8996a01f12e8a9661597
Summary:
This is very similar to the support for encoding history entries in the
previous patch. The NULL_HASH wart makes it a little annoying to deal with.
We need to be able to compute how many bytes a delta has efficiently -- add a
function and tests for that as well.
Reviewed By: jsgf
Differential Revision: D6589117
fbshipit-source-id: e3a05672e1e8f455a2e95b30418468d1e3254407
Summary:
This counter is generally quite useful, so extract it into a location
where Mononoke can also use it.
Also add ShipIt and corresponding license linter rules for this.
Reviewed By: jsgf
Differential Revision: D6600409
fbshipit-source-id: ce63d718ca259ac30d2ed77e72004fb83158f818
Summary:
In the next diff we'll `task::current()` inside MemoFuture. It fails if no
task exists. Let's use spawn to create a Task for each future.
Reviewed By: jsgf
Differential Revision: D6611510
fbshipit-source-id: 95a825dff9714579e9b16e74f355c54d8fa83a24
Summary: Previously inserting the same key twice will add size of this key twice. This diff fixes it.
Reviewed By: jsgf
Differential Revision: D6602501
fbshipit-source-id: eb8f785296945bca1df4b6cd33bd3050a48e2174
Summary:
This is the opposite of decode. Encode -> decode trips are also easily
testable, which is nice.
Reviewed By: jsgf
Differential Revision: D6586165
fbshipit-source-id: 9300844da5c3210cfbe4b6a3c98c6429d33ccbcb
Summary:
This is what we get or send over the wire, so while encoding we don't have to
check whether the value is in bounds.
Reviewed By: jsgf
Differential Revision: D6596025
fbshipit-source-id: 57fcefbe3545a1af4c4c4ea24350e636860d2392
Summary:
This just adds a basic verification test for now. Roundtrip tests are coming up
in future diffs.
Reviewed By: jsgf
Differential Revision: D6585421
fbshipit-source-id: 1f38366f658324447dbe5634afb04080aad91cd3
Summary:
The only verification that needs to be done is for if the delta base
is null.
Also move a rustfmt_skip attribute to the smallest piece of code that it needs to
apply to.
Reviewed By: jsgf
Differential Revision: D6589118
fbshipit-source-id: 287c94871ed30d196c9eaa673cfd7c7f0dd6ed93
Summary:
The encoding code is going to use this to ensure that it isn't getting invalid
data.
Reviewed By: jsgf
Differential Revision: D6585201
fbshipit-source-id: f7ca749d9d0a8862621816e362add7546ca413c5