Commit Graph

68234 Commits

Author SHA1 Message Date
Jun Wu
7d0f1c8af7 dag: add another test about vertex to id logic
Summary:
The test does not discover new issues but it seems nice to have protecting
behaviors.

Reviewed By: StanislavGlebik

Differential Revision: D31106124

fbshipit-source-id: 4060b16f2dac34ff29c0d4cee1ce19a9a61014ee
2021-09-22 11:15:22 -07:00
Jun Wu
80b650d650 dag: resolve bugs in vertex to location translation
Summary:
There are 2 issues:

- Previously it only follows parent -> child relations when parent is the head
  of a segment. It's also possible that we need to follow parent -> child when
  parent is in the middle of a flat segment. The added ASCII graph in
  `iddag.rs` shows when that happens.
- Previously there is no check about following p2 (second parent) for linear
  history. The check needs to be added and p2 of merges cannot be resolved.

This change makes `x~0` result an error. Some `x~n` are changed to alternative
ones because more child segments are visited (see also D30919581 (3ef445c0a6)).

Reviewed By: StanislavGlebik

Differential Revision: D30919579

fbshipit-source-id: eaa69d31612a2006b0b46132a797025536288624
2021-09-22 11:15:22 -07:00
Jun Wu
0537cb1312 report individual errors of hash-to-location correctly
Summary:
The endpoint "hash to location" cannot really expose individual errors
correctly. The type `CommitHashToLocationResponse` allows exposing individual
errors for each hgid but the implementation will just take one error and report
such error for all hgids. This is because the use of
`collect::<Result<ContainerType>>()?` collapses multiple individual "ok" and "err"
values into one "err".

Change the stack so we can preserve individual errors.

Reviewed By: StanislavGlebik

Differential Revision: D31106125

fbshipit-source-id: 46b1e8b2fcee00b8d8dda0935e2a005ee8aef0ee
2021-09-22 10:38:45 -07:00
Mateusz Kwapich
b23a9bbbe5 add abort and requeue commands to the async-requests
Summary:
Those two commands allow us to easily make another job pick-up unfinished
request and finish a request with error.

aborting will actually make the worker stop working on the requests the next
time worker tries to update the heartbeat.

Reviewed By: StanislavGlebik

Differential Revision: D30965078

fbshipit-source-id: 5b683ea09c7dd74ff903416f2a1d393f9b55c588
2021-09-22 10:34:56 -07:00
Carolyn Busch
f8d6e362da fix http conditional
Summary: Fix bug in httpenabled check. Only local repo has edenapi attribute and not remote.

Reviewed By: quark-zju

Differential Revision: D31059979

fbshipit-source-id: c77f1455949f28b081f8fef86aeb83ecd1c3ceba
2021-09-22 10:22:40 -07:00
Carolyn Busch
7a9cab0157 add method for httpcommitgraph enabled
Summary: Move conditionals for using edenapi commit graph endpoint to a common method. This fixes the conditional check in _pullchangeset which should match the one in pull.

Reviewed By: quark-zju

Differential Revision: D31030783

fbshipit-source-id: e665067bcf12bc8211850d547df42bc48727de48
2021-09-22 10:22:40 -07:00
Carolyn Busch
67380e537e match commit graph url to server
Summary: The url for commit graph on the server is repo/commit/graph and repo/commit/commit_graph on the client. Update client to match server url.

Reviewed By: quark-zju

Differential Revision: D31030784

fbshipit-source-id: fb58c53a9264498f0e488abadd5f2b5480f0c672
2021-09-22 10:22:40 -07:00
Jun Wu
7558f9e6cc edenapi: drop support for unfiltered=false in hash to location endpoint
Summary:
The `unfiltered` field was to support legacy clients that are months old. Drop
support for it to clean the code a bit.

Reviewed By: StanislavGlebik

Differential Revision: D31106176

fbshipit-source-id: 7cfd6827812258776d6d9eac512b497777fecb70
2021-09-22 10:18:22 -07:00
Jun Wu
4e0140653c segmented_changelog: expose inner error message in hash-to-location endpoint
Summary:
Previously it just passes "failed to compute the common descendant and distance
for X", the outmost layer (context) of the error to the client. Make it contain
more messages about the inner error and heads explicitly.

Reviewed By: StanislavGlebik

Differential Revision: D31071741

fbshipit-source-id: ec4f161491e14ae0e0c422f5e92a3849a5a29b56
2021-09-22 10:18:22 -07:00
Jun Wu
3ef445c0a6 dag: make iddag parent lookup support parent range
Summary: This will be used by upcoming changes.

Reviewed By: DurhamG

Differential Revision: D30919581

fbshipit-source-id: 5e4c13004c577d4a87948c1985bdf48ebd1379a3
2021-09-22 10:18:22 -07:00
Jun Wu
a4a8be5d24 dag: extract indexedlog iddag parent key logic to a function
Summary: This method will be used in the next change.

Reviewed By: DurhamG

Differential Revision: D30919580

fbshipit-source-id: a5cab7fad0dda0de15244a9d7c1887534f061f3a
2021-09-22 10:18:22 -07:00
Jun Wu
f46401df93 dag: remove unnecessary methods
Summary:
After D26360561 (aa9dfeff2e), `IdDag<Store>` derefs to `Store` for algorithms. There is no
need to duplicate the methods in `IdDag<Store>`.

Reviewed By: yancouto

Differential Revision: D30911148

fbshipit-source-id: d476e318ab565369b93f4bd8467989a2a2e76f82
2021-09-22 10:18:22 -07:00
Jun Wu
c0a47999ae dag: resolve a bug in vertex to location translation
Summary:
Added checks so the `x` in the returned `x~n` is a parent of a merge that is an
ancestor of requested heads.

Reviewed By: DurhamG

Differential Revision: D30911149

fbshipit-source-id: 09fd6a01ea346a53c8d2ff6042951c8094cb8b04
2021-09-22 10:18:22 -07:00
svcscm svcscm
683488a73e Updating submodules
Summary:
GitHub commits:

b3affc472b
6f3a0ad16a
f880b566c2
8eb7de8d67
abf7e0dc53
fae13b0887
ea6e81e369
b293c3ec84
0bbe1ef4f6
0fb129e7fb

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 24d8bc56a2c4cb4dc0d893f0e15f04fc45706a59
2021-09-22 10:09:41 -07:00
Liubov Dmitrieva
fd9bd36040 clean up: remove dest option everywhere
Summary:
After migration to Mononoke & EdenAPI supporting different destinations don't make sense.

The destination is always either default path or edenapi endpoint.

Reviewed By: yancouto

Differential Revision: D31081193

fbshipit-source-id: 49a02899173690cfcb55bf8fc6aec13b05377ca6
2021-09-22 09:15:43 -07:00
svcscm svcscm
4bf22d3f81 Updating submodules
Summary:
GitHub commits:

cc9032a0e4
55bfc063fd

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f5edd14af8af27a1a68a5e480ad79e7478e96718
2021-09-22 09:09:45 -07:00
Jan Mazur
32c57e97bf make test-cats less flaky
Summary: It used to be flaky. Perhaps ncat exited by itself in some cases so there was nothing to kill. Just ignore the kill command's output. As long as we get the cats header the test is fine.

Reviewed By: HarveyHunt

Differential Revision: D31108514

fbshipit-source-id: e2791610c49bacdc31c26710f087cbe49f4d734e
2021-09-22 04:52:06 -07:00
Stanislau Hlebik
fd899d6049 mononoke: make it possible to rebase a stack of commits in admin
Summary: It can be useful if we want to rebase a lot of commits at once

Reviewed By: mitrandir77

Differential Revision: D31106975

fbshipit-source-id: 26bb7f3fd166b483c44a4991ede4f0a9a462fff7
2021-09-22 03:15:20 -07:00
CodemodService Bot
8844b556e5 Daily common/rust/cargo_from_buck/bin/autocargo
Reviewed By: krallin

Differential Revision: D31106408

fbshipit-source-id: 6211061e0d15c383f4e5cb3c3a46175837d1f2c0
2021-09-22 01:39:59 -07:00
svcscm svcscm
f58a607bb5 Updating submodules
Summary:
GitHub commits:

c9ba7137ec
8eedef2d84
58444eadda
eea605442a
38248ce17e

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7246008d4dece3373c2fb51c011ffa4d9b3aebfb
2021-09-21 22:43:55 -07:00
svcscm svcscm
1aea0c5ee9 Updating submodules
Summary:
GitHub commits:

a94e1079be
7f339dd4ba
3758a5a263
85da27dc18
262212b709
aa2808bab3

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c59206cce8f53577258cd1c763e963a375b5cc1b
2021-09-21 21:06:01 -07:00
svcscm svcscm
16f625e8c8 Updating submodules
Summary:
GitHub commits:

b0d626f237
92fffa59b4
fcff6a45cc
e83025ea17
ca19387f20
86ff80bb2a
05012ffbf7
ae3ed95ddc
2ed211cf1a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 6066a7cbf497b7bf5b72b077620848c583397099
2021-09-21 19:59:23 -07:00
svcscm svcscm
051472df1c Updating submodules
Summary:
GitHub commits:

e748d85793
a2eb52ccac
b87fe24e2c
d584814809
d64d606eec
7a8ec4c758
d946574601
9570ae990f
31b9ffba86
3efcba85bd
bd33363e71

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 1f6de4907e190134ef8b5b4277e00cadac4b93aa
2021-09-21 19:23:49 -07:00
Yipu Miao
5ca5ef3871 Let download_directory support eden option
Summary: Follow the D30313559, this diff will enable ```download_directory``` with eden option

Reviewed By: Skory

Differential Revision: D30549600

fbshipit-source-id: f87326bd7c17abd975eab823c62ee0ffe3bf7443
2021-09-21 18:41:16 -07:00
svcscm svcscm
3ab5eba9ed Updating submodules
Summary:
GitHub commits:

2136471de8
92e491b52f
3061b7dca6
ba00aa3c61
f4cba4e34c
6dae437e13
e9075b927b
7c3e1e58ea
ea4f9c5048
df0df3e60f
87f4f4f67d

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 99bfb9362cc36ee1fa2e6b176e7f9daa99392ae9
2021-09-21 18:04:13 -07:00
svcscm svcscm
4fa4feafd8 Updating submodules
Summary:
GitHub commits:

9f2673b3c2
1d9fc68a0d
b25d9046d1
dc0ff62702
9320067703
8fdcd6ad9e
8abfca75a9
384c83c349

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 89e2273395c82cf3531681b79f8a0614a27c5708
2021-09-21 15:29:36 -07:00
Meyer Jacobs
39ec42f832 backingstore: add file aux data support to BackingStore
Summary: Add support for fetching file aux data from BackingStore via scmstore.

Reviewed By: andll

Differential Revision: D31048574

fbshipit-source-id: ccb783272d0ffe32277debdaac45c00fc4df9ddb
2021-09-21 15:19:55 -07:00
svcscm svcscm
622e1b8ad8 Updating submodules
Summary:
GitHub commits:

827f65197a
fc6a52f743
67d0cfafc1
e1814dde9b
c51cae3f31
3d5ed32e86
35734d15d3
af34c218a8
311de0efc6
69b732f78e

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: b4188e36d1d8cb32f8db434bebf8d6c9cd514eb9
2021-09-21 14:57:56 -07:00
Durham Goode
8eda0549d1 eol: remove eol extension
Summary:
We've never really supported this and it has caused weird behavior in
the past. Let's delete it.

Reviewed By: quark-zju

Differential Revision: D31027574

fbshipit-source-id: 297668e35db3c4d5ea17d2a18fc0127ca694cc45
2021-09-21 13:55:08 -07:00
svcscm svcscm
f31d74d293 Updating submodules
Summary:
GitHub commits:

26c950ba83
7b98dfc98e
081d3ba1d9
3919bffbf9
fcce1f2c7a
05e55129d6
583737c221
ee1a84168c
fd6e64125c
32ad549b64
a764fb68e7
4b023f9ae5

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 2873a08084b33788ac2ed26abc8c44e0f105c81e
2021-09-21 13:50:20 -07:00
Durham Goode
742240b65f hggit: delete hggit
Summary: This is no longer used, now that configerator does it's sync via SCS.

Reviewed By: quark-zju

Differential Revision: D31006839

fbshipit-source-id: ddf7923a3c80ad47519bce0e5cb3895f62e7ae2e
2021-09-21 13:45:11 -07:00
Mark Juggurnauth-Thomas
6ddb2d3b52 clienttelemetry: split peerinfo from server response
Summary:
The server_realhostname log field no longer contains just the server hostname,
but instead was changed to the format `HOSTNAME session SESSIONID`, so that the
client knows the server session id.

Redefine the response format to `HOSTNAME (INFOKEY INFOVALUE)*`, so that
session is just an info field from the peer, and parse the response and log its
components.

Reviewed By: quark-zju

Differential Revision: D31081922

fbshipit-source-id: 28f963b4a44f7e9bdd75393ac9b14a2d1a4b5bd0
2021-09-21 12:45:17 -07:00
svcscm svcscm
7885dbcfca Updating submodules
Summary:
GitHub commits:

bc60682c7d
d5b2c69888
1720508093
1de588668c
81fae44c16
8f00ce3672
c07dce5b28
e215518515

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: aaa2248e9203b286f5b92c77a56edd05bfc9b07f
2021-09-21 12:23:21 -07:00
Muir Manders
c73e1c5556 progress: always create rust progress model
Summary:
Create rust progress bar model in python whenever any bar is created, as opposed to only when the bar is rendered. This makes progress metadata always available in rust, regardless of whether progress ends up getting displayed or not. In particular, this enables upcoming "global progress" work to generically expose all hg invocations' progress.

This change necessitated rust to respect more cases where progress should not be displayed. For example, "quiet" mode was previously only respected in python by creating a type of bar that did not end up being registered in rust. Now since all bars are registered, rust needs to know not to render output in this case and others.

Note that I discovered a config discrepancy between python and rust in the norepo=True command mode. Work around for now by changing debugprogress to optionalrepo.

Reviewed By: quark-zju

Differential Revision: D31005075

fbshipit-source-id: 0fa6fb594a15b34b3ae260343526496f8f8b05f8
2021-09-21 11:54:19 -07:00
Muir Manders
67b6925885 configparser: add utility to test for HGPLAIN
Summary:
Add rust utility function to test for HGPLAIN and HGPLAINEXCEPT, analagous to python's ui.plain() method.

I need this so rust can expand its logic of whether to render progress bars or not.

Reviewed By: quark-zju

Differential Revision: D31070840

fbshipit-source-id: 0c394234b9c4337bbddaa08d7a9b1d8ed59dfec0
2021-09-21 11:54:18 -07:00
Jan Mazur
34562e349e send cats with mononokepeer on push
Summary: We'll pass CAT's (Crypto Auth Tokens) from clients to our hooks so we can verify clients' identities.

Reviewed By: StanislavGlebik

Differential Revision: D30666379

fbshipit-source-id: 40bdcc04e05165ff379c34f8a8b5f54c509cce00
2021-09-21 10:30:53 -07:00
Mark Juggurnauth-Thomas
3e9cf0f135 blame_v2: ignore parents if file was copied
Summary:
Mononoke blame derivation differs from Mercurial: if a file is copied over
(i.e., it exists in one or more parents, but also has copy-from info for
a different path), then Mononoke treats this as a merge between the parent
content(s), and the copied-from contents, whereas Mercurial ignores the
parents and just continues the blame from the copied-from contents.

Change Mononoke to match Mercurial behaviour.  This is a breaking change:
blame_v2 derived before this change will not match blame_v2 derived after
this change.  We will rederive blame_v2 for all repositories affected by
this.

Reviewed By: StanislavGlebik

Differential Revision: D31079507

fbshipit-source-id: 33eb4ce54b99712d551ff46e9e96ccd7e5b78d80
2021-09-21 10:22:11 -07:00
Xavier Deguillard
e9de9e1fe5 backingstore: rename refresh method to flush
Summary:
The intent behind the refresh method is to both read new data from the disk,
but also to flush the in-memory write buffer to disk. The name "flush" is used
in the revisionstore code to mean the latter, thus let's use "flush" in the
rest of the codebase.

Reviewed By: kmancini

Differential Revision: D30947873

fbshipit-source-id: c85a6abe770a47d6ce454d6af1fa73e505194a22
2021-09-21 10:22:11 -07:00
Liubov Dmitrieva
d5acd57947 measure pull and push time for cloud sync
Summary:
measure pull and push time for cloud sync

This is needed to be able to analyse this data in scuba

Reviewed By: yancouto

Differential Revision: D31081328

fbshipit-source-id: 404df394443282d62845fad094153a83d71d3150
2021-09-21 08:23:21 -07:00
svcscm svcscm
b5bd3eae3f Updating submodules
Summary:
GitHub commits:

8121d4dcc6

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: f669716fa10c98b801c97c8f2e077a416546507e
2021-09-21 08:23:21 -07:00
Digant Kasundra
ffd233228b Add syslog and slog-syslog crates
Summary: ACE will have to run in situations where Chef has not run, but we'll need to be able to reliably write to the auth logs so Blackbird can properly build detections.  So we need these crates so we can build the somewhat foolproof solution to ensure ACE logs all executions.

Reviewed By: farnz

Differential Revision: D31066559

fbshipit-source-id: 9fa3b5778cd2602bdeaac90a9daa758b117babfe
2021-09-21 07:22:38 -07:00
svcscm svcscm
25bffdd0e7 Updating submodules
Summary:
GitHub commits:

71b9cc7c38
542641b992
ab7009b698
1c25fca2ef
35a15b09c1
b9910e37a1

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 7b28584b73c3daa2237d0450a6473c02be845007
2021-09-21 07:22:38 -07:00
Jan Mazur
25404854aa fix a typo
Summary: a type

Reviewed By: HarveyHunt

Differential Revision: D31081823

fbshipit-source-id: 17e8d8eb8bf87d90bd7122c01ef9248731af31f4
2021-09-21 07:22:38 -07:00
svcscm svcscm
dd617def6b Updating submodules
Summary:
GitHub commits:

edbb66c66f
a931bb15d8
d024607721
660d895adb
d7b1da31a7
efe3584628

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 024dd42291043bdf923a84020ea7044a54903f7b
2021-09-21 04:23:46 -07:00
Mark Juggurnauth-Thomas
9423b5c88f mercurial_mutation: chunk database fetches
Summary:
Some requests can occasionally cause fetches from the database for lots of
changesets in one go.  This causes excessive load on a single database
instance.  Chunk these requests into a more reasonable size.

Reviewed By: krallin

Differential Revision: D31056868

fbshipit-source-id: cbc47f7ef40bfbefaca86b1516fb574772cb531e
2021-09-21 03:24:28 -07:00
svcscm svcscm
2bc04a5ad0 Updating submodules
Summary:
GitHub commits:

e2091d3625
4526a94084
894d229b86
7c34ffc6a9
0f3bfa75e0
7d0cef4b68

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 9cc09ac28126e02f84a21a29021920e29ca9a90e
2021-09-21 02:23:01 -07:00
Mark Juggurnauth-Thomas
ed2f622d66 phabstatus: add commiting and needs final review states
Summary:
Add support for Phabricator's "committing", "recently failed to land", and
"needs final review" states.  These are fake states based on other status
fields in the response from Phabricator.

Reviewed By: quark-zju

Differential Revision: D31055125

fbshipit-source-id: 16b17e1934efcb5d829dd8d4c72ea8465687ab46
2021-09-21 01:30:04 -07:00
svcscm svcscm
8d64a8b396 Updating submodules
Summary:
GitHub commits:

fac251f1a5
059d3522a4
f2fff5461c
5bb9de7cd5
4b648c30eb
7cf6e70d01
c362c23380
6fb0b549fc
33d41c8a45

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: ed4fc31b404c0ae99b5bf9da9e1958f8de4e96ef
2021-09-21 01:30:04 -07:00
svcscm svcscm
10e86fff92 Updating submodules
Summary:
GitHub commits:

60aee3d704
7741f70400
6b15df25c5
91a6e868dd
b37c4a5e80
d172c0e2da
99125c825a
3c0cb003df
4b3cbcb84b
f74122f0d7
774acf6dfe

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 874a097ed877558e1b1be258e7aee39ef06db02d
2021-09-21 00:23:23 -07:00
svcscm svcscm
ddccff6b99 Updating submodules
Summary:
GitHub commits:

bba63c4a0c
3e1b3d4b6c
34a1ca886b
96e1a8b608
aad563a009
5a4ae5a484
a101c2a833

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: dd2a972ad7693d2efedc283950f205d47c6fc9d0
2021-09-20 22:44:17 -07:00