Commit Graph

63313 Commits

Author SHA1 Message Date
Mark Juggurnauth-Thomas
2b8d5ab75d undo: expand heuristics for uncommit/unamend hint
Summary:
The `commit` or `amend` command might not have been the first item in the
command list (e.g. there could have been a custom config option).  Expand the
heuristics for detecting the `commit` and `amend` cases to account for this.

Reviewed By: quark-zju

Differential Revision: D26545339

fbshipit-source-id: a5b1fc8ccc87989e742fce1fa79273266892ed79
2021-02-22 02:46:53 -08:00
Alex Hornby
8ea6f3131f mononoke: async make_metadata_sql_factory
Summary: Remove some compat()

Reviewed By: farnz

Differential Revision: D26548790

fbshipit-source-id: 325a2f9b2411c4e99297d781ed5f58650bb07ba3
2021-02-22 00:21:13 -08:00
Johan Schuijt-Li
0a16d7d2b8 netspeed increase timeout
Summary:
When testing over slow connections with packet loss, 10 seconds isn't nearly
long enough. Extend to 5 minutes.

Reviewed By: singhsrb

Differential Revision: D26571682

fbshipit-source-id: 8ebdcf07cb2f0fb001640666bdea02f69ad5fb7b
2021-02-21 23:06:23 -08:00
Johan Schuijt-Li
1536917be2 support dynamicconfig in clones
Summary: Dynamic config only gets applied once the local repo is instantiated, but source peer is created long before that. This causes it to have missing configuration when being instantiated. Apply dynamic config much earlier in case of a clone so that srcpeer can use dynamicconf as well.

Reviewed By: DurhamG

Differential Revision: D26543635

fbshipit-source-id: 88c16d345f5116bfaaf57c593eb09145df81b4fb
2021-02-21 22:25:24 -08:00
svcscm
e7a4edb57e Updating submodules
Summary:
GitHub commits:

31f96f9af6
a49576bf51

Reviewed By: bigfootjon

fbshipit-source-id: 3c344e6e89757468bd49a09919d204946f59a2ec
2021-02-21 22:25:24 -08:00
svcscm
29b4f29dbb Updating submodules
Summary:
GitHub commits:

a0eb44d200

Reviewed By: bigfootjon

fbshipit-source-id: e876cf558e8780b5c6005d1c043c00d8b0fa693a
2021-02-21 18:23:41 -08:00
svcscm
38d46f3da5 Updating submodules
Summary:
GitHub commits:

f43c285cdb
2a030b0404
01098ec5d2

Reviewed By: bigfootjon

fbshipit-source-id: 69e017e452444eba36c727e7950e327d0685cb6a
2021-02-20 18:12:16 -08:00
Zeyi (Rice) Fan
f1bec6dc68 mkscratch: remove old code
Summary: throw-in-trash-delete

Reviewed By: chadaustin

Differential Revision: D26534019

fbshipit-source-id: 59b0050a3851cb80da7cbeccf3940fd13094165f
2021-02-20 15:42:37 -08:00
Zeyi (Rice) Fan
58a9d11260 scratch: validate subdir path in mirror mode
Summary:
This diff ensures no one can exploit mkscratch's scratch directory. In reality probably no one would do this but just to add it as a precaution.

And also the renaming, I didn't land the rename changes in my previous diff and this diff fix that so we don't roll the "nested" mode name out.

Reviewed By: xavierd

Differential Revision: D26526702

fbshipit-source-id: 04ec883e4d1c0c3e9b54b6274e5113c8b4845b3f
2021-02-20 15:42:37 -08:00
svcscm
2e0149d49f Updating submodules
Summary:
GitHub commits:

b838314823
830810d14b
46192b38db
ac7673d718
987c672a53
cb0a4d34a9
4653e85645

Reviewed By: bigfootjon

fbshipit-source-id: ef69960a23cee9b5121d3221a8a499e7544e53ca
2021-02-20 15:42:36 -08:00
svcscm
7fe0b83b44 Updating submodules
Summary:
GitHub commits:

150d0576af

Reviewed By: bigfootjon

fbshipit-source-id: 156c322b9ab905723c096360f8940bcfb215eac1
2021-02-20 08:06:32 -08:00
Yair Gottdenker
807191cc2e changing AsyncServerSocket::acceptError to receive exception_wrapper
Reviewed By: yfeldblum

Differential Revision: D25514804

fbshipit-source-id: 7e6ad5c6063d2cf5047f656c0f2336b34576c60b
2021-02-20 08:01:53 -08:00
svcscm
0c66a89ee3 Updating submodules
Summary:
GitHub commits:

641868a881
a9fdc51df3

Reviewed By: bigfootjon

fbshipit-source-id: 1663196995e0ed168b1d57f787d6a2f5477ffb44
2021-02-20 08:01:53 -08:00
svcscm
28d349c0e1 Updating submodules
Summary:
GitHub commits:

ab40b0c32b
f764c908e7
908a4fd57a
5786dd9ef6
fab36435cf

Reviewed By: bigfootjon

fbshipit-source-id: 053dcd1d0469e1b5e399fb7fb6ef4c1e21209924
2021-02-20 01:49:01 -08:00
Andrey Chursin
987e6426fc checkout: print removed cwd warning in nativecheckout
Summary:
This warning was printed by old checkout, keeping it in nativecheckout too
The warning tells user that current working directory was removed during checkout

This diff also makes test-update-names.t to use nativecheckout. Otherwise last test fails on remote repo, because pyworker does not emit the deleted cwd warning

Reviewed By: quark-zju

Differential Revision: D26558188

fbshipit-source-id: 1f6ea2ea1ac7358ce2f06fed25069656481b30e6
2021-02-20 01:29:11 -08:00
Andrey Chursin
d8e40c89a0 tests: test-update-names.t to use remoterepo
Summary: After this update, test-update-names.t tests are using native checkout when congfig is set

Reviewed By: quark-zju

Differential Revision: D26558186

fbshipit-source-id: f70f65344b5f2209f313e3edd5fd7f541318459a
2021-02-20 01:29:10 -08:00
Andrey Chursin
78f7bab434 tests: add newremoterepoto tinit.sh
Summary: Those shortcuts can be used to setup remote repo via single line

Reviewed By: quark-zju

Differential Revision: D26558187

fbshipit-source-id: c6fd48ed38cc4dbaad4db714c4dfd76ec26bf608
2021-02-20 01:29:10 -08:00
Andrey Chursin
adb28ae0aa checkout: expose stats to Python
Reviewed By: quark-zju

Differential Revision: D26552742

fbshipit-source-id: fccc812eb1f3ad150580538a1d8fa4e8afd3bd7b
2021-02-20 01:29:10 -08:00
Andrey Chursin
2646ed375b checkout: record updates after checkout
Summary: This is needed to correctly show status after checkout

Reviewed By: quark-zju

Differential Revision: D26551119

fbshipit-source-id: 3ab576df8132b1fb8cccf507717923ecf3084757
2021-02-20 01:29:09 -08:00
Andrey Chursin
6a6471628f checkout: make checkout plan reusable
Summary:
This diff makes CheckoutPlan::apply take &self instead of self, so that CheckoutPlan can be preserved.
This result in cloning of some paths(but realistically, they probably get moved anyway in this code path, so this should not have perf impact)

This will simplify pycheckout as it will allow to keep plan and later use it to update dirstate

This diff also exposes accessors for dirstate update (e.g. removed_files / updated_content_files / updated_meta_files)

Reviewed By: quark-zju

Differential Revision: D26551118

fbshipit-source-id: 4e2d02da0a692345eae7d5e7124663c577e9029c
2021-02-20 01:29:09 -08:00
Andrey Chursin
ae056f1cbf checkout: integrate native checkout into merge.py
Summary:
Currently native checkout works only on simplest cases when there is no merge / rebase and working copy is clean
Additionally, all native checkout logic is gated with experimental.nativecheckout config

Reviewed By: quark-zju

Differential Revision: D26501903

fbshipit-source-id: 2c1b2fd303f1cb1f461d4854ea60a7274ae38732
2021-02-20 01:29:09 -08:00
Xavier Deguillard
b23e4be65f inodes: remove EdenMount::channelType
Summary:
By moving the createChannel outside of the EdenMount class, we no longer need
the channelType alias, so let's do it.

Reviewed By: kmancini

Differential Revision: D26500113

fbshipit-source-id: f992ed2aaac5d692d316d06340bf9b219a2d7006
2021-02-19 22:38:23 -08:00
Xavier Deguillard
1cfe49b873 nfs: implement the getattr RPC
Summary: The RPC just translate the various `struct stat` fields into the fattr3 ones.

Reviewed By: kmancini

Differential Revision: D26389793

fbshipit-source-id: 48c6e109d5d2cb62cab096114c37314d7833035f
2021-02-19 22:38:23 -08:00
svcscm
43686de416 Updating submodules
Summary:
GitHub commits:

fea08e9d98
7209fb2b65
00898e80fa
182db23bb9

Reviewed By: bigfootjon

fbshipit-source-id: 0e2a6bf66f0d295ccd580e2afcc7fd8f86789de8
2021-02-19 22:38:22 -08:00
svcscm
d9cc347ba4 Updating submodules
Summary:
GitHub commits:

2688800313
1a47cf3ac7
22e61b3f52
2c1c288b1e
7343eb4a74
39e6bd641a
36ba63f3a7
10a6feed49

Reviewed By: bigfootjon

fbshipit-source-id: 5637d2cfe02b2c8e3f05bf3a6589993920ac96ac
2021-02-19 19:54:36 -08:00
Jun Wu
f3b00a6c0d edenfs-client: print meaningful warnings for non-utf8 paths
Summary:
Make the status fast path print warnings about non-utf8 names and continue on
other valid utf-8 names. It matches the behavior of the Python status code
path.

Before this change, an invalid utf-8 name would just print:

  abort: invalid utf-8 sequence of 1 bytes from index 7

without telling which file it is.

Reviewed By: markbt

Differential Revision: D26553514

fbshipit-source-id: 6e26a2a8d738e9001d878a80c0dc82ae6d18a97c
2021-02-19 18:32:11 -08:00
svcscm
0ac9d59fba Updating submodules
Summary:
GitHub commits:

94a04123d0
5f24a7751d
621b5b0b62
ee810f189a
d904233d2f
0f1490670b
b1a364b9dd
feb8fcc859

Reviewed By: bigfootjon

fbshipit-source-id: fad8204dc7fc12ad83e288966f9d79217194f454
2021-02-19 16:03:28 -08:00
Jun Wu
049d411aa0 hgcommands: init EDENSCM_LOG "env_logger" that writes to error stream
Summary:
Similar to D26142175 (324f47b1f0), initialize the logger that writes to the error stream of
IO.

Reviewed By: sfilipco

Differential Revision: D26518014

fbshipit-source-id: 2547f4a8f3dba1f624fd00798672f1148869e250
2021-02-19 15:22:07 -08:00
Jun Wu
568e0d2258 tracing-collector: mark default_collector return LookupSpan
Summary:
`LookupSpan` is needed to chain the fmt logger:

  impl<S, N, E, W> Layer<S> for tracing_subscriber::fmt::Layer<S, N, E, W>
  where
      S: Subscriber + for<'a> LookupSpan<'a>,
      N: for<'writer> FormatFields<'writer> + 'static,
      E: FormatEvent<S, N> + 'static,
      W: MakeWriter + 'static,

Reviewed By: sfilipco

Differential Revision: D26518020

fbshipit-source-id: fda996683e2c68cede4778e653845bd23a1fcb1c
2021-02-19 15:22:06 -08:00
Jun Wu
3aba8d89b0 clidispatch: add an API to obtain "writable" stderr stream
Summary:
Add an API to obtain an `io::Write` object for the error stream.
It will be used by next changes.

Reviewed By: sfilipco

Differential Revision: D26518021

fbshipit-source-id: bc39fa54f83be8ff2c8fbc803700c4fe57e814bd
2021-02-19 15:22:06 -08:00
Jun Wu
25230c0c2a clidispatch: make IO clonable
Summary:
Make it possible for IO to be cloned. This allows, for example, tracing or
progress bar logic to keep a reference of IO.

Reviewed By: sfilipco

Differential Revision: D26518028

fbshipit-source-id: d5ca7f4347251c68f7491f784f647ee80c47d159
2021-02-19 15:22:06 -08:00
Jun Wu
43bee8fbbc clidispatch: make IO fields private
Summary:
We're going to tweak the internals of IO. Making its fields private to allow
that.

Reviewed By: sfilipco

Differential Revision: D26518023

fbshipit-source-id: a1eed46f4f87a3b4b63e56be733102058b4d72d6
2021-02-19 15:22:05 -08:00
Jun Wu
531fa41c8a clidispatch: add parking_lot
Summary: Add parking_lot dep. It will be used later.

Reviewed By: sfilipco

Differential Revision: D26518019

fbshipit-source-id: 76124a2f70731b30017a6d7019eef9dc856fe54a
2021-02-19 15:22:05 -08:00
Simon Farnsworth
1641740028 Use a wrapper around the Thrift Manifold client
Summary: In preparation for adding C++ client alternatives, use a wrapper around the Thrift client. This currently just calls the Thrift client directly, but will grow the ability to call the C++ client, too. For now, there's a dummy parameter to control the use of the C++ client.

Reviewed By: ahornby

Differential Revision: D26513598

fbshipit-source-id: b26cd9a9d89ab0502510b8533df4a60f5ca65292
2021-02-19 12:40:15 -08:00
generatedunixname89002005307016
3af3b05745 Add annotations to eden/fs/cli/redirect.py
Reviewed By: xavierd

Differential Revision: D26546081

fbshipit-source-id: 59bcbfba1285521346f77ca3f749175a7cd59ca5
2021-02-19 11:55:08 -08:00
Egor Tkachenko
2aca1749cb Add RepoID to scuba logs
Summary: As title says

Reviewed By: StanislavGlebik

Differential Revision: D26543578

fbshipit-source-id: 713c656c8e1d424e34d115dbb799c74d3c789a84
2021-02-19 11:28:42 -08:00
Lukas Piatkowski
cd0b6d50e2 autocargo v1: changes to match autocargo v2 generation results.
Summary:
The changes (and fixes) needed were:
- Ignore rules that are not rust_library or thrift_library (previously only ignore rust_bindgen_library, so that binary and test dependencies were incorrectly added to Cargo.toml)
- Thrift package name to match escaping logic of `tools/build_defs/fbcode_macros/build_defs/lib/thrift/rust.bzl`
- Rearrange some attributes, like features, authors, edition etc.
- Authors to use " instead of '
- Features to be sorted
- Sort all dependencies as one instead of grouping third party and fbcode dependencies together
- Manually format certain entries from third-party/rust/Cargo.toml, since V2 formats third party dependency entries and V1 just takes them as is.

Reviewed By: zertosh

Differential Revision: D26544150

fbshipit-source-id: 19d98985bd6c3ac901ad40cff38ee1ced547e8eb
2021-02-19 11:03:55 -08:00
Simon Farnsworth
7747032bdf Move Thrift Manifold client blobstore into its own modules
Summary:
I'm going to start shifting from Thrift to C++ client - to make reuse easier, put the Thrift client in its own module, with the Thrift-specific tests, and put shared tests in a shared module.

While in here, rename the blobstore to ManifoldBlobstore, so that it's clear that it's not just a Thrift blobstore, ready for it being a mix of C++ and Thrift.

Reviewed By: ahornby

Differential Revision: D26513599

fbshipit-source-id: 9e111583f1700eea18e83032b9ca1b9c8babc83e
2021-02-19 10:50:16 -08:00
Durham Goode
fb30e5ccd0 dynamicconfig: add tracing
Summary: Adds some tracing for debugging dynamicconfigs.

Reviewed By: quark-zju

Differential Revision: D26501257

fbshipit-source-id: ae6cf92552988c4eccb8f5a3bbaf930e84158133
2021-02-19 10:45:03 -08:00
Meyer Jacobs
c74570a4b6 newstore: Add FetchError type for strongly typed fetch errors
Summary: Introduce `FetchError` type, with separates "not found" errors (which require a key), from other errors (which may or may not have an associated key). This allows us to easily fall back for only "not found" errors propagate other fetch errors to the caller. The current version of `FetchError` still does not eliminate redundantly storing the key for cases like EdenApi, where the key may be part of the error type itself. This optimization may not be worthwhile after we refactor these store implementations to use `HgId` instead of `Key`.

Reviewed By: kulshrax

Differential Revision: D26410215

fbshipit-source-id: e6198d54de64b41ff696cabd64affc8dbaa41cf9
2021-02-19 10:41:28 -08:00
Meyer Jacobs
62c0be0bfd newstore: introduce WriteStore adapter for legacy HgIdMutableDeltaStore
Summary: Added `WriteStore` implementation to `LegacyDatastore` wrapper, for types implementing `HgIdMutableDeltaStore`.

Reviewed By: kulshrax

Differential Revision: D26382709

fbshipit-source-id: 1482d43668042045a48a6f0252f72261a19a288d
2021-02-19 10:41:27 -08:00
Meyer Jacobs
347979d283 newstore: introduce LegacyDatastore wrapper to adapt stores implementing HgIdDataStore to new API
Summary: Add a wrapper type, `LegacyDatastore`, along with a `ReadStore` implementation that reads via the `HgIdDataStore` trait, for any wrapped types which implement that trait.

Reviewed By: kulshrax

Differential Revision: D26381207

fbshipit-source-id: d28dc3095adf20403f8b993d5a939d1e41c77462
2021-02-19 10:41:27 -08:00
Meyer Jacobs
0d8a953107 newstore: add EdenApi FileEntry ReadStore adapter
Summary:
Added a new `ReadStore` implementation for EdenApi `FileEntry`s. This is pretty much identical to the `TreeEntry` implementation, but calls the `files` method instead, which does not yet support attributes or per-entry errors (although they are both supported on the wire).

I re-use the type-agnostic indexedlog `Entry` adapter for file support for now, to keep things minimal. This unfortunately means the output type of the `Fallback` combinator is a bare `Entry` for both files and trees, losing us some type safety, but I think this is acceptable for now, until I eventually introduce type-safe constructors and value types. Making the file and tree value output types distinct will only be necessary with the introduction of attribute support, or when we'd like to move away from using an "opaque blob" representation for them.

Reviewed By: kulshrax

Differential Revision: D26348577

fbshipit-source-id: 1a930af6e4b5b4d8bacd266c3e51db96cee92dbd
2021-02-19 10:41:27 -08:00
Meyer Jacobs
bccd649aa0 newstore: add write support to FallbackStore combinator
Summary:
Added write support to the `FallbackStore` combinator, along with a flag to control writing to the write store. This enables the "preferred" store to act as a read-through cache for the "fallback" store, with an optional "read only" mode via the "write" flag.

Currently, errors in the write path are silently ignored.

Reviewed By: kulshrax

Differential Revision: D26233602

fbshipit-source-id: acce020a877b87bfee87763e984923c7c51b2b17
2021-02-19 10:41:26 -08:00
Meyer Jacobs
7bd30eb98e newstore: introduce basic WriteStore trait and adapter for IndexedLog
Summary: Introduces a minimal WriteStore trait, with a basic implementation for IndexedLog. Currently, there's no explicit key in the `WriteStream`. Instead, it is implicit that the value type to be written should contain a key. In the future, we may introduce an abstraction over value types which do and do not contain a key.

Reviewed By: kulshrax

Differential Revision: D26213028

fbshipit-source-id: 75867ff7229d594346e7e7624e8ca91f8205fed4
2021-02-19 10:41:26 -08:00
Andrey Chursin
72dfb176b5 checkout: chunk prefetches during apply_remote_data_store
Summary: This helps with pipelining (once chunk is prefetched it will start rolling out to fs) and also helps with limiting number of keys prefetched at once

Reviewed By: quark-zju

Differential Revision: D26496789

fbshipit-source-id: 9aa6b08c1605ab2a06a02347897f5dcfa22297fd
2021-02-19 10:30:01 -08:00
Andrey Chursin
c7269df47e checkout: impl Display for CheckoutPlan
Summary: Also add __str__ Python binding. Usefull for debugging

Reviewed By: quark-zju

Differential Revision: D26496791

fbshipit-source-id: 8bcfc89918c5fafc9ac8e42ef91c576b160d943c
2021-02-19 10:30:01 -08:00
Andrey Chursin
de6e57e067 checkout: remove allow(dead_code)
Summary: Also removing todo: test from checkout plan as there are tests already

Reviewed By: singhsrb

Differential Revision: D26496790

fbshipit-source-id: eb99771cb0cda7a90477190875997027b25e2482
2021-02-19 10:30:01 -08:00
Jun Wu
3119869537 dag: de-duplicate logic about merging flat segments
Summary:
Move the logic to a common method. A side effect is that
IndexedlogIdDag needs to calculate `last_span.high` again, and
InProcessIdDag needs to calculate `last_store_id` again. But it's
probably okay since the merge is rare and the InProcessIdDag operations should
be considered fast even if it's called frequently.

Reviewed By: sfilipco

Differential Revision: D26504915

fbshipit-source-id: e215ffe9fef7948b7b662dba3ed990e374be989a
2021-02-19 10:30:01 -08:00
Jun Wu
3915e59426 dag: add a few more tests about IdDag segment merging behavior
Summary: Add a few more tests to the generic IdDag tests.

Reviewed By: sfilipco

Differential Revision: D26415514

fbshipit-source-id: 5ef2a1d4e03527b184a07d94de91c64a05427b90
2021-02-19 10:30:00 -08:00