Commit Graph

7 Commits

Author SHA1 Message Date
Pavel Aslanov
fbc5c8c211 nuke UnodeId
Summary:
- `store|fetch` semantic requires `MononkeId::Value` type but `UnodeId` does not have associated value type.
- `UnodeId` is not used anywhere in codebase
Nuking it for now.

Reviewed By: lukaspiatkowski

Differential Revision: D8351415

fbshipit-source-id: 970ab8d3c0cdca6d77c96ea08643f90a4ce0e624
2018-06-11 09:23:43 -07:00
Siddharth Agarwal
782e18fe55 mercurial: add file node envelope
Summary:
We'd like to move away from `RawNodeBlob` and `RawCSBlob` to data structures
serialized by Thrift. This is the first step to doing that.

The most important thing here is that it reuses file content IDs from native
Mononoke storage.

Reviewed By: jsgf

Differential Revision: D7771990

fbshipit-source-id: de4ee0b56aa6610caeff84b2235e19855df086cb
2018-04-27 14:04:38 -07:00
Siddharth Agarwal
28d6845285 mononoke-types: drop blake2 NULL hash
Summary:
Since none of the typed hashes use it, NULL hashes aren't going to be
used anywhere in the system.

Reviewed By: farnz

Differential Revision: D7365068

fbshipit-source-id: d67c021a6c04ca1a120264ec88943a5b35d9b8c4
2018-03-22 10:29:02 -07:00
Siddharth Agarwal
bb6e012ad8 mononoke-types: add a type to represent datetimes
Summary: Represented as a chrono datetime in Rust and an (i64, i32) pair in Thrift.

Reviewed By: jsgf

Differential Revision: D7325332

fbshipit-source-id: 22c3b17961ffb0b4fdb4e6e8aece3b257b3c718e
2018-03-20 08:57:42 -07:00
Siddharth Agarwal
d33426121b rename BlobHash to ContentId, UnodeHash to UnodeId
Summary:
External code should consider these identifiers opaque -- the fact
that they're hashes is an implementation detail.

Also a "blob" is too generic here -- what we're talking about is file contents.
In the future (e.g. for 10GB+ files) the content hash might point to something
more complicated than file contents.

Reviewed By: farnz

Differential Revision: D7320932

fbshipit-source-id: 11a781345a1973f0af8222b809004daa948c3a47
2018-03-20 03:07:23 -07:00
Siddharth Agarwal
4073388b7c mononoke-types: add BlobHash and ChangesetId as other typed hashes
Summary:
I think it makes a lot of logical sense to have three separate hash
types:

* `ChangesetId` for changesets
* `UnodeHash` for unodes
* `BlobHash` for file blobs

These three are never going to mix. Note that manifests and file unodes are
going to mix in e.g. tree manifest unodes.

Reviewed By: farnz

Differential Revision: D7300742

fbshipit-source-id: 688b410f7a5304fdd5ab3a6800137632887f97b9
2018-03-16 10:15:05 -07:00
Siddharth Agarwal
a7912e687f add a new hash type for unodes
Summary:
These hashes will be the used throughout Mononoke's data model.

Also add mocks.

Note that a `UnodeHash` cannot be null.

Reviewed By: farnz

Differential Revision: D7260955

fbshipit-source-id: d5be5c67848e7b93218a26282e0a757708df7e62
2018-03-14 18:46:46 -07:00