Commit Graph

60114 Commits

Author SHA1 Message Date
Thomas Orozco
0ab9638ef6 py3: fix lfs debuglfsreceive{,all}
Summary:
Those commands are broken right now: they try to write bytes but don't use
`writebytes`.

Reviewed By: DurhamG

Differential Revision: D23450968

fbshipit-source-id: 5d554771459f81718d90e5bad9a4c439cbb05d97
2020-09-01 11:04:16 -07:00
Thomas Orozco
46ab9553bc py3: fix lfs uploads not working anymore
Summary:
When Python 3 wants to upload a file-like object, it does something a bit
awkward: it sets the `Transfer-Encoding` to `chunked`, but doesn't actually
chunk the data. Also, for some reason ,it still sets the `Content-Length`. I'm
not sure where that is coming from.

The thing is, when you set `Transfer-Encoding` to `chunked`, you do need to
chunk, or the other end is going to get very confused.

Unfortunately, this is not what happens here (note that the "send" logs are
from enabling http tracing in Python here, and those logs are basically one
line before `.send()` into a socket, so the chunking doesn't appear to happen
elsewhere):

```
[torozco@devbig051]~/opsfiles_bin % echo "aaaa" | ~/fbcode/buck-out/gen/eden/scm/__hg-py3__/hg-py3.sh debuglfssend https://mononoke-lfs.internal.tfbnw.net/opsfiles_bin
send: b'PUT /opsfiles_bin/upload/11a77c3d96c06974b53d7f40a577e6813739eb5c811b2a86f59038ea90add772/5 HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-length: 5\r\nx-client-correlator: tQT3yBfFEzhVtqI5\r\naccept: application/mercurial-0.1\r\ncontent-type: application/x-www-form-urlencoded\r\nhost: mononoke-lfs.internal.tfbnw.net\r\ntransfer-encoding: chunked\r\nuser-agent: mercurial/4.4.2_dev git/2.15.1\r\n\r\n'
sendIng a read()able
send: b'aaaa\n'
reply: 'HTTP/1.1 400 Bad request\r\n'
header: Content-Type: text/html; charset=utf-8
header: Access-Control-Allow-Origin: *
header: proxy-status: client_read_error; e_upip="AcLKajO63Vab0hC4kzGZQsqck3P_YOu7HsBzshC-NCbuo31tlWWqCiVw5xVLh44LYYe7qioCPqYSb8-1cBpdvFDZb_t5oYRP1Q"; e_proxy="AcJjRKHG02qo6Bv6fEPCUVF7DpCyrq3rmSnXhRLWakKWREEvVpk4jc-tzDyG6l9jvn3vNo8PYPG_5hLtC3L1"
header: Date: Tue, 01 Sep 2020 13:10:35 GMT
header: Connection: close
header: Content-Length: 2959
```

What's a bit confusing to me here is where this Content-length header comes
from. Indeed, normally Python 3 will:

- Not infer a content-length for file-like objects (which is what we have)
  https://fburl.com/ms94eq31
- Set Transfer-Encoding if no Content-Length is present:
  https://fburl.com/f81g8v2j

So, it's a bit unexpected that a) we have a Content-Length (we shouldn't), and
that we b) also have a Transfer-Encoding header. That said, setting the
Content-Length does fix the problem, so that's what this diff does.

Reviewed By: DurhamG

Differential Revision: D23450969

fbshipit-source-id: e1f535ff3d0b49c0c914130593d9aebe89ba18ca
2020-09-01 11:04:16 -07:00
svcscm
3a9762678f Updating submodules
Summary:
GitHub commits:

0cfb1276bb
16d6394130
0baf7052b7
16ebfe2ec2

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: cba4cb1444f2a6e88712c497f729a55d186c91ec
2020-09-01 09:45:55 -07:00
Viet Hung Nguyen
2c1d4a49ad mononoke/repo_import: change logic of file paths rewriting with multiple movers
Summary:
This diff modifies how we rewrite file paths when we import into a repo by allowing the tool to apply multiple movers.

Motivation:
When we try to import into a small repo that pushredirects to a large repo, we have decided to import into the large repo first, then backsync to the small repo. To do that, we have to set a couple of flags related to importing into the large repo (see: D23294833 (d6895d837d)): bookmarks and import destination path.  Previously, we fixed the destination path in large repo by applying the small_to_large repo syncer's mover on the destination path in small repo. e.g:
if small_to_large repo syncer mover = {
default_action = prepend(**large_dir**)
map = [...]},
then **destination_path** in small repo becomes **large_dir/destination_path** in large repo.
After this, we prepended the imported files with the new prefix with another mover: prepend(**large_dir/dest_path**)
a -> large_dir/dest_path/a
Consequently, all directories and files under **destination_path** would get imported under **large_dir/destination_path** in large repo with this logic. e.g.
However, it's possible that with push-redirections, some directories would get remapped to a different place in large repo. e.g
small_to_large syncer mover = {
default_action = prepend(**large_dir**)
map = [
dest_path/b -> random_dir/b
]},
but with the current repo_import implementation dest_path/b would get prepended to large_dir/dest_path/b.
To avoid this, we apply multiple movers on the imported files. e.g.
1. we prepend all files with dest_path:
    mover = {
    default_action: prepend(**dest_path**)
    map={}} =>
    a -> dest_path/a
    b -> dest_path/b
2. we remap the files using the small_to_large repo syncer mover:
    mover = {
 default_action: prepend(**large_dir**)
 map =
 {dest_path/b -> random_dir/b}} =>
   dest_path/a -> large_dir/dest_path/a
   dest_path/b -> random_dir/b

Reviewed By: StanislavGlebik

Differential Revision: D23371244

fbshipit-source-id: 0bf4193b24d73c79ed00dfb38e2b0538388d1c0f
2020-09-01 09:26:07 -07:00
Pavel Aslanov
fffcf5b966 utility to keep streaming clone data warm
Summary: This is streaming clone warmup binary as per https://fb.quip.com/hfuBAdYnzr9M

Reviewed By: StanislavGlebik

Differential Revision: D23347029

fbshipit-source-id: f187a2f3529a7eae5998bab199228bfbe6057e6e
2020-09-01 07:13:33 -07:00
Stanislau Hlebik
14527beaf4 add ObjectFetchContext with causeDetail field
Summary:
As previous diffs in the stack show there were at least one place in the
codebase which used incorrect object context logger and that resulted in "blind
spots" in undesired file fetches logging i.e. undesired file fetches were
logged, but neither pid nor cmd-line was logged.

There are quite a few places in the codebase that use null
object fetch context, and threading the correct object fetch context to all of
them might be hard. Threading the context is a bit annoying, so it would be good to know something like "EdenDispatcher code is responsible for most of the blind spots, so let's thread the correct context there first". Or it would be equally good to know that none of the null object context are responsible for blind spots.

This diff might help us decide where we need to thread real object fetch context
first. Instead of passing null object fetch context let's pass null object
fetch context with causeDetail field. This field will be logged to scuba (see
BackingStoreLogger::logImport code), and instead of getting "Unknown" interface
we'll get e.g. "Unknown - EdenDispatcher::create", and that would highlight
where we need to thread the context.

A note about implementation - getNullContextWithCauseDetail returns a raw pointer
which is expected to be static i.e. it should work similarly to current
getNullContext implementation. It's quite a hack, but allows us to get rid of
memory allocations (we'd have one memory allocation per place in the code where
getNullContextWithCauseDetail). Let me know if you are ok with this hack.

Reviewed By: kmancini

Differential Revision: D23422526

fbshipit-source-id: e576bba9fc09e160fc42771c7589cdd1694d93c0
2020-09-01 03:39:18 -07:00
svcscm
377aae7156 Updating submodules
Summary:
GitHub commits:

a00f912068
740352755b

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 907b135d73def60441a73ab1c9365f61cd4b81b7
2020-09-01 03:39:18 -07:00
svcscm
591819c23e Updating submodules
Summary:
GitHub commits:

6226f8a2ce

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: ca743ef7dd2c85d02b35847ecef3b90097278ea6
2020-08-31 23:26:05 -07:00
Stanislau Hlebik
2e2e2432a7 sparse: warn if dirstate includes marker files
Summary:
As a follow up to the previous diff, let's also warn if dirstate includes
marker files that should not be included in any sparse profiles.

Reviewed By: DurhamG

Differential Revision: D23414361

fbshipit-source-id: 3d171328bf0ba5754e5bacde85f09abb4fed8603
2020-08-31 23:21:41 -07:00
Stanislau Hlebik
eec5a3d725 return pid even if opcode is 0
Summary:
I'm not sure if that's the right thing to do, so I'd like feedback on that.
Check for opcode was added in D22050919 (fdb1af8bc9), but there was also a comment from
chadaustin

```
Why do you think fuseHeader isn't staying valid? It's a struct that's copied
into the RequestData. It does look like stealReq() sets the opcode to 0, but I
don't see anything that would affect the pid field.
```

So I wonder if this code can be responsible for some of the blind spots in
logging?

Reviewed By: chadaustin

Differential Revision: D23422635

fbshipit-source-id: 4d9a7171d685eb3f6f69da7b8a191df2f65ad897
2020-08-31 23:18:30 -07:00
svcscm
c8634ac9da Updating submodules
Summary:
GitHub commits:

62e63156e7
48c6618455

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 0516eca651f75113b95deeb909e69003d9ee5179
2020-08-31 23:18:30 -07:00
svcscm
b36bd3bb00 Updating submodules
Summary:
GitHub commits:

4245fb2a7c
4bd3999afe
3a630fc16f
89f9492e6f
1119f968c2
1754a8f975
a2bca332bd
32c4ccb81e
66ca11fdec
638775b1ce
b1c4edcf63

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 2469e97661aea0187b0184de0185e7e7f4c50b7e
2020-08-31 17:41:31 -07:00
Jun Wu
56d0255228 extutil: drop runbgcommand
Summary: Callsites were migrated to `util.spawndetached`.

Reviewed By: DurhamG

Differential Revision: D23124753

fbshipit-source-id: f0345461a3f79f9bb6ff3a58e00cdf0ed1893645
2020-08-31 17:34:49 -07:00
Jun Wu
2cdca65aed remotefilelog: runshellcommand -> spawndetached
Summary: There seems to be no need to use a shell.

Reviewed By: DurhamG

Differential Revision: D23124756

fbshipit-source-id: 7de1c23e2325fe88dc4c6a2c90563d06f109ed2f
2020-08-31 17:34:49 -07:00
Jun Wu
ffb93ca839 commandcloud: runbgcommand -> spawndetached
Summary:
The Rust process utility avoids issues with interaction with Python and can do file
redirection on Windows.

Reviewed By: DurhamG

Differential Revision: D23124755

fbshipit-source-id: f72b88bafd19b3b41e53afbf6a4095d0d6bcb93a
2020-08-31 17:34:49 -07:00
Jun Wu
6e2a90ddb5 hooks: add predefined hook to run fsync
Reviewed By: DurhamG

Differential Revision: D22993217

fbshipit-source-id: 2cfb6b26479cd7dad02419fb76fa5d3ca5dd66db
2020-08-31 17:34:49 -07:00
Jun Wu
a01693df0e util: use Rust pyprocess to implement spawndetached
Summary:
The Rust bindings handle the cross-platform differences and avoids issues
with Python / Rust interaction. Use it.

As we're here, extend the API to support cwd and env.

Reviewed By: DurhamG

Differential Revision: D23124171

fbshipit-source-id: fdc13f6eaeb25c05b53d385eb220af33dad984e1
2020-08-31 17:34:48 -07:00
Jun Wu
a90c8ea775 bindings: export rust process handling to Python
Summary:
Spawning processes turns out to be tricky.

Python 2:

- "fork & exec" in plain Python is potentially dangerous. See D22855986 (c35b8088ef).
  Disabling GC might have solved it, but still seems fragile.
- "close_fds=True" works on Windows if there is no redirection.
- Does not work well with `disable_standard_handle_inheritability` from `hgmain`.
  We patched it. See `contrib/python2-winbuild/0002-windows-make-subprocess-work-with-non-inheritable-st.patch`.

Python 3:

- "subprocess" uses native code for "fork & exec". It's safer.
- (>= 3.8) "close_fds=True" works on Windows even with redirection.
- "subprocess" exposes options to tweak low-level details on Windows.

Rust:

- No "close_fds=True" support for both Windows and Unix.
- Does not have the `disable_standard_handle_inheritability` issue on Windows.
- Impossible to cleanly support "close_fds=True" on Windows with existing stdlib.
  https://github.com/rust-lang/rust/pull/75551 attempts to add that to stdlib.
  D23124167 provides a short-term solution that can have corner cases.

Mercurial:

- `win32.spawndetached` uses raw Win32 APIs to spawn processes, bypassing
  the `subprocess` Python stdlib.
- Its use of `CreateProcessA` is undesirable. We probably want `CreateProcessW`
  (unless `CreateProcessA` speaks utf-8 natively).

We are still on Python 2 on Windows, and we'd need to spawn processes correctly
from Rust anyway, and D23124167 kind of fills the missing feature of `close_fds=True`
from Python. So let's expose the Rust APIs.

The binding APIs closely match the Rust API. So when we migrate from Python to
Rust, the translation is more straightforward.

Reviewed By: DurhamG

Differential Revision: D23124168

fbshipit-source-id: 94a404f19326e9b4cca7661da07a4b4c55bcc395
2020-08-31 17:34:48 -07:00
Jun Wu
b7f2ee577a spawn-ext: extend Command::spawn to avoid inheriting fds
Summary:
The Rust upstream took the "set F_CLOEXEC on every opened file" approach and
provided no support for closing fds at spawn time to make spawn lightweight [1].

However, that does not play well in our case:
- On Windows:
  - stdin/stdout/stderr are not created by Rust, and inheritable by
    default (other process like `cargo`, or `dotslash` might leak them too).
  - a few other handles like "Null", "Afd" are inheritable. It's
    unclear how they get created, though.
  - Fortunately, files opened by Python or C in edenscm (ex. packfiles) seem to
    be not inheritable and do not require special handling.
- On Linux:
  - Files opened by Python or C are likely lack of F_CLOEXEC and need special
    handling.

Implement logic to close file handlers (or set F_CLOEXEC) explicitly.

[1]: https://github.com/rust-lang/rust/issues/12148

Reviewed By: DurhamG

Differential Revision: D23124167

fbshipit-source-id: 32f3a1b9e3ae3a9475609df282151c9d6c4badd4
2020-08-31 17:34:48 -07:00
Jun Wu
b3fd513ea4 util: make gethgcmd more reliable
Summary:
It uses `sys.argv`, which might be rewritten by `debugshell`. Capture
`sys.argv` to make hgcmd more reliable.

Reviewed By: DurhamG

Differential Revision: D22993215

fbshipit-source-id: 5fa319e8023b656c6cdf96cb3229ea9f2c9b9b99
2020-08-31 17:34:48 -07:00
Jun Wu
333177101f hooks: add a hook point after write commands
Summary: This allows us to run commands after changes were made to the repo.

Reviewed By: DurhamG

Differential Revision: D22993218

fbshipit-source-id: d9943dcda94da42970fb9107f48f4caa14b6a9d4
2020-08-31 17:34:48 -07:00
svcscm
05a99d0549 Updating submodules
Summary:
GitHub commits:

d34550f88c
09f60921e3
cbc7632511
bc8a9f69af
acbdb7449b
1dc6251581
e72282f72e
268329cded
dd0145feae
e5a417434d
4fc01683c3
a9397bf721
608ef20f8a

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 96bd1fc40f66db272ba9eead14846202e623e1ed
2020-08-31 17:26:08 -07:00
Zeyi (Rice) Fan
c693932e8e return returncode correctly
Reviewed By: xavierd

Differential Revision: D23434438

fbshipit-source-id: 813f987cf62e72c0b6704b31e6e9168006735b6f
2020-08-31 16:26:46 -07:00
svcscm
9599bb5f18 Updating submodules
Summary:
GitHub commits:

cddd02a930
962263bed9

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: 393000dbefb4d10164d8e2b76eb87def72e17751
2020-08-31 15:22:04 -07:00
David Tolnay
75c2118e01 Remove crate_root from Rust dependency info
Reviewed By: danobi

Differential Revision: D23430948

fbshipit-source-id: c4b374021325fc247121ceecd0e82a0291aa75d6
2020-08-31 14:43:24 -07:00
svcscm
1bc22d542f Updating submodules
Summary:
GitHub commits:

5f5f414e9a
b6d2974b18
193e618d57
792d2f906e
b0787925bd
4d116de925
9ed1186cd9
54ec33e474
8d1c8c0e38

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: a9c16f83d1d6c68e5089810d4d28edc1eac66e97
2020-08-31 14:03:34 -07:00
Jun Wu
9aa9d022ae util: stop using time.perf_counter() for timer()
Summary:
Some code paths (ex. metalog.commit) use `util.timer()` as a way to get
seconds since epoch, and get 0 for tests. Other use-cases of `util.timer()`
are ad-hoc time measure for displaying speed / progress. They do not need high
precision or strong guarantee that the clock does not go backwards. Drop the
`time.perf_counter()` to meet the first use-case's expectation.

Reviewed By: singhsrb

Differential Revision: D23431253

fbshipit-source-id: 8bf2d1ed32e284e17285742e1d0fd7178f181fb3
2020-08-31 13:04:54 -07:00
Jun Wu
9f33746b31 histedit: do not show revision numbers
Summary:
With segments backend, the revision numbers will be longer than commit hashes
and are confusing.

Reviewed By: DurhamG

Differential Revision: D23408971

fbshipit-source-id: e2057fa644fc7b6be4291f879eee3235bb4e687b
2020-08-31 11:57:53 -07:00
Jun Wu
96548cade8 remotefilelog: do not assume range(len(cl)) are valid revs in _linkrev
Summary: `range(len(cl))` contains invalid revs with segments backend.

Reviewed By: DurhamG

Differential Revision: D23411209

fbshipit-source-id: 2f83a5402bb46824cf38871926c1954507b64b56
2020-08-31 11:57:53 -07:00
Jun Wu
ff2d572717 changelog2: avoid excessive memory usage during large pulls
Summary:
Pulling from older repos (ex. years ago) could require GBs of commit text data.
Flush commit data if they exceed certain size.

This is for revlog compatibility.
In the future we probably just make commit text lazy to avoid this kind of issues.

Reviewed By: DurhamG

Differential Revision: D23408834

fbshipit-source-id: 273384f5a05be07877bb1c9871c17b53ba436233
2020-08-31 11:57:53 -07:00
Jun Wu
01c551bb30 hgcommits: add flush_commit_data API
Summary: This would be used to avoid excessive memory usage during pull.

Reviewed By: DurhamG

Differential Revision: D23408833

fbshipit-source-id: 8edd95ab8201697074f65cc118d14755a230567d
2020-08-31 11:57:53 -07:00
Jun Wu
fee02d78e0 changelog2: only call addcommits once in addgroup
Summary:
`addcommits` is designed to be more efficiently if called with a batch of
commits. So let's buffer the commits to add then only call it once.

This avoids some N^2 behaviors, for example, the NameDag internally will
prepare "snapshot" of itself which involves coping the pending Rust vecs
about the segments and id <-> hash map.

The change makes `pull` usable from unusably slow:

Original Python Revlog backend:

```
In [1]: %trace repo.pull(bookmarknames=['master'],quiet=False)
 5191   +466      | Apply Changegroup                                   edenscm.mercurial.bundle2 line 516
                  | - Commits = 125                                     :
                  | - Range = a1d1b3ade136:2e3fe78af189                 :
 5191   +466      | changegroup.cg1unpacker.apply                       edenscm.mercurial.changegroup line 313
 5192   +416      | Progress Bar: commits                               (progressbar)
 5192   +415      | changelog.changelog.addgroup                        edenscm.mercurial.changelog line 536
 5192   +409      | revlog.revlog.addgroup                              edenscm.mercurial.revlog line 2116
 5215   +371      | changelog.changelog._addrevision (125 times)        edenscm.mercurial.changelog line 558
```

DoubleWrite (Segments + Revlog) backend, Before:

```
In [2]: %trace repo.pull(bookmarknames=['master'],quiet=False)
  2396 +154059   | Apply Changegroup                            edenscm.mercurial.bundle2 line 516
                 | - Commits = 323                              :
                 | - Range = cb0b100180ba:5fb57c74f72e          :
  2396 +154059   | changegroup.cg1unpacker.apply                edenscm.mercurial.changegroup line 313
  2397 +151433    \ Progress Bar: commits                       (progressbar)
  2397 +151433     | changelog2.changelog.addgroup              edenscm.mercurial.changelog2 line 334
```

DoubleWrite (Segments + Revlog) backend, After:

```
In [2]: %trace repo.pull(bookmarknames=['master'],quiet=False)
 4629   +512      | Apply Changegroup                                       edenscm.mercurial.bundle2 line 516
                  | - Commits = 45                                          :
                  | - Range = cf23c6972934:1ff0c5f0e7ad                     :
 4629   +512      | changegroup.cg1unpacker.apply                           edenscm.mercurial.changegroup line 313
 4630   +494      | changelog2.changelog.addgroup                           edenscm.mercurial.changelog2 line 334
```

Reviewed By: DurhamG

Differential Revision: D23390435

fbshipit-source-id: dd97a5008dedd844d4134b87bfef190fa739a80b
2020-08-31 11:57:52 -07:00
Jun Wu
e5a4533622 revlog: drop addrevisoncb from addgroup
Summary:
The users of addrevisoncb are gone.
This also removes the "alwayscache" parameter of "_addrevision".

Reviewed By: DurhamG

Differential Revision: D23390437

fbshipit-source-id: 7edd9dd0b93d4cb9d4f35d088a1aef719b450ec1
2020-08-31 11:57:52 -07:00
Jun Wu
1199790982 upgrade: remove the upgrade module
Summary: It is about legacy revlog formats that are no longer relevant.

Reviewed By: DurhamG

Differential Revision: D23390436

fbshipit-source-id: 58c2c432804181bcc6517d6c988777b843fc9ba4
2020-08-31 11:57:52 -07:00
Stanislau Hlebik
2d5000293e sparse: disallow changing profiles if it includes bad file
Summary:
We have a few safeguards against creating full checkouts. However we have
sparse profiles that are not full, but that include very large directories
which normally should not be included.

This diff adds a logic that checks if a new sparse profile has any of the "marker"
files i.e. some files from a folder that should not be included. Operation
aborts if that the case, however there's always a way to workaround that.

Reviewed By: DurhamG

Differential Revision: D23414200

fbshipit-source-id: 626f392319eb1be8b35f39cadafb61f3c1dfefe3
2020-08-31 11:38:16 -07:00
svcscm
9e1c4eac92 Updating submodules
Summary:
GitHub commits:

041d632a47

Reviewed By: 2d2d2d2d2d

fbshipit-source-id: c4f7bf28b14cf48e0eaa9b001dd0368328813c89
2020-08-31 10:32:44 -07:00
Stanislau Hlebik
71e1d6493e pass context to getOrLoadChild
Summary:
Scuba logging that tracks undesired file fetches has some blind spots i.e. a
lot of fetches have null pid and null cmd line. This diff tries to fix another
part of the problem.

TreeInode::getOrLoadChild() has TODO `pass a fetch context down through
getOrLoadChild to track this load`. This diff fixes this TODO, and also starts
to pass context from EdenDispatcher:lookup method.

Note that it adds quite a lot of new `ObjectFetchContext::getNullContext()`
calls, and potentially those might be responsible for blind spots in logging.
I'll try to address this problem in the next diffs.

Reviewed By: kmancini

Differential Revision: D23418218

fbshipit-source-id: 319d7436494d8dce3580289aae9963aa13bfc191
2020-08-31 10:05:02 -07:00
Stanislau Hlebik
ea4e64864c fix one case of logging of null ClientPid
Summary:
Scuba logging that tracks undesired file fetches has some blind spots i.e. a
lot of fetches have null pid and null cmd line. This diff fixes at least part
of the problem.

TreePrefetchContext which is used from TreePrefetchLease didn't logged client
pid at all (in fact, it logged almost nothing). This diff fixes at least one blind spot, however it doesn't look like this is the only one.

Reviewed By: kmancini

Differential Revision: D23417451

fbshipit-source-id: 107884e94c6b40de999328ec2ef78fe22174c1ca
2020-08-31 10:05:02 -07:00
Genevieve Helsel
5157cf6f34 fix eden thrift legacy dependencies
Summary: `legacy.py` depends on other files in this directory, so lets add them all to the link tree

Reviewed By: fanzeyi

Differential Revision: D23356917

fbshipit-source-id: e4bfd82ebbd9d143a5454a43bb47e8dd55b4485f
2020-08-31 07:55:27 -07:00
Genevieve Helsel
89791f6b89 mock kerberos checks in doctor tests
Summary: These tests fail locally since adding these checks in eden doctor, so we need to mock them.

Reviewed By: chadaustin

Differential Revision: D23326597

fbshipit-source-id: 87a0e6ab0472e3ae56f89503e928c5a00a16ab04
2020-08-31 07:51:17 -07:00
svcscm
84f5d59ca6 Updating submodules
Summary:
GitHub commits:

459508756b

Reviewed By: bigfootjon

fbshipit-source-id: 00b90faed838e20114b6b86c6f1220f7fddd0df7
2020-08-30 19:22:40 -07:00
svcscm
7e4a373f87 Updating submodules
Summary:
GitHub commits:

382d87a414
a22d69aad7
e473d6c8d0
473b9f42b0
7f8bdbff06

Reviewed By: bigfootjon

fbshipit-source-id: edac2a71159cf0864497a09efadf24bd6f8fc22f
2020-08-30 03:23:15 -07:00
svcscm
fbb2ab60e2 Updating submodules
Summary:
GitHub commits:

4c4e6843ea
5ffc7bc0fe

Reviewed By: bigfootjon

fbshipit-source-id: af0dfb3fc44517e56719832fa1961eba9f714892
2020-08-29 02:55:06 -07:00
Stanislau Hlebik
7bbf044a49 sparse: fix --sparse to work on eden
Summary:
"hg diff" has --sparse option which diffs only files inside a sparse checkout.
The problem is that it doesn't work on eden checkouts because eden repo doesn't
have sparsematch() function.

This diff makes it so that if sparsematch() function doesn't exist then
--sparse option is just ignored.

The motivation for this change is
https://fb.workplace.com/groups/corehg/?post_id=687768245151742. There are some
diff calls that are triggered by arc lint that race with "hg update" and might download
loads of data on people's laptops. This diff doesn't fix the race, but it:
1) Makes sure we don't download too much data that are not in sparse profiles.
2) arc lint doesn't care about files outside of sparse profiles anyway, so
running --sparse make sense.

Reviewed By: DurhamG

Differential Revision: D23396918

fbshipit-source-id: 2a386fdbeab85187e2c2acab69cb86b74124d46f
2020-08-28 23:47:40 -07:00
svcscm
f447d4d04d Updating submodules
Summary:
GitHub commits:

7ba0dc60d7

Reviewed By: bigfootjon

fbshipit-source-id: 1977d472336b939dc952d4ee45233c6c83ea42f6
2020-08-28 23:47:40 -07:00
svcscm
eea1a70175 Updating submodules
Summary:
GitHub commits:

76f0201355
24eab67fc9

Reviewed By: bigfootjon

fbshipit-source-id: 2709e5f3edf3314b8aa74b0f1a75d427fb63725a
2020-08-28 19:57:23 -07:00
Xavier Deguillard
4f9e1750c2 cli: enable doctor on Windows
Summary:
Most of the fixes are pretty trivial as the code was using functions not
present on Windows, either work around them, or switch to ones that are
multi-platform.

Of note, it looks like `hg doctor` doesn't properly detect when Mercurial and
EdenFS are out of sync, disabling the  tests until we figure out why.

Reviewed By: genevievehelsel, fanzeyi

Differential Revision: D23409708

fbshipit-source-id: 3314c197d43364dda13891a6874caab4c29e76ca
2020-08-28 19:49:37 -07:00
svcscm
6b498dfa02 Updating submodules
Summary:
GitHub commits:

86a15594f4
a4191b64fa
22ddfcb288
963314ffd6
20d994faf4

Reviewed By: bigfootjon

fbshipit-source-id: d872e2a2dbf3e57a909ae7464b49fa4c97c4746a
2020-08-28 19:49:37 -07:00
svcscm
08230e8225 Updating submodules
Summary:
GitHub commits:

cc04af2926
8dc2d39f8e
50ef7df1a4

Reviewed By: bigfootjon

fbshipit-source-id: 2001f26ded598a966f37cc965d5bcbcd54aaf673
2020-08-28 16:54:23 -07:00
Stefan Filip
a86409361c thrift: sync repos.thrift to fbcode
Summary:
`fbcode` sync after adding the `update_algorithm` option to
`RawSegmentedChangelogConfig`.

Reviewed By: quark-zju

Differential Revision: D23376694

fbshipit-source-id: df8a378303ec00d5d7d7ac3fff7a4a8cffc99328
2020-08-28 16:37:57 -07:00