Commit Graph

9 Commits

Author SHA1 Message Date
Lowik Chanussot
395b124f5d Make get_manifest_by_nodeid accept HgManifestId
Summary: Make get_manifest_by_nodeid accept HgManifestId and correct all calls to get_manifest_by_nodeid.

Reviewed By: StanislavGlebik

Differential Revision: D10298425

fbshipit-source-id: 932e2a896657575c8998e5151ae34a96c164e2b2
2018-10-11 06:50:16 -07:00
Stanislau Hlebik
9abd29d4c3 mononoke: use ChangesetId in Changesets
Summary:
Alas, the diff is huge. One thing is changing Changesets to use ChangesetId.
This is actually quite straightforward. But in order to do this we need to
adapt our test fixtures to also use bonsai changesets. Modifying existing test
fixtures to work with bonsai changesets is very tricky. Besides, existing test
fixtures is a big pile of tech debt anyway, so I used this chance to get rid of
them.

Now test fixtures use `generate_new_fixtures` binary to generate an actual Rust
code that creates a BlobRepo. This Rust code creates a bonsai changeset, that
is converted to hg changeset later.
In many cases it results in the same hg hashes as in old test fixtures.
However, there are a couple of cases where the hashes are different:
1) In the case of merge we are generating different hashes because of different
changed file list (lukaspiatkowski, aslpavel, is it expected?). this is the case for test
fixtures like merge_even, merge_uneven and so on.
2) Old test fixtures used flat manifest hashes while new test fixtures are tree
manifest only.

Reviewed By: jsgf

Differential Revision: D9132296

fbshipit-source-id: 5c4effd8d56dfc0bca13c924683c19665e7bed31
2018-08-06 10:36:43 -07:00
Rain ⁣
06f619717f blobrepo_utils: rename BonsaiVerify to BonsaiMFVerify etc
Summary: This verifier works on manifests -- we'll need other ones for filenodes etc.

Reviewed By: StanislavGlebik

Differential Revision: D9105976

fbshipit-source-id: 939b72b6a3f69b716385315f69a57e91d71a45f3
2018-08-02 12:37:02 -07:00
Pavel Aslanov
2fdc5ddd70 get/generate hg changeset from bonsai changeset
Summary:
This code adds generation of mercurial changeset from bonsai changeset:
  - now handles move file info
  - updates filenodes and changesets tables

Reviewed By: StanislavGlebik

Differential Revision: D9027741

fbshipit-source-id: b10ae9a87565f2e1e9f59954c45815b844033fa5
2018-07-31 11:36:14 -07:00
Rain ⁣
e284a0dac2 bonsai-utils/diff: add ChangedReusedId state
Summary: See the doc comment for what this state represents and why it is necessary.

Reviewed By: StanislavGlebik

Differential Revision: D9025772

fbshipit-source-id: b0588d037365194bbf2d9889ead60237ef097359
2018-07-31 10:36:31 -07:00
Rain ⁣
58ca0b1c3f bonsai-verify: add a way to weaken checks for merge commits older than a date
Summary: This is a workaround for buggy commits produced by older versions of treemanifest.

Reviewed By: farnz

Differential Revision: D9018502

fbshipit-source-id: 71f2aeeaee01500a1a73814dc9c4979ef2c79746
2018-07-29 21:21:33 -07:00
Stanislau Hlebik
ff04a36412 mononoke: rename BlobChangeset and ChangesetContent
Summary:
These types are Hg specific. Since we are going to add bonsai changeset
creation soon, let's make it clear in the types

Reviewed By: farnz

Differential Revision: D8911359

fbshipit-source-id: 8b6cc45122402d7b7e074e66d904d979030de705
2018-07-26 10:09:31 -07:00
Rain ⁣
b42e67a0ed tool to verify bonsai changeset roundtripping
Summary:
The goal of this tool is to verify that bonsai changesets roundtrip with the same hashes. This uses the `ChangesetVisitor` stuff introduced in the previous diff to walk over a specific number of changesets.

I've been using this tool for a few days, and it's shaken out a number of bugs in the Bonsai support in Mononoke, and even found old bugs in Mercurial. So it's been a pretty useful exercise overall.

Reviewed By: farnz

Differential Revision: D8817725

fbshipit-source-id: b6976e8ff9024098c695e82383d98d95b2701e1b
2018-07-23 23:53:10 -07:00
Rain ⁣
8d24accf43 blobrepo_utils: add a parallel changeset visitor
Summary:
This allows parallel walks across thousands of changesets.

In my testing with the Bonsai verification tool this seemed to work well,
keeping my cores saturated almost all the time.

Something to pay attention to is the way cancellation works -- it seems to make
sense, but I could have gotten something subtly wrong :)

Reviewed By: farnz

Differential Revision: D8909719

fbshipit-source-id: f7f47df479431bca05f2cd1508c9c9a4e8a2af50
2018-07-23 14:23:00 -07:00