Commit Graph

64980 Commits

Author SHA1 Message Date
Jun Wu
5920b3b927 eagerepo: implement EdenApi "commit_location_to_hash" endpoint
Summary: Implement the endpoint. Most of the complexity is type conversion.

Reviewed By: andll

Differential Revision: D27929201

fbshipit-source-id: b96f65a0173a31f716272c8e0dd47ce8a90759cd
2021-04-28 12:24:26 -07:00
Jun Wu
fc55fab9f9 eagerepo: implement EdenApi "clone_data" endpoint
Summary: Implement the endpoint.

Reviewed By: DurhamG

Differential Revision: D27929202

fbshipit-source-id: adda6a76f3d990edf6defcf1fd0f298e225f6370
2021-04-28 12:24:26 -07:00
Jun Wu
769f54228f dag: remove head_id from CloneData
Summary: This makes CloneData possible to represent an empty repo.

Reviewed By: sfilipco

Differential Revision: D27926246

fbshipit-source-id: 0bcead224ef5b89c66d07a34d8217edaef62177f
2021-04-28 12:24:26 -07:00
Jun Wu
ea7df1711e eagerepo: implement EdenApi "commit_revlog_data" endpoint
Summary: Implement the endpoint.

Reviewed By: kulshrax

Differential Revision: D27926248

fbshipit-source-id: dea1f69f4f53927188be503e1fdc5e1a6c4487fb
2021-04-28 12:24:26 -07:00
Jun Wu
64480ea512 eagerepo: implement EdenApi "trees" endpoint
Summary: Implement the endpoint. The child_metadata remains unsupported for now.

Reviewed By: kulshrax

Differential Revision: D27926253

fbshipit-source-id: 7d3d8be458462dc6e87080ce49754cf76b731794
2021-04-28 12:24:26 -07:00
Jun Wu
333dce9fa5 eagerepo: implement EdenApi "history" endpoint
Summary: Implement the file history API.

Reviewed By: kulshrax

Differential Revision: D27926252

fbshipit-source-id: b56406101810e29904b24591d744345924bde38c
2021-04-28 12:24:26 -07:00
Jun Wu
6cf5df2983 eagerepo: implement EdenApi "files" endpoint
Summary: Implement the files API. It's just reading content from the zstore.

Reviewed By: kulshrax

Differential Revision: D27926251

fbshipit-source-id: 54d04caa63e01b6ce5b9c785990c14043f7f22ad
2021-04-28 12:24:26 -07:00
Jun Wu
e1eb399245 eagerepo: implement EdenApi "health" endpoint
Summary: Implement the health API.

Reviewed By: kulshrax

Differential Revision: D27926249

fbshipit-source-id: 1cbaf7859132387c1260ca981164549721685b9f
2021-04-28 12:24:26 -07:00
Jun Wu
540adf776f eagerepo: prepare to implement EdenApi on EagerRepo
Summary: Add blank implementation. They will be filled later.

Reviewed By: kulshrax

Differential Revision: D27926254

fbshipit-source-id: 628961c2377893bf2c44633635d4dd3b99a41be1
2021-04-28 12:24:26 -07:00
Jun Wu
d5b2bf7750 eagerepo: add ways to read or write bookmarks
Summary: The will be useful for "push" logic.

Reviewed By: kulshrax

Differential Revision: D27951633

fbshipit-source-id: 38bbdc554f017d5776df0577b82fbb0c78d18a83
2021-04-28 12:24:25 -07:00
Jun Wu
8fd660fe13 eagerepo: add a way to add a commit to the commit graph
Summary:
This will be useful for "push" related logic.

The name "eager" is to make it explicit that the repo is not lazy.

Reviewed By: kulshrax

Differential Revision: D27951618

fbshipit-source-id: 8039059beba68d269c752bc8ed3e72bde0c55790
2021-04-28 12:24:25 -07:00
Jun Wu
bdf6f6f75f eagerepo: new crate for providing a local test repo that implements EdenApi
Summary:
Currently it's hard to test EdenApi related features in hg tests. The Mononoke
test suite can do it but it's too heavyweight. Looking at the API surface of
EdenApi it's actually quite small. So let's add a minimal Rust struct that can
serve as an EdenApi server.

This diff just adds a few minimal features. EdenApi related features and
push/pull support will be added later.

The name "eager" is to make it explicit that the repo is not lazy. I thought
about names like "testrepo" or "serverrepo", but the implementation is
somewhat "sound" to be used as a client, non-test repo. It can potentially
be used as starting point for a real "repo" in pure Rust. So I didn't choose
those names.

(I'm not entirely happy with the name but it's more like a placeholder
that makes it look different from other names for now).

Reviewed By: kulshrax

Differential Revision: D27926255

fbshipit-source-id: ad7a023de5e77605a553509de82ff13ae8112439
2021-04-28 12:24:25 -07:00
Jun Wu
f527306576 edenapi: move EdenApi trait to edenapi_trait
Summary:
This allows an external crate C that implements `EdenApi` to depend on a more
lightweight library just providing `EdenApi` without things like `hg_http`.
Then the `edenapi` crate can depend on C too.

Didn't move it to `edenapi_types` because it would add extra dependencies
(http, http_client, auth, etc.)

Reviewed By: kulshrax

Differential Revision: D28006548

fbshipit-source-id: 6e828974fd3f78fec70d4a04ae7be85abc459b36
2021-04-28 12:24:25 -07:00
Jun Wu
f811df8575 edenapi: make Builder more flexible
Summary:
The `Builder` API is the main API used by external users to obtain an `EdenApi`
client.  In the future we want to support different kinds of `EdenApi`, like a
local repo serving it, if `paths.default` is set to something like
`myrepotype:path`. Make `Builder` more flexible to support non-HTTP `EdenApi`s,
by returning `EdenApi` trait objects.

The old builder that is coupled with HTTP is renamed to HttpClientBuilder.

Reviewed By: kulshrax

Differential Revision: D28018586

fbshipit-source-id: 1eff7bbb8f0e5521a9bcf5a225ac361ddf7c310f
2021-04-28 12:24:25 -07:00
Jun Wu
b4316da4c4 edenapi: move User-Agent to builder
Summary:
This ensures the User-Agent is always set. It also makes the `header` less
unnecessary.

Reviewed By: DurhamG

Differential Revision: D28018587

fbshipit-source-id: 1125d2122431579f127e81c4713de45135b1f972
2021-04-28 12:24:25 -07:00
Jun Wu
4103dc2cef edenapi: re-export more stuff
Summary:
Make it easier to use.

This makes it easier for other crates to use `edenapi::Result<T>`, which is
a bit shorter than `Result<T, EdenApiError>`. Also re-export `Metadata`
from revisionstore-types so callsite does not need to depend on
revisionstore-types explicitly.

Reviewed By: kulshrax

Differential Revision: D27926250

fbshipit-source-id: c85198b5c151e10a2d4d2567e23e32605a3e7c36
2021-04-28 12:24:25 -07:00
Johan Schuijt-Li
c66bd43f3f allow auth_proxy settings to come from local
Summary: Ensure these settings are available in mononokepeer.

Reviewed By: mitrandir77

Differential Revision: D28061520

fbshipit-source-id: 68cbe9f427d4a1528a4c9968b3f1f9dcd2541004
2021-04-28 12:12:47 -07:00
Aida Getoeva
54c4a17e16 mononoke: remove async on FbConstruct methods
Summary: The methods don't do anything async anymore, let's remove `async`.

Reviewed By: krallin

Differential Revision: D28026899

fbshipit-source-id: 571eb2a1ba499876042c6e89770c803ac731cfe3
2021-04-28 11:14:52 -07:00
Stefan Filip
35bdda2e88 handlers: add commit/hash_lookup
Summary:
New endpoint. This endpoint can be used for prefix lookup and the contains
check.

Reviewed By: quark-zju

Differential Revision: D28034533

fbshipit-source-id: d724b85c3816414475b142215e3052d0b555cf59
2021-04-28 10:21:52 -07:00
Stefan Filip
27b15bfa06 edenapi/types: add CommitHashLookup request/response structs
Summary:
These structures are going to be used to implement the `commit/hash_lookup`
endpoint in EdenApi.

Reviewed By: quark-zju

Differential Revision: D28034532

fbshipit-source-id: 7b00d0d97dd0593dfa43834cda9fc9e9ab9021c5
2021-04-28 10:21:51 -07:00
Stefan Filip
324668be85 edenapi/types: add Batch
Summary:
Generic container for a bunch of uniform objects. This is primarily intended
for requests and responses which can be difficult to evolve when the top level
object is an array.  For cases where evolution is required we would
probably replace the Batch wrapper with a specialized type. For example,
starting from `Batch<MyRequest>` we would change to:
  struct MyRequestBatch {
    pub batch: Vec<T>,
    pub evolution: Evolution,
  }

Reviewed By: quark-zju

Differential Revision: D28034534

fbshipit-source-id: d231c063eeacf3500b75ae76bcc101ccbcda8881
2021-04-28 10:21:51 -07:00
Stefan Filip
4d65afb5c2 bonsai_hg_mapping: add get_hg_in_range
Summary:
I want to add prefix lookup functionality to EdenApi.

I considered adding some sort of prefix abstraction to Hg or our wire types.
so that I could use the method that was already implemented. I found the
serialization and conversion logic complicated to reason about.  It is easier
to transform the prefix query in a range query and add a range query endpoint.
No need to invent new fancy types and deal conversions.

This diff updates the prefix query implementation to rely on the range query.
The range query is functionality that is more general than prefix lookup.

Reviewed By: quark-zju

Differential Revision: D28034531

fbshipit-source-id: 491db2354e3804c4cea6db16fe7d056a962515f7
2021-04-28 10:21:51 -07:00
svcscm svcscm
b3eda3da6a Updating submodules
Summary:
GitHub commits:

fbe2103cd3
1e1087fd3c
a564f945c8
de829fb42f
7be6a0a173

Reviewed By: jurajh-fb

fbshipit-source-id: 65046678cf8ef54450891c178fa29bdbd7f413c0
2021-04-28 09:34:44 -07:00
Thomas Orozco
0f44a4f106 mononoke: update to tokio 1.x
Summary:
NOTE: there is one final pre-requisite here, which is that we should default all Mononoke binaries to `--use-mysql-client` because the other SQL client implementations will break once this lands. That said, this is probably the right time to start reviewing.

There's a lot going on here, but Tokio updates being what they are, it has to happen as just one diff (though I did try to minimize churn by modernizing a bunch of stuff in earlier diffs).

Here's a detailed list of what is going on:

- I had to add a number `cargo_toml_dir` for binaries in `eden/mononoke/TARGETS`, because we have to use 2 versions of Bytes concurrently at this time, and the two cannot co-exist in the same Cargo workspace.
- Lots of little Tokio changes:
  - Stream abstractions moving to `tokio-stream`
  - `tokio::time::delay_for` became `tokio::time::sleep`
  - `tokio::sync::Sender::send` became `tokio::sync::Sender::broadcast`
  - `tokio::sync::Semaphore::acquire` returns a `Result` now.
  - `tokio::runtime::Runtime::block_on` no longer takes a `&mut self` (just a `&self`).
  - `Notify` grew a few more methods with different semantics. We only use this in tests, I used what seemed logical given the use case.
- Runtime builders have changed quite a bit:
  - My `no_coop` patch is gone in Tokio 1.x, but it has a new `tokio::task::unconstrained` wrapper (also from me), which I included on  `MononokeApi::new`.
  - Tokio now detects your logical CPUs, not physical CPUs, so we no longer need to use `num_cpus::get()` to figure it out.
- Tokio 1.x now uses Bytes 1.x:
  - At the edges (i.e. streams returned to Hyper or emitted by RepoClient), we need to return Bytes 1.x. However, internally we still use Bytes 0.5 in some places (notably: Filestore).
  - In LFS, this means we make a copy. We used to do that a while ago anyway (in the other direction) and it was never a meaningful CPU cost, so I think this is fine.
  - In Mononoke Server it doesn't really matter because that still generates ... Bytes 0.1 anyway so there was a copy before from 0.1 to 0.5 and it's from 0.1 to 1.x.
  - In the very few places where we read stuff using Tokio from the outside world (historical import tools for LFS), we copy.
- tokio-tls changed a lot, they removed all the convenience methods around connecting. This resulted in updates to:
  - How we listen in Mononoke Server & LFS
  - How we connect in hgcli.
  - Note: all this stuff has test coverage.
- The child process API changed a little bit. We used to have a ChildWrapper around the hg sync job to make a Tokio 0.2.x child look more like a Tokio 1.x Child, so now we can just remove this.
- Hyper changed their Websocket upgrade mechanism (you now need the whole `Request` to upgrade, whereas before that you needed just the `Body`, so I changed up our code a little bit in Mononoke's HTTP acceptor to defer splitting up the `Request` into parts until after we know whether we plan to upgrade it.
- I removed the MySQL tests that didn't use mysql client, because we're leaving that behind and don't intend to support it on Tokio 1.x.

Reviewed By: mitrandir77

Differential Revision: D26669620

fbshipit-source-id: acb6aff92e7f70a7a43f32cf758f252f330e60c9
2021-04-28 07:36:31 -07:00
svcscm svcscm
4c28847877 Updating submodules
Summary:
GitHub commits:

f1a7f1dc44
36bdedfa53
07c6d22382
52e8149e96

Reviewed By: jurajh-fb

fbshipit-source-id: eba43102b12acfa84a986996216841b5788c7205
2021-04-28 05:32:12 -07:00
CodemodService FBSourceClangFormatLinterBot
63c0e35bd7 Daily arc lint --take CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D28053932

fbshipit-source-id: d2f903158c49a41a0a19df5cf1af540ba9f90a98
2021-04-28 04:38:27 -07:00
Aida Getoeva
bb3d207e33 mononoke: remove myrouter from Mononoke
Summary:
MyRouter is no longer used by Mononoke services, it is deprecated and will stop working when we upgrade the tokio.

This diff removes MyRouter support from Mononoke and simplifies the Mysql connection type struct.
Before we had `MysqlOptions` and `MysqlConnectionType` enum to represent what kind of a client we want to use. Now we use only MySQL FFI so I removed `MysqlConnectionType` completely and put everything into the options struct.

As setting up the connections (aka conn pool) is not an async operation, some of the methods don't need to be async anymore. Because this diff is already enormous, I'm refactoring this in the next one.

Reviewed By: StanislavGlebik

Differential Revision: D28007850

fbshipit-source-id: 32c3740f4bb132f06e1e256b0530ace755446cdd
2021-04-28 03:43:48 -07:00
svcscm svcscm
0410dd472e Updating submodules
Summary:
GitHub commits:

fd6fa02d90
5c6526f437
0332d73d41
2acf6bdad6
9549f4d434
dc69cf8b1f
b48fb95cf6
5bc9386b6d

Reviewed By: jurajh-fb

fbshipit-source-id: af15ec47da97aa3ac8160d084a5e13b5e8ce2149
2021-04-28 03:38:42 -07:00
Andrey Chursin
9c0304b1e1 checkout: introduce debugdryup command
Summary:
This command executes native checkout dry run code for updating between specificed revisions
Command tests network and storage perf, without actually affecting working copy

Examples of usages:
1) User reports that when updating between revisions multiple times, they see unexpected fetches, even though they expected that all data should already be in cache. Running this command shows that update between those revs fetches more data then a cache size, so repating fetches are not a surprise

2) People working on storage/network layer optimizations can utilize this command to test performance without messing with their working copy

This command understands nativecheckout.usescmstore config, same way it is used in actual native checkout

Differential Revision: D28040641

fbshipit-source-id: e5454f3110ade11f3227d6adc804a22176f530b9
2021-04-28 02:14:44 -07:00
Andrey Chursin
735da3f688 util: introduce util.formattime
Summary: This fn can be use to format time using human readable units.

Differential Revision: D28042138

fbshipit-source-id: 8b1eb6fa892754ee1008b529477fd555bd41c692
2021-04-28 02:14:44 -07:00
Andrey Chursin
c464f515b5 checkout: add methods for dry run checkout
Summary: Those methods only access store/network to fetch content but does not write to disk

Differential Revision: D28040640

fbshipit-source-id: e45dd08e12d128d54b3446e1137465981cde8f13
2021-04-28 02:14:44 -07:00
Alex Hornby
c77b388122 mononoke: add HgManifestFileNode steps to walker
Summary:
HgManifestFileNode is one of the last remaining types we don't walk ( other known one is the git derived data).

Its added as a separate NodeType from HgFileNode as HgManifestFileNode is used much less and users may want to see only the HgFileNodes.   Server side the manifest file node is only used to build the bundles returned to the client.

Differential Revision: D28010248

fbshipit-source-id: ce4c773b0f1996df308f1b271890f29947c2c304
2021-04-28 02:09:52 -07:00
Thomas Orozco
8e3f5419f6 mononoke: update Manifold client used by blobimport
Summary:
This uses code that depends on Tokio 0.x so let's get this removed. I think
I could have updated this to just use manifold-thrift, but while I'm at it,
might as well update to the new shiny client.

Reviewed By: farnz

Differential Revision: D28025165

fbshipit-source-id: 4b79c8a4bd0b8789e6827d2135d36245db4447d5
2021-04-28 01:03:19 -07:00
svcscm svcscm
ddc5bddff5 Updating submodules
Summary:
GitHub commits:

c1a5af8066
1e55b22e5d
eb545c54d8
76745a0265
38347b2703
2f30638435
fdeddcf36e
8996fd7d9d
63d18d7955
a2ff21fb3f
44fdf2f3fd

Reviewed By: jurajh-fb

fbshipit-source-id: d3e64afcf3f4fa18c8d9a0c89d4103a34991d723
2021-04-27 19:58:26 -07:00
svcscm svcscm
24b3f37677 Updating submodules
Summary:
GitHub commits:

d1f4e53fc5
4636310266
b8e49570b9
30afde3f3b
18b8275805
458c94d498
d2d1fb890f
c1e5547ad9
74ee67a5f6
375bebb3f4
7ca61f711c

Reviewed By: jurajh-fb

fbshipit-source-id: a9f33c9def654fcfaf5ce3eafa5f6ff5683d0445
2021-04-27 18:23:17 -07:00
Katie Mancini
7e37116aae report TreeCache stats
Summary:
Chad first noted that deserializing trees from the local store can be expensive.
From the thrift side EdenFS does not have a copy of trees in memory. This
means for glob files each of the trees that have not been materialized will be
read from the local store. Since reading an deserializing trees from the local
store can be expensive lets add an in memory cache so that some of these
reads can be satisfied from here instead.

We collect some cache statistics already, lets expose them through thrift with
the rest of the stats.

Reviewed By: chadaustin

Differential Revision: D27052265

fbshipit-source-id: d7fdf70260599b8df43824e2442471e332c1b0cf
2021-04-27 17:38:40 -07:00
Katie Mancini
8a1a529fcc use custom in memory tree cache
Summary:
Chad first noted that deserializing trees from the local store can be expensive.
From the thrift side EdenFS does not have a copy of trees in memory. This
means for glob files each of the trees that have not been materialized will be
read from the local store. Since reading an deserializing trees from the local
store can be expensive lets add an in memory cache so that some of these
reads can be satisfied from here instead.

Here we actually start to use the cache!

Reviewed By: chadaustin

Differential Revision: D27050310

fbshipit-source-id: e35db193fea0af7f387b6f44c49b5bcc2a902858
2021-04-27 17:38:40 -07:00
Katie Mancini
90072e0f4e add unit tests for TreeCache
Summary:
This introduces some basic unit tests to ensure correctness of the cache.
We are adding tests to cover the simple methods of the object cache since we
are using that code path here. And adding a few sanity check tests to make sure
the cache works with trees.

Reviewed By: chadaustin

Differential Revision: D27050296

fbshipit-source-id: b5f0577c1662483f732bb962c5b40bca8e1dcb40
2021-04-27 17:38:40 -07:00
Katie Mancini
1a02401df9 create a custom in memory tree cache
Summary:
Chad first noted that deserializing trees from the local store can be expensive.
From the thrift side EdenFS does not have a copy of trees in memory. This
means for glob files each of the trees that have not been materialized will be
read from the local store. Since reading an deserializing trees from the local
store can be expensive lets add an in memory cache so that some of these
reads can be satisfied from here instead.

This introduces the class for the in memory cache and is based on the existing
BlobCache. note that we keep the minimum number of entries functionality from
the blob cache. This is unlikely to be needed as trees are much less likely
than blobs to exceed a reasonable cache size limit, but kept since we already
have it.

Reviewed By: chadaustin

Differential Revision: D27050285

fbshipit-source-id: 9dd46419761d32387b6f55ff508b60105edae3af
2021-04-27 17:38:39 -07:00
Katie Mancini
6461a7e1a8 ObjectCache use distributed lock
Summary:
On all the code paths that matter we always acquire the write lock. Since we are
basically just using a simple lock, distributed mutex is a more efficient implementation
that does fancy tricks with cachelines. This improves performance from testing
globs which cause many concurrent reads from the cache.

Reviewed By: chadaustin

Differential Revision: D27810990

fbshipit-source-id: d22470f3f39e2cd3895f5ea772955b62030d154a
2021-04-27 17:38:39 -07:00
Katie Mancini
1cbec32910 move BlobCacheTest to ObjectCacheTest
Summary:
Now that Object Cache actually does most the work, I am moving the
BlobCache tests to be ObjectCache tests. I am leaving a few blob cache
tests to sanity check that the cache works with blobs.

Reviewed By: chadaustin

Differential Revision: D27776113

fbshipit-source-id: ef58279d93035588beb162ee19173a42e3ca4e5b
2021-04-27 17:38:39 -07:00
Katie Mancini
53d3f1e6cd Templatize ObjectCache
Summary:
We would like to use a limited size LRU cache fore trees as well as blobs,
so I am templatizing this to allow us to use this cache for trees.

Trees will not need to use Interest handles, but in the future we could use
this cache for blob metadata, which might want to use interest handles.
Additionally if we at somepoint change the inode tree scheme that would remove
the tree content from the inodes itself, interest handle might be useful for
trees. We could also use this cache proxy hashes which may or may not use
interest handles. Since some caches may want interest handles and others will
not I am creating get/insert functions that work with and without interest
handles.

Reviewed By: chadaustin

Differential Revision: D27797025

fbshipit-source-id: 6db3e6ade56a9f65f851c01eeea5de734371d8f0
2021-04-27 17:38:39 -07:00
svcscm svcscm
4a2fbbba31 Updating submodules
Summary:
GitHub commits:

9a124fe609
c948546a2c
254c7ae54c
2798cd1b91
7de59cfc51
29d32025ff
19b07d4cc1
88764b5e2f
fda2a5a420
9b2f0074c4
0262be2e9b
2c7d89463a

Reviewed By: jurajh-fb

fbshipit-source-id: c7baa0e862b9622716c66d1247d154cbc4f4f0d4
2021-04-27 17:05:42 -07:00
svcscm svcscm
6fccfd5a87 Updating submodules
Summary:
GitHub commits:

287c42a604
1d5b79de49
e4448166b1
9eff0218ec
c9af2c415b
3949731de3
b6f679b560
02aa01e8e5
981e18145b
1b8dedc9bf
a16f502393

Reviewed By: jurajh-fb

fbshipit-source-id: 4f78e1fc5e2194c293f20662d7bf01511dfe518d
2021-04-27 15:44:49 -07:00
TJ Yin
0cafe52bdd Remove thrift setters
Summary:
Thrift setter API is deprecated since it doesn't bring any value over direct assignment. Removing it can reduce build-time and make our codebase more consistent.

If result of `s.set_foo(bar)` is unused, this diff replaces

    s.set_foo(bar);

with

    s.foo_ref() = bar;

Otherwise, it replaces

    s.set_foo(bar)

with

    s.foo_ref().emplace(bar)

Reviewed By: xavierd

Differential Revision: D27986185

fbshipit-source-id: d90aaf27f25f2ecfcbbbe7886e0c0d784f607a87
2021-04-27 15:16:06 -07:00
Andrey Chursin
efcc5d91a7 checkout: create CheckoutPlan from ActionMap
Summary:
This and following diff will refactor CheckoutPlan creation.

Right now we create CheckoutPlan from manifest diff and then manipulate it with methods like `with_sparse_profile` to adjust plan for different cases.
Those 'adjustment' do not work great with the structure of CheckoutPlan, for example `with_sparse_profile` has to create temporary HashSet just to index files in CheckoutPlan
We are going to add more adjustments in the future (for example, checkout --clean), and will run into same issues with current structure of CheckoutPlan

To avoid those issues, we are going to refactor this code, so that instead of Diff -> CheckoutPlan -> adjustments, we are going to have Diff -> ActionMap -> adjustments -> CheckoutPlan

The structure of CheckoutPlan is still good for it's direct purpose (execution), but all the 'changes' to the plan will be done in ActionMap instead.

Reviewed By: DurhamG

Differential Revision: D27980390

fbshipit-source-id: 403f371fd2fe7760984925a38429e1bfb88d8e3f
2021-04-27 13:33:25 -07:00
Andrey Chursin
3d01cbc5d9 checkout: use native checkout on dirty copy
Summary: For now this does not work with --clean flag(fallback to regular checkout in that case)

Reviewed By: quark-zju

Differential Revision: D27953967

fbshipit-source-id: 71c097cf1e395ff2cba2f4ee528145d3b2c83c23
2021-04-27 13:33:25 -07:00
Andrey Chursin
4d87e066ce checkout: add bindings for checking status conflicts
Reviewed By: quark-zju

Differential Revision: D27953966

fbshipit-source-id: 549796c0aa85c604d0b0d404929da4e371471e49
2021-04-27 13:33:25 -07:00
Andrey Chursin
3a0ed3f7ab checkout: separate native checkout code in merge.py into separate function
Reviewed By: quark-zju

Differential Revision: D27953968

fbshipit-source-id: 0bc80f0851d02795a02cc24344d878e4d4a6400c
2021-04-27 13:33:25 -07:00
Andrey Chursin
052685b356 status: introduce hg status bindings
Summary: This crate does not calculate status, but allows to convert python status into rust status, that can later be used by python code

Reviewed By: quark-zju

Differential Revision: D27953962

fbshipit-source-id: ab91d9d035140e43d8b17988b24bd030af77c96d
2021-04-27 13:33:24 -07:00