Commit Graph

20 Commits

Author SHA1 Message Date
Lukas Piatkowski
35656a1e7d blobrepo: use all server side bookmarks as heads for the sake of discovery
Summary: Although this change is breaking with the traditional definition of heads in Mercurial, we decided that using bookmarks as heads is sufficient for fbsource use case as well as it matches the git model where every unnamed branch is garbage collected.

Reviewed By: jsgf

Differential Revision: D7745541

fbshipit-source-id: 2ec716db7799bf7bab8b2b77a85d1521a880f3df
2018-04-25 04:22:19 -07:00
Lukas Piatkowski
2187aa38ef blobrepo: fix compute_changed_files bug - use intersection instead of symmetric difference
Summary: The problem in compute_changed_files is that for 2 parents given instead of producing a list of files that were changed in the merge commit from perspective of both parents it produced the opposite of that. This should fix it

Reviewed By: jsgf

Differential Revision: D7708215

fbshipit-source-id: d58457054625beb853f61cb060d25b09279ecceb
2018-04-24 11:17:06 -07:00
Lukas Piatkowski
d0e66cc5f7 mercurial: distinguish between NodeHash used in mercurial Revlogs and in Mononoke Blobstore
Summary:
This codemod tries not to change the existing behavior of system, only introduce new types specific to Mercurial Revlogs.
It introduces a lot of copypasta intentionally and it will be cleaned in following diffs.

Reviewed By: farnz

Differential Revision: D7367191

fbshipit-source-id: 0a915f427dff431065e903b5f6fbd3cba6bc22a7
2018-03-22 12:24:35 -07:00
Lukas Piatkowski
4d4d90928f integration tests: use RocksDb based blobs rather than File based for testing
Summary: just to excersise our RocksDb blobstore which might come in handy more often than file based as it should be more efficient

Reviewed By: StanislavGlebik

Differential Revision: D7290069

fbshipit-source-id: ce776cfa14e43dc45cca796ef187655ba665d177
2018-03-16 13:41:55 -07:00
Stanislau Hlebik
ebf46512ef mononoke: test cleanup, part 2
Summary: Cleanup blobimporting

Reviewed By: lukaspiatkowski

Differential Revision: D7000047

fbshipit-source-id: 2657a5608c3d58df71154dd2e97c4c899c33714a
2018-02-16 03:08:40 -08:00
Stanislau Hlebik
f503d1993c mononoke: test cleanup, part 1
Summary:
Use hgclone_treemanifest instead of hgcloneshallow.
Note that it changes the behaviour of test-infinitepush.t - now it sends
treegroup part too. Since we actually want to send treegroup part during
infinitepush push, that means that the test was broken and now it fixed.

Reviewed By: lukaspiatkowski

Differential Revision: D7000046

fbshipit-source-id: 61b4517f23081faab1738f44d27220ae8063e077
2018-02-16 03:08:40 -08:00
Stanislau Hlebik
c0b25700db mononoke: add support many mfnodes and basemfnodes in gettreepack
Summary:
Quick recap: gettreepack is a treemanifest wireproto method.
It's used to send treemanifest data to the client. Client sends list of
manifest nodes it's interested in (mfnodes), and list of nodes it already has
(basemfnodes). Server should find the difference and send it back. Client
usually call this wireproto method when it checks out new revision (`hg
update`), but it uses in other cases too (for example, in `hg prefetch`).

Before we supported exactly one mfnode and exactly one basemfnode. This is
usually fine for `hg update` use-case, but `hg prefetch` can request many
mfnodes and can send empty basemfnode. So let's support this too.

Note that current implementation isn't efficient. It uses at most one
basemfnode, meaning that it can send data that client already has. Also for
each mfnode we generate separate stream of changed entries. That means that the
same entries can be fetched many times.

Reviewed By: lukaspiatkowski

Differential Revision: D6923197

fbshipit-source-id: d25f9a01ca568c84811ee1a13181e70eb217eb53
2018-02-14 06:36:04 -08:00
Stanislau Hlebik
22a09370b7 mononoke: basic lookup implementation
Summary:
Wireproto method to lookup if a revision/bookmark exists.
Currently supports only full hashes, later we'll add support for bookmarks and
node prefixes.

Reviewed By: farnz

Differential Revision: D6948358

fbshipit-source-id: af92a892eae8f787053447e601ebf95dfd638fa4
2018-02-13 10:21:43 -08:00
Stanislau Hlebik
4542e7dc1a mononoke: fix tests
Reviewed By: farnz

Differential Revision: D6977472

fbshipit-source-id: 370f0a5a902b98539075da65adc15f67ce4a7080
2018-02-13 10:08:42 -08:00
Stanislau Hlebik
f76937cbc7 mononoke: support renames in hg pull
Reviewed By: quark-zju

Differential Revision: D6922881

fbshipit-source-id: 69fb667ec222d7cc65db8f687178b8db61bd4912
2018-02-13 08:54:31 -08:00
Stanislau Hlebik
97032c01fc mononoke: fetch full file history
Summary:
remotefilelog getfiles method requires fetching the whole history. Current
implementation is naive and it's going to be slow on big repos.
But later we're going to replace it with mysql

Reviewed By: quark-zju

Differential Revision: D6913180

fbshipit-source-id: 9244272a0339a2a83cf5b5615963b65ad2fcdc07
2018-02-13 08:54:31 -08:00
Stanislau Hlebik
9fa48d87d0 mononoke: simple getfiles implementation
Summary:
Currently missing a few things:
1) Fetching the whole history for a file
2) Dealing with renames

That will be fixed in the next diffs

Reviewed By: quark-zju

Differential Revision: D6913179

fbshipit-source-id: f847c61791488bb2842a245ae00de7420b97145e
2018-02-13 08:54:31 -08:00
Lukas Piatkowski
dfd17c9d57 mononoke: create integration test for a basic push case to treemanifest repo
Summary: making this test work is a 2018 m1 milestone

Reviewed By: farnz

Differential Revision: D6950112

fbshipit-source-id: 798a1b8e722e96b27f0cb8267b82232d3fe0496d
2018-02-13 06:22:17 -08:00
Stanislau Hlebik
1d7668ffba mononoke: remove get_mpath and get_path and use get_name
Summary:
As we discussed before, let's add get_name() method that returns MPathElement,
and remove get_path() and get_mpath().

Except for renaming, diff also make repoconfig work with tree manifest, and
fixes linknodes creation in blobimport - previously basename was used instead
of the whole path.

Reviewed By: jsgf

Differential Revision: D6857097

fbshipit-source-id: c09f3ff40d38643bd44aee8b4488277d658cf4f6
2018-02-07 07:53:48 -08:00
Stanislau Hlebik
c7c6c8be53 mononoke: reverse nodes in the pull
Summary:
Pulling more than one node doesn't work, because mononoke revsets return
children before the parents. In that case mercurial client fails because new
child points to non-existent parents. To fix it let's reverse the output.
It's bad, because we lose the advantages of streaming, but we do it now anyway
because `getbundle()` method returns Bytes. Besides changelog data should be
fairly small.

Reviewed By: farnz

Differential Revision: D6899239

fbshipit-source-id: 67b3954bfbed8e0aaa69e0da453dae443cd24912
2018-02-06 02:20:39 -08:00
Stanislau Hlebik
906035f526 mononoke: basic getbundle changegroup implementation
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
2018-01-21 07:37:30 -08:00
Simon Farnsworth
ebafde00b0 Remove Repo trait completely
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
2018-01-15 06:37:27 -08:00
Siddharth Agarwal
64e5182680 fix test-init.t
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
2018-01-01 17:52:36 -08:00
Lukas Piatkowski
4fbc0213a3 server: read config repo instead of command line arguments to start the server
Reviewed By: StanislavGlebik

Differential Revision: D5833380

fbshipit-source-id: bad649592a2aa15ad5bc1448266986bed4c6f989
2017-09-22 09:22:18 -07:00
facebook-github-bot
2b6af6b941 Initial commit
fbshipit-source-id: f75baa4ff6aa71973f677b752d7aba582cf4927f
2017-07-27 18:00:19 -07:00