Commit Graph

11 Commits

Author SHA1 Message Date
Lukas Piatkowski
03255529fa CODEMOD: rename mercurial::NodeHash to HgNodeHash
Reviewed By: sid0

Differential Revision: D7619973

fbshipit-source-id: 229fea891788c33eb1f45446ba2333e945ca5553
2018-04-16 03:40:25 -07:00
Lukas Piatkowski
73034a99b2 CODEMOD: rename mercurial_types::HgFileNodeId to DFileNodeId
Summary: mercurial_types::DFileNodeId should be replaced by types from mononoke_types in most cases. This rename should help with tracking this

Reviewed By: sid0

Differential Revision: D7619290

fbshipit-source-id: aa6a8e55ae3810c4531028c3b3db2e5730fe7846
2018-04-16 03:40:24 -07:00
Lukas Piatkowski
7e05a01ce5 CODEMOD: rename mercurial_types::HgManifestId to DManifestId
Summary: mercurial_types::DManifestId should be replaced by types from mononoke_types in most cases and by mercurial::HgManifestId in others. This rename should help with tracking this

Reviewed By: sid0

Differential Revision: D7619062

fbshipit-source-id: 447224194c6555334b64dc29ebabe3ef0d0cb87e
2018-04-16 03:40:24 -07:00
Lukas Piatkowski
f6c3f72745 CODEMOD: rename mercurial_types::HgChangesetId to DChangesetId
Summary: mercurial_types::DChangesetId should be replaced by types from mononoke_types in most cases and by mercurial::HgChangesetId in others. This rename should help with tracking this

Reviewed By: sid0

Differential Revision: D7618897

fbshipit-source-id: 78904f57376606be99b56662164e0c110e632c64
2018-04-16 03:40:24 -07:00
Lukas Piatkowski
16cbfd5133 CODEMOD: rename mercurial_types::NodeHash to DNodeHash
Summary: mercurial_types::NodeHash should be replaced by types from mononoke_types in most cases and by mercurial::NodeHash in others. This rename should help with tracking this fact.

Reviewed By: sid0

Differential Revision: D7618389

fbshipit-source-id: a876e723d911df626c7851fba56a056843b4e049
2018-04-16 03:40:24 -07:00
Lukas Piatkowski
dd3c638c1d api cleanup: clean api of mercurial and mercurial_types NodeHash
Summary:
This is a cleanup of NodeHash API. There were few unused methods and few ways to convert between mercurial and mercurial_types hashes. With this diff it is very easy to identify the places where this converstion happens.
A followup of this diff will be to use this new API to easily replace the NodeHash convertions in places where it requires remapping.

Reviewed By: sid0

Differential Revision: D7592876

fbshipit-source-id: 6875aa6df1a3708ce54ca5724f6eb960d179192b
2018-04-13 10:00:03 -07:00
Stanislau Hlebik
f550dfc41d mononoke: diesel filenodes implementation
Summary:
Initial support for filenodes using diesel.
These filenodes implementation is very close to what hg stores in revlog files.
Currently this implementation doesn't support copies.
This issue will be fixed in the next diffs.

Reviewed By: farnz

Differential Revision: D7305910

fbshipit-source-id: bbb0196dbee24c3a99d58055de11d433a518e40b
2018-03-28 03:25:27 -07:00
Lukas Piatkowski
5ba5c0b0e0 mercurial_types: distinguish between HgManifestId and HgChangesetId in sql types
Summary: the diesel schemas should prevent from reading a manifest hash as changeset and vice versa

Reviewed By: StanislavGlebik

Differential Revision: D7339725

fbshipit-source-id: c619ab7ecabfd10f42e64a38c0f16abd114d4a31
2018-03-21 05:14:37 -07:00
Siddharth Agarwal
b338897dc4 prefix ChangesetId, ManifestId and BlobHash with Hg
Summary:
Mononoke will introduce its own ChangesetId, ManifestId and BlobHash, and it
would be good to rename these before that lands.

Reviewed By: farnz

Differential Revision: D7293334

fbshipit-source-id: 7d9d5ddf1f1f45ad45f04194e4811b0f6decb3b0
2018-03-15 17:45:29 -07:00
Siddharth Agarwal
1e5ddafbd4 initial complete table backend using diesel
Summary:
Diesel looks quite promising overall, as long as we can ensure async operations
work.

Some basic notes:

* This just looks async but isn't really -- doing that would need a way to send
queries over to a thread pool. (cc kulshrax)
* It is unfortunate that we must use a macro for the exact same `add` code across
MySQL and SQLite. There doesn't appear to be a way out though -- there is no
trait bound that we can apply to the `add` method here.

This is currently pretend-async -- it would be good to make this really async, but that should wait for a future diff IMO

Reviewed By: StanislavGlebik

Differential Revision: D6932028

fbshipit-source-id: ac1cfde3b96bb790f00b73d49c6d90ed128f0255
2018-02-22 17:08:59 -08:00
Siddharth Agarwal
286b04bbd6 add mock hashes
Summary:
These get pretty annoying to construct in tests.
`mercurial-types-mocks` seems like a great place to have them.

I ended up using the `const_fn` feature for convenience.

Reviewed By: StanislavGlebik

Differential Revision: D5898773

fbshipit-source-id: f9ead4e7720ed8ffb0535826603656ff7115b6e4
2017-09-26 04:35:12 -07:00