Summary:
In the next change we'll make AssertionError fail tests.
Update the fileset test to not use AssertionError.
Reviewed By: sggutier
Differential Revision: D47524272
fbshipit-source-id: 7698badc5dad0367997c4eb151036e5ac5239ffa
Summary:
In D47099273, we changed the behavior when it comes handling conflicts, breaking this test.
The desired behavior is changed with that. The update is aborted when there is a conflict (by extension, when files are locked).
This diff fixes the test to test the new desired behavior
Reviewed By: quark-zju
Differential Revision: D47489412
fbshipit-source-id: 733f51d485b81ba135c880182bd0c3ebfad5ef73
Summary:
Add logging under `dag::algo` prefix about when slow paths are used due to
incompatible `VerLink`s. Bump slow paths to `warn` level. This would provide
insights about why slow paths are used.
Reviewed By: zzl0
Differential Revision: D47490348
fbshipit-source-id: 08b42ae2578906ddf39506715ce81b5121ec5578
Summary:
On IdDag/IdMap open, try to reuse previously assigned VerLink.
On IdDag/IdMap persist/flush, cache the storage version with the current VerLink.
This should reduce "compatibility" issues when the Python world invalidates and
re-creates the changelog, as in `dbsh`:
In [4]: v1=repo.changelog.dag.version()
In [5]: repo.invalidatechangelog()
In [6]: v2=repo.changelog.dag.version()
In [7]: v1.cmp(v2)
Out[7]: 0
For example, take the example in D47383634 summary, now
r1.cmp(r2)
evaluates to `-1` instead of `None` meaning that r2 has
"append-only" changes on top of r1. Although we cannot
yet get rid of D47376881.
Reviewed By: zzl0
Differential Revision: D47488534
fbshipit-source-id: 33e9ec6294ce77f85b04d5d3af02d81a1a6c9282
Summary: They are no longer needed as we now have more flexible "strip" APIs.
Reviewed By: zzl0
Differential Revision: D47488532
fbshipit-source-id: 932c1ff8b041aa663c7006cec3b572a91bee6647
Summary: We have `MultiLog::version`. This diff adds `Log::version` to match the API.
Reviewed By: zzl0
Differential Revision: D47488531
fbshipit-source-id: 0be841c3f4c2263a9d88693ce44d63d904a199af
Summary:
Today we recreate new `VerLink`s when loading `Dag` from disk. However, if the
on-disk content is not changed, we can actually reuse the old `VerLink` to enable
more fast paths. This diff adds APIs on `VerLink` to support that.
Reviewed By: zzl0
Differential Revision: D47488533
fbshipit-source-id: 1ffb1bd7ba84f1099506af829df7e6a4fc589ff4
Summary:
D47482810 makes the Rust NameDag invalidate the "missing" cache. So D46590498
is no longer necessary.
Reviewed By: zzl0
Differential Revision: D47483597
fbshipit-source-id: f2d1fed0f26ae090f0b6981606e083f3d6dc0dbd
Summary:
Changing the graph require invalidating caches. `NameDag::import_pull_data`
forgot that. This diff adds the cache implementation.
This could be an alternative fix to D46590498.
Reviewed By: zzl0
Differential Revision: D47482810
fbshipit-source-id: e7091cd90c8e7e7228c51ffe60db18e27f983ecf
Summary:
Document that the "version" comes from the storage layer, and the storage
"append-only" concept is different from the commit graph "append-only".
Reviewed By: zzl0
Differential Revision: D47482811
fbshipit-source-id: 89cd2df5ee3a786d060d258505c965dcdc9f655a
Summary:
These aren't blocked so the wording is a bit misleading. The word "harmful"
better reflect their behavior, thus changing the name to be more explicit.
Reviewed By: genevievehelsel
Differential Revision: D47422985
fbshipit-source-id: 20f4fdaf7901449bb7a4864b757835b36a3e50d2
Summary:
For revsets like:
reverse(master~20::master) & not(file(r're:.*'))
the `file(...)` part sets the "text" prefetch field correctly, however the `xs & not(ys)`
(which is optimized to `xs - ys`) part loses the "text" prefetch field, causing
suboptimal 1-by-1 fetches.
This diff fixes the suboptimal fetches by copying prefetch fields from `ys` to
the `filteredset` returned by `xs - ys`.
Reviewed By: zzl0
Differential Revision: D47419750
fbshipit-source-id: 8925b9c8fab1a269c342d656692ff20c9167bf3f
Summary:
The fitleredset iteration happens on its "subset". Prefetch settings should
apply to the set that is iterated. So let's redirect prefetch APIs to the
subset.
The old `smartset.clone` implementation does not seem to preserve ordering.
The `prefetch` is updated to change prefetch fields of the `self` set directly
instead.
Reviewed By: zzl0
Differential Revision: D47419749
fbshipit-source-id: 26f6b927db5b4e7169f0d3f7e3766d5f7b696be3
Summary:
off_t is not suitable on Windows because it is a 32-bit signed
type. Introduce a new FileOffset type for use in EdenFS.
Reviewed By: kmancini
Differential Revision: D47406784
fbshipit-source-id: 9cc9585b4b118c54a1ca148c2ba7e7ccfb6f278c
Summary:
getpid() is an unconditional syscall on Linux/glibc. Therefore, it
costs about 250 nanoseconds. There are a couple places in EdenFS where
getpid() is an inner-ish loop so use folly::get_cached_pid() instead.
Reviewed By: kmancini
Differential Revision: D42044221
fbshipit-source-id: e9c8f8a00febeaf6c9a0a3481879040d739038f5
Summary:
While the `public()` revset is updated, there could be other "stale" revsets
that are using incompatible versions that triggers slow paths.
Original commit changeset: c8a5c9e0d5dd
Original Phabricator Diff: D47384752
Reviewed By: fanzeyi
Differential Revision: D47478975
fbshipit-source-id: f4eca716bf4268e5ac1e750430f31de2c9751cb1
Summary:
liubov-dmitrieva reported in P788939965 that commands like:
hg log -r " reverse(master~1000::master) & not(file(r're:.*'))"
causes lots of 1-by-1 location -> hash lookups. This diff resolves it by
skipping the problematic code path:
File "edenscm/revset.py", line 1456, in matches
files = getfiles(x)
File "edenscm/changelog2.py", line 382, in readfiles
text = self.revision(node)
File "edenscm/changelog2.py", line 495, in revision
p1, p2 = self.parents(node)[:2]
File "edenscm/changelog2.py", line 648, in parents
parents = list(self.dag.parentnames(node))
error.UncategorizedNativeError: Resolving id exceeds threshold 10 set by EDENSCM_REMOTE_ID_THRESHOLD
The troublesome code path was found by setting
`EDENSCM_REMOTE_ID_THRESHOLD=10`.
Reviewed By: zzl0
Differential Revision: D47417522
fbshipit-source-id: 2830e825a362c6a1ea26f2627fef65dd5b7dcf4b
Summary:
Now `#!/usr/bin/env bash` is used for bash scripts (by D47269779) we need to
update the bash detection for test compatibility.
Reviewed By: evangrayk
Differential Revision: D47457479
fbshipit-source-id: c6a449f53fb265f8a01d6368fe807e0b8bae03aa
Summary:
Partially enables symlink support on Windows by making symlinks appear on Windows as actual symlinks as opposed as regular files containing only the place where the symlink would point in other systems.
Creating new commits with symlinks also works (after editing `fscap.py` on hg's side as well as the requirements file for the current directory for enabling symlinks on Windows EdenFS) when the symlinks are in the same directory.
Reviewed By: xavierd
Differential Revision: D44218035
fbshipit-source-id: 0e3094dc5a13cabef1cd24f8fe18cc73ca40d4a8
Summary:
The methods mentioned in the title changed a bit on Windows, now allowing them to respond that a TreeEntry can be a symlink.
In order to gate this change, on Windows now there is a helper method that is used for reverting the changes for `TreeEntry:: getType` to its previous behavior, in order to be able to tell whether symlinks are enabled for the current Eden checkout or not. Where possible, (which is in most places) the config for whether symlinks are enabled or not on the Eden checkout is passed down.
The non-gated changes are kept since in those cases we actually want to register that a TreeEntry is actually a symlink, even when symlinks are "not enabled".
Originally this was intended to be part of D44218035, but was split for clarity.
Reviewed By: xavierd
Differential Revision: D47326228
fbshipit-source-id: be6cfae6626bf3a32aa119d25bf8b5fe6a549898
Summary:
Update num_cpus to version 1.16.0. We need this version as it is a requirement
of libbpf-sys v1.2.1+v1.2.0, which is to be imported subsequently.
Reviewed By: zertosh
Differential Revision: D47380958
fbshipit-source-id: d1fa12a1c8a974686d70d47876e990da4a73b839
Summary:
clang-tidy had some automated suggestions for our code. Apply the ones
that make sense.
Some of them didn't, like removal of all uses of `volatile`. I
manually reverted those changes.
Reviewed By: genevievehelsel
Differential Revision: D41051052
fbshipit-source-id: 3fe22a91e929d3bb8e6346126c2c7bf9f027eb32
Summary: We should prefer string_view over folly::StringPiece..
Reviewed By: xavierd
Differential Revision: D47406695
fbshipit-source-id: 0c557c1d933a8196f4c5b7fbe97c3ca8bda06bda
Summary:
I'm not sure when or how this is possible, but EdenFS should handle
the possibility that getPeerEffectiveCreds returns nullopt.
Reviewed By: genevievehelsel
Differential Revision: D47421072
fbshipit-source-id: c77746b5d9476e131fcb0173e13d63e36e4a61d9
Summary:
We have seen reports of people seeing unexpected fetch activity. This
diff plumbs process ID through HgImportRequest so it can be streamed
to `eden trace hg` output.
Reviewed By: kmancini
Differential Revision: D42040798
fbshipit-source-id: 0a18fba6a55e584a4334088efde761a7c1d8fe6e
Summary: Add an infallible ProcessId::current() to replace uses of gitpid() and GetCurrentProcessId().
Reviewed By: kmancini
Differential Revision: D42037244
fbshipit-source-id: b5b7dced241d0a70e9d43b40827d741d7049345d
Summary:
Now that ProcessId exists, we should use it instead of pid_t in
ObjectFetchContext.
Reviewed By: genevievehelsel
Differential Revision: D42037216
fbshipit-source-id: 34cd89f78be35a15d73b26edc840e917fd642723
Summary: Add additional context (commit and new file name) to the rebase prompt message, this will help avoid conflict resolution errors.
Reviewed By: quark-zju
Differential Revision: D47312287
fbshipit-source-id: 2ed162ae44eb518a33d23aa17f6720ad137d4a04
Summary: expose the commit info to Python world, it will be used in the following diff to add more context to the rebase prompt messages
Reviewed By: quark-zju
Differential Revision: D47312286
fbshipit-source-id: c896d913660cabffc4c654ba83b8fa9a1e2b24ef
Summary: this will be useful to users as well
Reviewed By: quark-zju
Differential Revision: D47389984
fbshipit-source-id: 05a13e1085820a6dd779e230f9ae98df38243354
Summary:
In preparation for unifying unmount() in FsChannel, return SemiFuture
from EdenMount::unmount.
Reviewed By: kmancini
Differential Revision: D45300725
fbshipit-source-id: 4eeb7a19d4140f9985c8a46dd357f7631ff9d490
Summary:
This makes the test intention more explicit. Auto fix won't break the test
intention.
Reviewed By: sggutier
Differential Revision: D47412807
fbshipit-source-id: 1a8a12c7604753b4eb30a158460c17a237234799
Summary: Similar to IPython, use `_` to refer to the previous output.
Reviewed By: sggutier
Differential Revision: D47412808
fbshipit-source-id: d3a72293fc2ae90f0326c1152a352fdf35a438ff
Summary:
The conch_parser is now part of bindings and no longer have import issues.
So let's enable the test.
Reviewed By: sggutier
Differential Revision: D47412806
fbshipit-source-id: 7392ec7fa0664dfe7d9d0c9d3878b59addcc9703
Summary: Now that Windows has an actual PrivHelper, we can remove some ifdefs.
Reviewed By: mshroyer
Differential Revision: D45300700
fbshipit-source-id: e5e59fafd95c1a44a51f5caa04331fb8d887d426
Summary:
Aiming towards moving unmount() into FsChannel, move the knowledge of
how to unmount an NFS mount into Nfsd3.
To support unmounting on Windows, we can eventually add an invocation
of unmount.exe to the Windows PrivHelper implementation.
Reviewed By: kmancini
Differential Revision: D45296963
fbshipit-source-id: 55fa7fe0f6190d3708caa21a0cd4b3868f464f8b
Summary:
Aiming towards moving unmount() into FsChannel, move the knowledge of
how to unmount a FUSE mount into FuseChannel.
Reviewed By: kmancini
Differential Revision: D45296899
fbshipit-source-id: 3f270bcc21386224cf7472eb88c851ca1f718e8a
Summary: Additionally log remote derivation requests to the main request context scuba table, so that they are visible in that table as well as the derived data table.
Reviewed By: mitrandir77
Differential Revision: D47340735
fbshipit-source-id: 6a538c9a69bc832561cd2dbb3870a2654934119c
Summary: Extract the logging of remote derivation requests to new methods on `DerivedDataScuba`. Their behaviour should be the same.
Reviewed By: RajivTS
Differential Revision: D47340734
fbshipit-source-id: 106785cde002a763d3988366aefa8c51742fb49c
Summary: The scuba logging methods on derived data manager require the caller to carry around the scuba sample builder. Simplify this by extracting it to a custom type that holds the sample builder, along with type information about the derived data type.
Reviewed By: RajivTS
Differential Revision: D47340736
fbshipit-source-id: 6372335acd5375a67ca9814add2721e2d96ffda1
Summary:
While technically one can use debugexportstack to export a commit, then
debugimportstack repeating the commit's content to achieve amend. The ISL
"Operation" is abstracted around one instead of two commands. We need
one-command amend. This diff updates debugimportstack to support one-command
amend.
Reviewed By: zzl0
Differential Revision: D47282370
fbshipit-source-id: 54026766d91cc0e073b9e76b27ea98b9809bcedb
Summary:
fix routing keys
the original keys contain both hg id and path making them long
we don't need to take into account the path part of the key for routing purposes
Reviewed By: clara-9
Differential Revision: D47395901
fbshipit-source-id: c5b18e437490c14b810c555cd10a68000e52d088
Summary:
An alternative to D47376881. Instead of invalidating `public()` manually, let's
detect potential slow paths and invalidate them on access automatically.
The `draft()` set is considered small and skips this check for now.
Reviewed By: zzl0
Differential Revision: D47384752
fbshipit-source-id: c8a5c9e0d5ddd131a86890550a67141a1ddb6d65
Summary: This makes it possible to compare `VerLink` between the current changelog and a cached set.
Reviewed By: zzl0
Differential Revision: D47384780
fbshipit-source-id: f753512ead4f1b01cb65be7da568813631c66b1e