Commit Graph

51339 Commits

Author SHA1 Message Date
Jun Wu
ab6e41e651 continue: show a hint about how to resolve conflicted files
Summary:
"outstanding merge conflicts" is not a helpful message to inexperienced users.
Print out commands to get more context.

Reviewed By: simpkins

Differential Revision: D18535010

fbshipit-source-id: 035ec9f3d79bf04a997ee907469f2e3d749a1d0e
2019-11-22 21:22:45 -08:00
svcscm
e2322c1daf Updating submodules
Summary:
GitHub commits:

2f8ecdae2c
ece208412e
cc3f054a35
c37658a78b
338aae0406
eeb43886dd
35b0920f08
b4b4bfbb78
138558a062
d72a9d3ed8
e6934acc53

Reviewed By: yns88

fbshipit-source-id: ff0f762e9572daa3ded388c4dee89e95e1a383ca
2019-11-22 15:38:34 -08:00
Michael Devine
ad3d85038e Repo converter: Allow empty author/committer fields
Summary: Some commits in AOSP have empty fields for author/committer email addresses.

Reviewed By: tchebb

Differential Revision: D18661778

fbshipit-source-id: e975392da677879d598eb9fc77558251a55c2f23
2019-11-22 15:38:34 -08:00
Adam Simpkins
54afe77b5a fix some warnings about functions returning without a value
Summary:
Add default case handling for some switch statements that do not handle the
case of an enum variable being set to something outside of one of the defined
values.

Reviewed By: fanzeyi

Differential Revision: D18652102

fbshipit-source-id: abcb3f9dc1f6b0dc761170c7115ddd9ad5145bc4
2019-11-22 15:38:34 -08:00
Adam Simpkins
e07f8bd7b6 refactor the EDEN_BUG() macro
Summary:
This splits `EDEN_BUG()` into three separate version.  All three crash in
debug mode builds, but in release builds they behave differently:

- `EDEN_BUG()` throws an exception
- `EDEN_BUG_FUTURE(Type)` returns a `folly::Future<Type>` that has been
  fulfilled with an exception.
- `EDEN_BUG_EXCEPTION()` returns a `folly::exception_wrapper`.

The main advantage of this is that this allows the compiler to detect that
`EDEN_BUG()` can never return.  Previously `EDEN_BUG()` was used for all 3 of
these different cases, and its behavior depended on whether `toException()`
was ever called.  As a result we could not easily get the compiler to identify
code paths where we know at compile time that it will never return.

Reviewed By: chadaustin

Differential Revision: D18652103

fbshipit-source-id: 070107c7520f51b05696905fa243de5f8df15958
2019-11-22 15:38:33 -08:00
Adam Simpkins
7f5608ed57 minor clean up to HgNativeBackingStore
Summary:
Remove some unnecessary forward declarations, and use full paths in includes
so autodeps can recognize which rule these headers come from.

Reviewed By: fanzeyi

Differential Revision: D18652106

fbshipit-source-id: e2c84e1aaf846c91c18242050c4015eca8c501d3
2019-11-22 13:00:07 -08:00
Adam Simpkins
2a1bc3cdad Update the eden manifest to drop internal FB-specific dependencies
Summary:
Remove the Facebook-specific dependencies from the Eden manifest: these
dependencies are now available directly in the Eden repository.

Reviewed By: chadaustin

Differential Revision: D18588009

fbshipit-source-id: 590c74e38e4e05939e6955839af3ebb959f9251b
2019-11-22 13:00:07 -08:00
Adam Simpkins
2442b46ee8 cmake: always build support for the EdenSCM backing store
Summary:
Now that the fb-mercurial sources are available in the Eden repository, update
our CMake build files to always build them.  This moves the build logic from
the centralized `FBMercurialFeatures.cmake` file into `CMakeLists.txt` files
in the appropriate subdirectories.

Reviewed By: chadaustin

Differential Revision: D18588011

fbshipit-source-id: ded9decde5c2ec766aae0bb0f4f5b021d1044a98
2019-11-22 13:00:07 -08:00
Adam Simpkins
f71bfaacad getdeps: remove the fb-mercurial-rust target
Summary:
Remove the standalone fb-mercurial-rust target that was an internal-only
dependency for the Eden build.  This build step is now done entirely in the
Eden build.

Reviewed By: fanzeyi

Differential Revision: D18623943

fbshipit-source-id: c62a1155ddd1c0a6b2270c472176ba25194c6145
2019-11-22 13:00:06 -08:00
Adam Simpkins
aef2dbce95 cmake: unconditionally build the Rust datapack library code
Summary:
Update the CMake build to always build the Rust datapack libraries, even on
Windows.  This allows us to completely eliminate the `EDEN_HAVE_RUST_DATAPACK`
checks.

Note that I did leave the `EDEN_HAVE_RUST_DATAPACK` macro in place, as we
still do not build the Rust datapack code on Mac when building with Buck.

Reviewed By: fanzeyi

Differential Revision: D18588008

fbshipit-source-id: 1a4c9ceec5372d0e6a7313d2eb87edabd1e60a96
2019-11-22 13:00:06 -08:00
Adam Simpkins
cd9a1e0e88 cmake: directly build the rust datapack libraries
Summary:
Update Eden's top-level CMakeLists.txt file to build the Rust datapack
libraries.  Previously these were built by invoking CMake separately inside th
`eden/scm` subdirectory.  Now that the code has been combined into a single
location we can use a single CMake invocation to drive the build of both these
components.

The old code did not build the Rust datapack code on Windows, and this diff
does not change that behavior.  I'm not aware of any reason to skip building
this on Windows, so I plan to enable building this code on Windows in a
subsequent diff.

Reviewed By: pkaush

Differential Revision: D18588006

fbshipit-source-id: 20f4f0ea9fef8595a9dd35a21115952b2808c824
2019-11-22 13:00:06 -08:00
Sam Fu
d472f8348d write to machine username for log path
Summary:
D8997967 changed `hg rage` to pull from a path that uses the machine's unix user. But The write in the background backup for commit cloud used `util.shortuser(ui.username())`. This means that in On Demand, it would write to `$LOGDIR/samfu/$REPO$DATE` but `hg rage` would look in `$LOGDIR/svcscm/$REPO$DATE`. Changing this to the same `util.getuser()` should fix this.

Caveat: I didn't actually test this. I just know that my `hg rage` says "log directory does not exist: /tmp/svcscm" (P122851697)

Reviewed By: markbt

Differential Revision: D18654245

fbshipit-source-id: ccb78eba778ddedb23c7947a3eeb16e9f8fd2021
2019-11-22 12:25:18 -08:00
svcscm
8d4c2e8546 Updating submodules
Summary:
GitHub commits:

1dd28fc847
5f687b568e
adcf920f40

Reviewed By: yns88

fbshipit-source-id: 6d9ce88e59e74914f20253391052f12fdbed5c8c
2019-11-22 10:55:08 -08:00
David Tolnay
d1d8fb939a Switch from failure::Fail trait to std::error::Error for errors
Summary:
This diff replaces eden's dependencies on failure::Error with anyhow::Error.

Failure's error type requires all errors to have an implementation of failure's own failure::Fail trait in order for cause chains and backtraces to work. The necessary methods for this functionality have made their way into the standard library error trait, so modern error libraries build directly on std::error::Error rather than something like failure::Fail. Once we are no longer tied to failure 0.1's Fail trait, different parts of the codebase will be free to use any std::error::Error-based libraries they like while still working nicely together.

Reviewed By: xavierd

Differential Revision: D18576093

fbshipit-source-id: e2d862b659450f2969520d9b74877913fabb2e5d
2019-11-22 08:53:31 -08:00
svcscm
29fc5efd96 Updating submodules
Summary:
GitHub commits:

a428ed54e5
fb7ffe766c

Reviewed By: yns88

fbshipit-source-id: c0cb89eabeb74fb7a852c3a8cbdcc8485966ed6c
2019-11-22 08:24:38 -08:00
Genevieve Helsel
aae83490c9 compare blob contents sha1 in Diff.cpp
Summary: Even if blobs have different hashes, they could have the same contents. For example, if between the two revisions being compared, if a file was changed and then later reverted. In that case, the contents would be the same but the blobs would have different hashes. Currently, `getScmStatusBetweenRevisions()` would report false positives in this case. This is also needed so we do not report false positives in `getScmStatus()` when hit this code path

Reviewed By: simpkins

Differential Revision: D18647086

fbshipit-source-id: 66e12648a24fd7e5612eee5e599a5b81c7c5f2d1
2019-11-22 08:09:37 -08:00
svcscm
9546c5c4f9 Updating submodules
Summary:
GitHub commits:

c2bee6c27b
ce3628a2df
e375f6667f
a75d0b736b
93d59e512e
c74e432e24
3b53205789
44172b877f
b3d36b298b

Reviewed By: yns88

fbshipit-source-id: 0a4562ae41818c207a86d0eec6abea7574849b82
2019-11-22 08:09:36 -08:00
svcscm
56d6bbe549 Updating submodules
Summary:
GitHub commits:

3c383a2d50
6e7a73a1eb
58ff026da1
f78407350c

Reviewed By: yns88

fbshipit-source-id: ca0b64468f1a25835186b9bfb0d087fb3c14c570
2019-11-21 23:30:19 -08:00
Koray Polat
ddba97ec96 Add SAI-1.4.0 to opensource build
Summary:
- Added sai to getdeps
- added SAI to FBOSS as a dependency
- Included path of SAI headers to FBOSS's cmake file.

Reviewed By: shri-khare

Differential Revision: D18629127

fbshipit-source-id: 119a6b7f2b64bd84414d9e16a903bc8df48a35e7
2019-11-21 22:52:08 -08:00
Adam Simpkins
306a429bd6 mark manual imports in hg_import_helper.py
Summary:
Annotate some import statements so autodeps won't complain about them, since
it doesn't know where they come from in the build.

Note that `hg_import_helper.py` isn't used any more by the current code, and
should ideally be killed off soon.  However, just annotating these import
statements for now in the short term is the easiest way to make autodeps
happy.

Reviewed By: fanzeyi

Differential Revision: D18652104

fbshipit-source-id: 310bc5c63447e3bf4dfd081d7b3930eed4d0498b
2019-11-21 21:43:54 -08:00
Adam Simpkins
2f075880c8 fix a missing dependency in a CMakeLists.txt file
Summary:
The `eden/fs/sqlite` code uses `eden/fs/utils/PathFuncs.h`, so add a proper
dependency on the `eden_utils` library.

Reviewed By: pkaush

Differential Revision: D18652105

fbshipit-source-id: b8dffd93971ab5efb71d7bc3c2dcb62249b3915b
2019-11-21 21:43:54 -08:00
svcscm
8ff4d6a6dc Updating submodules
Summary:
GitHub commits:

eeb1607bdf
7f4492d600

Reviewed By: yns88

fbshipit-source-id: 32a2251273865436d7ff7a40465c371742390844
2019-11-21 21:43:53 -08:00
svcscm
e1dddcc7a6 Updating submodules
Summary:
GitHub commits:

8e4a2f5815
13fb6fb28e
7d97783503

Reviewed By: yns88

fbshipit-source-id: 282f14f69a5556856bcfa519d2bc616091c00907
2019-11-21 17:47:49 -08:00
Chad Austin
516e84d705 record the durations of the various phases of checkout
Summary:
Record the durations of each phase of checkout so it can be logged to
scribe in a future diff.

Reviewed By: simpkins

Differential Revision: D18632258

fbshipit-source-id: e447976af22cf25cffd640e79b95da2989b07448
2019-11-21 17:16:10 -08:00
svcscm
7c1158f25b Updating submodules
Summary:
GitHub commits:

b475d612b3
e50b64bdba

Reviewed By: yns88

fbshipit-source-id: 06432c065211c54575a505cad1b195a61fded24a
2019-11-21 16:56:34 -08:00
Zeyi (Rice) Fan
dee0478903 eden: add experimental:enable-blob-caching
Summary: Adding an experimental option to EdenFS so we can disable blob caching if we need.

Reviewed By: chadaustin

Differential Revision: D18441665

fbshipit-source-id: 56751c0199d6658bfbf7ec3865f746a7279324ab
2019-11-21 12:05:29 -08:00
Chad Austin
46b25acec8 introduce CheckoutResult struct
Summary:
We're about to return more information from checkout, so
introduce a CheckoutResult struct.

Reviewed By: genevievehelsel

Differential Revision: D18630820

fbshipit-source-id: 78b68ef3551ca8c9e9968631de554084c333b4b9
2019-11-21 11:50:46 -08:00
svcscm
44609b0a35 Updating submodules
Summary:
GitHub commits:

1f506c0cec
7fe1a5931a
fa022633a5
492916a16b

Reviewed By: yns88

fbshipit-source-id: e20fa707b85759ad9c2f07ee3e4f9a965e6fbe82
2019-11-21 10:41:02 -08:00
Johan Schuijt-Li
1b7dd50dbf hg: don't create tempfiles longer than allowed on filesystem
Summary:
[svcscm@hg022.prn2 /data/scm/www]$ hg log -r master
    transaction abort!
    rollback completed
    abort: File name too long: '/data/scm/www-merge-generaldelta/.hg/store/data/flib/intern/____generated____/_graph_q_l_meerkat_step/flib/intern/entschema/generated/entity/bizapps/dcp__insight/application__config/_ent_d_c_p_insights_application_config_action.php/._g_q_l_g___intern_____set_permission_manager_domain_dcp_insights_application_config_data_____ent_d_c_p_insights_application_config_action____gen_perform_graph_q_l_set_permission_manager_domain_dcp_insights_application_config_mutation_coercer.php.i-U0sMqX~'

On hg022.prn2 www currently failes under certain circumstances because filenames longer than
255 characters are currently created. I traced this back to mktempcopy and made sure that
we truncate filenames when they are created too long.

Reviewed By: quark-zju

Differential Revision: D18639433

fbshipit-source-id: 20e4b086ca5c775b6054b642ecedfb05efd00fb9
2019-11-21 10:41:02 -08:00
Jun Wu
6b6b6cf36d blackbox: add Event::Tags and its index
Summary:
Add Event::Tags so we can tag commands with one or more names.
Add index for the tags so we can search them more efficiently.

As we're here, update hgcommands to read EDENSCM_BLACKBOX_TAGS and write
Event::Tags automatically just after Event::Start.

Differential Revision: D18610733

fbshipit-source-id: c69b6e3d34b317e92a1c4d76f29e832b6b01c4fa
2019-11-21 08:36:10 -08:00
Jun Wu
49fe540b02 blackbox: build indexes to speed up certain query patterns
Summary:
Previously, the blackbox index was hardcoded on the timestamp, and is not
Event-aware. This diff changes the index to parse Event and build up indexes
for various common events (ex. Start, Finish).

For now, the index just includes start, finish timestamps and duration.

Differential Revision: D18610734

fbshipit-source-id: bf572f3138c8c18d3aab06eadcc83dd5b0b9cf02
2019-11-21 08:36:10 -08:00
Jun Wu
25e090c529 blackbox: extend match_pattern to capture matched objects
Summary:
Previously, `match_pattern` only returns a `bool`. This diff implements an
enhanced version `capture_pattern` to be able to capture matched objects.

This will be used to match query patterns and apply optimization.

Differential Revision: D18610732

fbshipit-source-id: 39e989e7633b834c04997bf8665494556f3b62b2
2019-11-21 08:36:09 -08:00
Jun Wu
f19a760f5f blackbox: remove IndexFilter
Summary: Migrate callsites to use the new pattern matching filtering APIs.

Differential Revision: D18610738

fbshipit-source-id: 242182f4e6a58bbff5dddbb177287921c85519bc
2019-11-21 08:36:09 -08:00
Jun Wu
ec9d925b69 blackbox: add timestamp field to Start and Finish event
Summary:
See the previous diff. As part of migrating away from IndexFilter. There needs
to be a way to filter commands by absolute clock time using pattern matching
against Events.  To achieve that, add the timestamp field to Start and Finish
events.

Differential Revision: D18610735

fbshipit-source-id: 9e1898a87bc93e47d0f0c77342428b5c42ef6f24
2019-11-21 08:36:09 -08:00
Jun Wu
41d6c2d42c blackbox: implement new query APIs
Summary:
The existing query API `filter` has 2 issues:
- It does querying and filtering together, making it hard to express certain
  queries. For example: "for commands taking more than 10 seconds, get all
  network requests used by those commands".
- The `IndexFilter` abstraction overlaps with `pattern`s. `IndexFilter` is
  built upon the `Entry` structure, and does not work for `Event`s. In the
  future, we want a `Event::Tags` to tag commands, and build indexes on it.
  That's not very compatible with `IndexFilter`.

To address the issues, I'm going to:
- Decouple querying and filtering by splitting it into 2 methods glued by
  `SessionId`s.
- Deprecate `IndexFilter`. Make `patterns` the only way to filter entries.
- Add dedicated indexes for certain events.

This diff adds the related APIs towards that direction.

Differential Revision: D18610737

fbshipit-source-id: c6ab92fd6fa7bb2ee7e14f567d72ac98b287c143
2019-11-21 08:36:08 -08:00
Jun Wu
34e2385f7d blackbox: remove type parameter of Entry
Summary:
The type `Entry<T>` provides flexibility on serializing different types.
Practically, only the `Event` type is used. Let's remove `T` so `blackbox` can
assume it's the `Event` type.

Differential Revision: D18610736

fbshipit-source-id: 102a5f61c758fa83cd1994c7f813576dcf5b59d5
2019-11-21 08:36:08 -08:00
Jun Wu
6b8acfe260 hgsql: add rate limiting for read commands
Summary:
Similar to D2756217. But skip sync directly if the repo has been synced
recently.

This will help reducing CPU load on the DB tier.

Reviewed By: ikostia

Differential Revision: D18621013

fbshipit-source-id: 83370669ea61eb693d06495aaa13664648b97aca
2019-11-21 07:45:31 -08:00
svcscm
1dbac1afb1 Updating submodules
Summary:
GitHub commits:

5a446fba45

Reviewed By: yns88

fbshipit-source-id: 2fa47c5a5b0f4991ee1348608d4fdc0b6efc0ea6
2019-11-21 07:45:30 -08:00
svcscm
5b41520207 Updating submodules
Summary:
GitHub commits:

571711d8dd
3b4e00b8d5
6a47d8fb8f
8477f0799f
0ce0edbe12
a8585e7f2a
c1e8df310f
ece21c3d28
69233daadc

Reviewed By: yns88

fbshipit-source-id: 440e8da368c261b1bb7fb61b28678b66790c2567
2019-11-20 19:15:23 -08:00
Jun Wu
5b61ae4c89 edenapi: add tracing spans
Summary:
Add tracing spans so we can get some insights about statistics from the pure
Rust land.

Reviewed By: xavierd

Differential Revision: D18625646

fbshipit-source-id: 15951fe2f8270a70f647a0f4e09819bbc33919c5
2019-11-20 18:56:07 -08:00
Genevieve Helsel
a47b831d54 stop processing getScmStatusV2() calls if the thrift connection is closed
Summary: make `future_getScmStatusV2` into `async_tm_getScmStatusV2` so we can short circut the status call if the request is no longer active.

Reviewed By: simpkins

Differential Revision: D18378212

fbshipit-source-id: b2bca014a37d99f7a92478c3e23bde0b874dd13c
2019-11-20 18:06:33 -08:00
Genevieve Helsel
3807e751ca make enforceParents configurable for getScmStatusV2
Summary: This reads `enforceParents` from a config instead of always assuming true for `getScmStatusV2()`. This will allow a easy kill switch in case throwing errors from this thrift call causes issues with something that calls hg status

Reviewed By: simpkins

Differential Revision: D18258164

fbshipit-source-id: 1ae421a941c01a678d25d5453c771262b03558d0
2019-11-20 17:51:21 -08:00
Jun Wu
60ccca41fc graphql: return directly for empty "landed" query
Summary:
It seems an emtpy GraphQL query always times out. So let's avoid such queries
from the client side.

Reviewed By: xavierd

Differential Revision: D18626286

fbshipit-source-id: 70f0061f7f7ad8c7d8be4e15fc419039dc07d61e
2019-11-20 16:57:35 -08:00
svcscm
7471ac41f3 Updating submodules
Summary:
GitHub commits:

96f60c7a28
01987a195c
8f815149ec
47445ecdd0
c3b48f4db4
717a31547f
0e62d3bb5f
3a85df8ead
0c319bd2c5

Reviewed By: yns88

fbshipit-source-id: 4419ddcaf3d818b908bec9f47a25be5762aa7888
2019-11-20 16:57:34 -08:00
Adam Simpkins
7d0226157f getdeps: update eden dependencies
Summary:
Include tools/lfs in the shipit path map for now, since it is needed to
download vendored Rust crates on internal builds.  Also correctly indicate
that the fb-mercurial* dependencies also apply only to internal builds.

Reviewed By: chadaustin

Differential Revision: D18621421

fbshipit-source-id: 74f00bf318ff9aefdca8696a61a8f33587749e66
2019-11-20 16:04:33 -08:00
Adam Simpkins
2eb88ab683 getdeps: automatically detect if a build appears to be Facebook-internal
Summary:
Automatically detect the `--facebook-internal` flag based on the current
repository project name.

Reviewed By: wez

Differential Revision: D18621358

fbshipit-source-id: f2b3018169b151811eec455863a8bfc17667d4d8
2019-11-20 16:04:33 -08:00
svcscm
38b9d58808 Updating submodules
Summary:
GitHub commits:

2c761ddd41
352c2d8b66
f87544dffb
dcbe9a1da3
5300258a58
c0983d0691

Reviewed By: yns88

fbshipit-source-id: fc31c6f0bb6c09bb2d1c6f55e9a9afffef51cb5f
2019-11-20 16:04:32 -08:00
svcscm
ee4183030f Updating submodules
Summary:
GitHub commits:

7cc9d9257b
93d91859c8
ab0a6495f6
3cd75736a7
fb3e6aac5d
4ac5fd6ed9
cf783ae678
6aaaa4754f

Reviewed By: yns88

fbshipit-source-id: 60b6d716aa073eda5fc6dbcbd0daeee536c25314
2019-11-20 13:00:45 -08:00
Adam Simpkins
344661b651 cmake: update RustStaticLibrary.cmake to hook up cargo dependencies
Summary:
Update `RustStaticLibrary.cmake` to let CMake know that running `cargo` will
produce the Rust static library output.  Without this CMake does not know how
to correctly wire up dependencies for libraries.  Previously the code used the
`ALL` target to ensure that the Rust static library was built, but this did
not ensure that it was built before executables that require it.

Reviewed By: pkaush

Differential Revision: D18588010

fbshipit-source-id: 1a1880993bdfa3fcb876a0f6507e5cddfea9b738
2019-11-20 12:28:40 -08:00
Adam Simpkins
55d980ee42 update RustStaticLibrary.cmake to support vendored crates on Windows
Summary:
Update the `RustStaticLibrary.cmake` code to explicitly find and invoke the
Python interpreter when running the Python script to download vendored crates.
This is required to work on Windows.

Reviewed By: pkaush

Differential Revision: D18588012

fbshipit-source-id: 4c2dfbc786adf0a7aa6b43483060800627a8aca1
2019-11-20 12:28:40 -08:00