Commit Graph

59782 Commits

Author SHA1 Message Date
Durham Goode
b821ab3766 contentstore: make data rotatelog size configurable
Summary:
In a future diff we'll increase the size of the rotatelog temporarily
during clones. To do so we need it to be configurable.

Reviewed By: quark-zju

Differential Revision: D23089541

fbshipit-source-id: 5010e417a83a2611283322f1dbb7023f4286f503
2020-08-16 16:44:16 -07:00
Durham Goode
76d3d46837 revisionstore: remove from_path from LocalStore
Summary:
from_path is an awkward constructor because it doesn't pass any other
information, like a config object. It also requires that the constructor be very
generic across all the stores. Right now it's only needed for pack files, so
let's move it to it's own trait that is limited to pack files.

This will allow us to make the indexedlog store constructors more versatile in a
later diff. Once we get rid of pack files we can delete the StoreFromPath trait
entirely.

Reviewed By: xavierd

Differential Revision: D23089542

fbshipit-source-id: ea6c50853e5d5390a029002ef5d15c74fe41fe69
2020-08-16 16:44:16 -07:00
svcscm
5dc7a2a7e8 Updating submodules
Summary:
GitHub commits:

013b287cd9
7d1e1f8b53

Reviewed By: yns88

fbshipit-source-id: ba621446ab7f0d12d933f40897dd7fd35232beb2
2020-08-16 13:22:12 -07:00
svcscm
e418d3ad19 Updating submodules
Summary:
GitHub commits:

cf43d53b74

Reviewed By: yns88

fbshipit-source-id: 266cb07d4b6af56db60dc8dfe1b7015a4c316c7f
2020-08-15 13:11:36 -07:00
svcscm
195e0ed0a5 Updating submodules
Summary:
GitHub commits:

40df0f8a64

Reviewed By: yns88

fbshipit-source-id: 405213b1db6e7cd56d0f7dbdccead9eaa7d19490
2020-08-15 13:11:36 -07:00
svcscm
6df02c3aa6 Updating submodules
Summary:
GitHub commits:

03e2b8b90e

Reviewed By: yns88

fbshipit-source-id: 9de29685d96ec96fbdf7eb23a2789968ffe49dc3
2020-08-15 03:55:48 -07:00
Jun Wu
f61aaf3a15 repo: add dageval API
Summary:
Similar to `changelog.dageval`, but provides extra functions like `public`,
`draft`, `obsolete`, etc.

Reviewed By: sfilipco

Differential Revision: D23036070

fbshipit-source-id: b985f2b338a3dce11bddf53c00c30e4887762676
2020-08-14 22:00:26 -07:00
Jun Wu
a3531f9a8e changelog2: improve dageval
Summary:
Make it work with closure and `lambda dag: dag.only(...)`.
This is useful when there is a name conflict with a local variable, like:

   only = ...
   cl.dageval(lambda: only(...)) # only refers to the local variable.
   cl.dageval(lambda dag: dag.only(...)) # only refers to the dag operation.

Besides, drop `func_` so they are Py3 compatible.

Reviewed By: sfilipco

Differential Revision: D23036064

fbshipit-source-id: 8d32a34c51b6ba945cda5be313f9d71464f813b7
2020-08-14 22:00:26 -07:00
Jun Wu
2db783bed8 revlogindex: make parent_revs fallible
Summary: If parent_revs gets an out-of-bound rev, it should fail.

Reviewed By: sfilipco

Differential Revision: D23036071

fbshipit-source-id: 7fae0fd5adf07ac3c933a29d7d06289d8d740c60
2020-08-14 22:00:26 -07:00
Jun Wu
0f838d7abf revlogindex: fix \0 header handling
Summary:
If the text starts with `\0`, the `\0` should be considered as part of the
uncompressed text instead of a separated header.

Reviewed By: sfilipco

Differential Revision: D22970575

fbshipit-source-id: 49e8a1a1ea42a3c4cf153b70f59fd0558dcfcede
2020-08-14 22:00:26 -07:00
Jun Wu
54a1a620d0 revlogindex: fix parent handling
Summary:
The parent handling is unsound when there are revs that are skipped. Fix it by
reasoning about commit hashes for parents.

Reviewed By: sfilipco

Differential Revision: D23036078

fbshipit-source-id: 8f710171471025cd48b3bd8f6ea57c68330eb8b8
2020-08-14 22:00:26 -07:00
svcscm
6e8017fde9 Updating submodules
Summary:
GitHub commits:

bc59f8b96f
69760b4d05

Reviewed By: yns88

fbshipit-source-id: b0bfc8b29cecbaa946a5cb16029a1ee6538ee1cd
2020-08-14 22:00:25 -07:00
svcscm
ca69914ed7 Updating submodules
Summary:
GitHub commits:

0e46975f32
e93f14fb7f
dc5a4252e1
209bde495e
01f4612acd

Reviewed By: yns88

fbshipit-source-id: ac83f388b01dc9745600c8ea3a36e1eb4380c189
2020-08-14 18:59:36 -07:00
Xavier Deguillard
f4f159537f utils: add a platform independent FileUtils
Summary:
Up to now, Windows had to have its own version of folly::{readFile, writeFile,
writeFileAtomic} as these only operate on `char *` path, which can only
represent ascii paths on Windows. Since the Windows version is slightly
different from folly, this forced the code to either ifdef _WIN32, or use the
folly version pretending that it would be OK. The Windows version was also
behaving slightly differently from folly. For instance, where folly would
return a boolean to indicate success, on Windows we would throw an exception.

To simplify our code, add type safety and unify both, we can implement our own
wrappers on top of either folly or Windows APIs.

We still have some code that uses folly::readFile but these should only be
dealing with filedescriptors. As a following step, we may want to have our own
File class that wraps a file descriptor/HANDLE so we can completely remove all
uses of folly::readFile.

Reviewed By: wez

Differential Revision: D23037325

fbshipit-source-id: 2b9a026f3ee6220ef55097abe649b23e38d9fe91
2020-08-14 18:56:33 -07:00
Arun Kulshreshtha
523013c808 cmdlib: remove extra comment slashes
Reviewed By: quark-zju

Differential Revision: D23111025

fbshipit-source-id: b8606c322439c41097d739df59b551a8432e7fe4
2020-08-14 18:04:26 -07:00
Xavier Deguillard
17776fbbc1 win: various micro-optimization for opendir/readdir
Summary:
After enabling strace profiling for the dispatcher, it became very clear that
once files are populated on disk, most of the notification in edenfs come from
listing directories. While looking at the code to find any improvements, I
picked up a couple of low hanging fruits and cleanup that should help (not
measured).

Reviewed By: chadaustin

Differential Revision: D23121434

fbshipit-source-id: 8a8b369f3be6ffb6097e6e12ab0f07af0a6d56b7
2020-08-14 17:35:50 -07:00
Xavier Deguillard
76ea3054de win: conditionally enable negative path caching
Summary:
From a quick experiment, this greatly cuts down on the amount requests to
nonexistent files. For instance, the .hg directory in folders is now only
looked up once and no longer afterwards.

Reviewed By: wez

Differential Revision: D23112343

fbshipit-source-id: 223134ca591054ae9ac2e839033bbd1b714443da
2020-08-14 17:35:50 -07:00
Xavier Deguillard
3fb1b56ea7 win: remove PrjfsChannel::removeCachedFile
Summary: This function was unused, remove it.

Reviewed By: wez

Differential Revision: D23112344

fbshipit-source-id: e37dd1e07067cf457eeb5d6c0af35db3dfab9b43
2020-08-14 17:35:50 -07:00
Xavier Deguillard
79c8f0e86e win: unify the EdenDispatcher lifetime management
Summary:
This is purely moving code around to be more similar between Unices/Windows.
At some point in the future, I'd like to see just one EdenDispatcher class in
the shared code with as few platform specific code (ie: ifdef) as possible,
this is small step in this direction.

Reviewed By: wez

Differential Revision: D23112345

fbshipit-source-id: feb276040aea106d5951af30c5d445b4cb654e01
2020-08-14 17:35:50 -07:00
svcscm
8698555a5e Updating submodules
Summary:
GitHub commits:

bc74b01fab
0ed58531b6
29c3fb1033
dee7e0c95d
510c66fb75
a6cbfa8ab1
ea90de3029
d3ffaba7d1

Reviewed By: yns88

fbshipit-source-id: ceb44bca6450ef9ff633dd38fa50d9be0b970ae2
2020-08-14 16:40:34 -07:00
Xavier Deguillard
f1da417cea win: use the strace logger
Summary:
On Linux, all the notifications are sent to the strace logger, let's do the
same on Windows. Whenever possible, I've tried to use the name of the Linux
syscalls that correspond to the notification.

Reviewed By: chadaustin

Differential Revision: D23105536

fbshipit-source-id: 31c6e545cdec93b0f751682e34c34b894b2890c4
2020-08-14 16:01:27 -07:00
Xavier Deguillard
e0ec7d8896 fsinfo: fix cargo test
Summary:
Somehow `make local` doesn't complain about missing features, but `cargo test`
does.

Reviewed By: singhsrb

Differential Revision: D23132496

fbshipit-source-id: cdbfe1faf194d61d86493a760e45fd38087d2956
2020-08-14 13:38:41 -07:00
Skotch Vail
0db33b30c5 sparse: debugsparsematch accepts filesets
Summary: Use filesets so that we don't have to worry about exceeding command line

Reviewed By: quark-zju

Differential Revision: D23008329

fbshipit-source-id: bbfef9ecf23b810f4fa6ca8a6de1bbeb9330ae09
2020-08-14 09:46:32 -07:00
Skotch Vail
8780a3f66b sparse: debugsparsematch temp, multiple, exclude sparse profiles
Summary: This diff has a unit test to make sure on the fly sparse profiles work. We also allow for more than one sparse profile, and for multiple exclusion sparse profiles.

Reviewed By: quark-zju

Differential Revision: D23004062

fbshipit-source-id: 15f00401084c89a77d8e7bdd8c7eb688e20d131b
2020-08-14 09:46:32 -07:00
svcscm
5768e63bee Updating submodules
Summary:
GitHub commits:

095cea22c7
7cdef5be5b
dd476d456a

Reviewed By: yns88

fbshipit-source-id: 553bc0da5b1639b80f79cf381d007a23f62c7644
2020-08-14 09:46:32 -07:00
svcscm
844ad8356d Updating submodules
Summary:
GitHub commits:

df78f1c130
32c32c3a59
599ce398e0
988a7b19d1

Reviewed By: yns88

fbshipit-source-id: 076f50ddd362a11e536463b26a768da2d6229dd7
2020-08-14 03:32:37 -07:00
Tao Chen
f55d4fc261 Remove old getSelection APIs from ServiceSelectorCache
Summary: Remove old getSelection APIs from ServiceSelectorCache

Reviewed By: ovoietsa

Differential Revision: D23070503

fbshipit-source-id: ea013e43215b8bc7aa463efe7b374d67749dda97
2020-08-14 03:21:12 -07:00
svcscm
bea7694e40 Updating submodules
Summary:
GitHub commits:

ab1788308a
e52041d316
70d9cbe57f
d63ed44218

Reviewed By: yns88

fbshipit-source-id: 28dc64a3a278339fb23a2348913575c4fe96af96
2020-08-14 02:56:41 -07:00
Alex Hornby
213edc10ce mononoke: limit queue peeking from scrub blobstore when one store has missing value
Summary: When running manual scrub for a large repo with one empty store, we are doing one peek per key.  For keys that have existed for some time this is unnecessary as we know the key should exist and slows down the scrub.

Reviewed By: farnz

Differential Revision: D23054582

fbshipit-source-id: d2222350157ca37aa31b7792214af4446129c692
2020-08-14 02:37:45 -07:00
Mark Thomas
dba3ef35ca repo_client: extract common calls to bookmarks_movement
Summary:
Extract the calls to bookmarks_movement to separate functions to avoid duplication and
make the post-resolve action functions easier to read.

Reviewed By: StanislavGlebik

Differential Revision: D23057045

fbshipit-source-id: c6b5a8cdb2399e89c174c3df844529d4b5309edf
2020-08-14 02:28:56 -07:00
Mark Thomas
c529e6a527 bookmarks_movement: refactor bookmark movement for pushrebase
Summary: Refactor control of movement of non-scratch bookmarks through pushrebase.

Reviewed By: krallin

Differential Revision: D22920694

fbshipit-source-id: 347777045b4995b69973118781511686cf34bdba
2020-08-14 02:28:55 -07:00
Mark Thomas
a16b88d1c5 pushrebase: remove OntoBookmarkParams and clean up interface
Summary:
Some parts of the `pushrebase` public interface will be re-exported from `bookmarks_movement`.

Clean these up in preparation:

* Remove `OntoBookmarkParams` as it is now a simple wrapper around `BookmarkName` that
  prevents us from using a reference.

* Make the bundle replay data `Option<&T>` rather than `&Option<T>`, allowing us to
  use the former when available.  The latter can be readily converted with `.as_ref()`.

* Rename `SuccessResult` to `Outcome` and `ErrorKind` to `InternalError`.

Reviewed By: krallin

Differential Revision: D23055580

fbshipit-source-id: 1208a934f979a9d5eb73310fb8711b1291393ecf
2020-08-14 02:28:55 -07:00
Mark Thomas
c59c2979d2 bookmarks_movement: refactor bookmark movement for force-pushrebase
Summary:
Refactor control of movement of non-scratch bookmarks through force-pushrebase
or bookmark-only pushrebase.  These are equivalent to ordinary pushes, and so
can use the same code path for moving the bookmarks.

This has the side-effect of enabling some patterns that were previously not
possible, like populating git mappings with a force-pushrebase.

Reviewed By: ikostia

Differential Revision: D22844828

fbshipit-source-id: 4ef71fa4cef69cc2f1d124837631e8304644ca06
2020-08-14 02:28:54 -07:00
Mark Thomas
279c3dcd8f bookmarks_movement: refactor bookmark movement for push
Summary: Refactor control of movement of non-scratch bookmarks through plain pushes.

Reviewed By: krallin

Differential Revision: D22844829

fbshipit-source-id: 2f1a89e1d0f69880f74b7bc135144bfb305a918e
2020-08-14 02:28:54 -07:00
Mark Thomas
e0bdff5188 bookmarks_movement: refactor scratch bookmark movement
Summary:
Refactor control of movement of scratch bookmarks to a new `bookmark_movement` crate
that will contain all bookmark movement controls.

Reviewed By: krallin

Differential Revision: D22844830

fbshipit-source-id: 56d25ad45a9328eaa079c13466b4b802f033d1dd
2020-08-14 02:28:53 -07:00
Alex Hornby
61046e3adb rust: point interment crate to internment master
Summary: Update internment to point at its latest master branch commit.  Upstream has merged my PR to use DashMap inside internment, but they haven't cut a new crates release yet.

Reviewed By: jsgf, krallin

Differential Revision: D23075070

fbshipit-source-id: 8f4ec0e3ddbefd672c3040fb174d1cf5f6c1a94a
2020-08-14 02:15:24 -07:00
Alex Hornby
d59dd787c5 mononoke: make blobstore ctime a bit easier to use
Summary: Ctime is an Option<i64>, so rather than as_ctime()/into_ctime() use the fact that it's fairly small and Copy to just .ctime()

Reviewed By: krallin

Differential Revision: D23081739

fbshipit-source-id: be62912eca02e5c29d7473d6f386d98df11000dd
2020-08-14 02:09:46 -07:00
Durham Goode
661d02d6d5 http_client: disable ssl revocation checking on Windows
Summary:
Windows defaults to checking a revocation server for ssl certs. Inside
our datacenter it can't reach the server and fails. We don't have this on for
any other platforms, so let's disable it.

Reviewed By: sfilipco

Differential Revision: D23121739

fbshipit-source-id: 4d44d2a065bf340a8f74332553deb09a9c61be9b
2020-08-13 23:17:28 -07:00
Ailin Zhang
58561f9df2 use Eden native import in prefetchBlobs
Summary: Previously we use HgImporter prefetch request in `prefetchBlobs()`, but using `getBlob()` can give us more control over the prefetch process later. So now `getBlob()` is used in `prefetchBlobs()` when `useEdenNativePrefetch` is configured as true.

Reviewed By: kmancini

Differential Revision: D22984848

fbshipit-source-id: 0bd0b1c5b50bb16da36f188915904d0223827dc3
2020-08-13 21:09:09 -07:00
svcscm
fdd4fe4a57 Updating submodules
Summary:
GitHub commits:

5cb7fbfb8a
08caf348fd

Reviewed By: yns88

fbshipit-source-id: 8f0b3ae17c8832cac69baa6d600ed080bd9b1980
2020-08-13 21:09:09 -07:00
svcscm
c672b224bc Updating submodules
Summary:
GitHub commits:

b72912a011
8cde5e001a
fbee1057be

Reviewed By: yns88

fbshipit-source-id: b77b6d76aa6e5e2f29c851c4ea5fa7782fb2c025
2020-08-13 12:40:57 -07:00
Stanislau Hlebik
f68531f81c mononoke: add a flag to disable short history fetching
Summary: Let's use new flag to enable/disable short history for getpack request

Reviewed By: krallin

Differential Revision: D23080200

fbshipit-source-id: 7aa0be6ded0601fa4d31d4b9ff8792a4f8d91b19
2020-08-13 10:37:40 -07:00
svcscm
f0e2989f7a Updating submodules
Summary:
GitHub commits:

0062e82e07

Reviewed By: yns88

fbshipit-source-id: 5f8bcc54321cd40cbfbe3afacad8ddb79ee927e3
2020-08-13 10:33:43 -07:00
Meyer Jacobs
b9ce375f36 edenapi: Split DataEntry into FileEntry and TreeEntry
Summary:
The primary change is in `eden/scm/lib/edenapi/types`:
* Split `DataEntry` into `FileEntry` and `TreeEntry`.
* Split `DataError` into `FileError` and `TreeError`. Remove `Redacted` error variant from `TreeError` and `MaybeHybridManifest` error variant from `FileError`.
* Split `DataRequest`, `DataResponse` into appropriate File and Tree types.
* Refactor `data.rs` into `file.rs` and `tree.rs`.
* Lift `InvalidHgId` error, used by both File and Tree, into `lib.rs`.
* Bugfix: change `MaybeHybridManifest` to be returned only for hash mismatches with empty paths, to match documented behavior.

Most of the remaining changes are straightforward fallout of this split. Notable changes include:
* `eden/scm/lib/edenapi/tools/read_res`: I've split the "data" commands into "file" and "tree", but I've left the identical arguments sharing the same argument structs. These can be refactored later if / when they diverge.
* `eden/scm/lib/types/src/hgid.rs`: Moved `compute_hgid` from `eden/scm/lib/edenapi/types/src/data.rs` to as a new `from_content` constructor on the `HgId` struct.
* `eden/scm/lib/revisionstore/src/datastore.rs`: Split `add_entry` method on `HgIdMutableDeltaStore` trait into `add_file` and `add_tree` methods.
*  `eden/scm/lib/revisionstore/src/edenapi`
    * `mod.rs`: Split `prefetch` method on `EdenApiStoreKind` into `prefetch_files` and `prefetch_trees`, which are given a default implementation that fails with `unimplemented!`.
    * `data.rs`: Replace blanket trait implementations for `EdenApiDataStore<T>` with specific implementations for `EdenApiDataStore<File>` and `EdenApiDataStore<Tree>` which call the appropriate fetch and add functions.
    * `data.rs` `test_get_*`: Replace dummy hashes with real hashes. These tests were only passing due to the hash mismatches (incorrectly) being considered `MaybeHybridManifest` errors, and allowed to pass.

Reviewed By: kulshrax

Differential Revision: D22958373

fbshipit-source-id: 788baaad4d9be20686d527f819a7342678740bc3
2020-08-13 10:01:40 -07:00
Durham Goode
311e30746f grep: handle sharded biggrep responses
Summary:
Biggrep recently moved to a sharded system where fbsource is spread
over three shards and can have three different corpus revs. Let's update hg's
biggrep integration to handle this new logic.

We basically just take the earliest corpus commit and diff that against the
users commit.  There's room for some incorrectness here, like if the users
commit is based off a commit before the earliest corpus commit then it will
receive changes from the alter corpus commits. Long term biggrep will work on
unifying the various shards to use a consistent corpus rev, but for now this is
probably acceptable.

Reviewed By: quark-zju

Differential Revision: D23057055

fbshipit-source-id: 745cafe772cea44bbe2d8eb1eee70dd317f255fe
2020-08-13 09:58:52 -07:00
Genevieve Helsel
fdccaae59b add unique return code for unhealthy instance before restart
Reviewed By: xavierd

Differential Revision: D23024654

fbshipit-source-id: c306752219bfe594dc9486d6770f8b7118deb8d5
2020-08-13 09:44:11 -07:00
Stanislau Hlebik
96a9528149 mononoke: use VecDeque in blame_range_split_at
Summary:
We had an accidentally quadratic behaviour in our blame implementation.
blame_range_split_at copied the right part of the range over and over again.
This diff fixes it by using VecDeque instead

Reviewed By: aslpavel

Differential Revision: D23102690

fbshipit-source-id: 951dd6383c48206fdc92757a47690f8e826a737b
2020-08-13 08:32:41 -07:00
Xavier Deguillard
5ef7260cc4 cli: remove the repo on edenfsctl remove
Summary:
On Windows, unmounting the repo isn't sufficient to remove all traces of the
repo as ProjectedFS uses it as a cache, and thus all the files that were
touched by the user are still present on disk after unmounting it.

Reviewed By: wez

Differential Revision: D22915349

fbshipit-source-id: 445379fef57160b5da39a298ca4518e2662d16e3
2020-08-13 08:28:45 -07:00
Xavier Deguillard
e6ddfb4e71 dirstate: do not build the dirfoldmap if _dirs isn't set
Summary:
On EdenFS on Windows (case insensitive), _dirs isn't set, but touching it will
lead to the rest of the dirstate code trying to use it. For instance, removing
a file in the dirstate would try to remove it from _dirs, which would fail as
_dirs is expected to be empty on EdenFS.

Reviewed By: fanzeyi

Differential Revision: D23067897

fbshipit-source-id: 0e0d4aa6457c31d572a2aebc87f0a2fa7215001f
2020-08-13 08:26:16 -07:00
svcscm
a8e3912cdf Updating submodules
Summary:
GitHub commits:

13369bc8d1
24b02f6d64
2e2269e5d1
90b358458c
bd8d3c78d9
df320b4a6c
f458bf8c58
0088daa38e
08d9fd4dac
efc5e2ed7c
392682ba6a

Reviewed By: yns88

fbshipit-source-id: e572c6b73d66c53aea4c62e3297726ec1af745af
2020-08-13 08:26:16 -07:00