Commit Graph

63693 Commits

Author SHA1 Message Date
Jun Wu
846050ea0f changelog: disable migrating backend for hgsql repos
Summary: hgsql can only use traditional revlog. Disable changelog migration for it.

Reviewed By: kulshrax

Differential Revision: D26891252

fbshipit-source-id: 36c5a448d4fcad15b3415e4534448a945f6d0b4b
2021-03-08 15:58:36 -08:00
Jun Wu
5b7b35d399 changelog: add missing changelog type logging
Summary: A few types weren't logged properly. Add them.

Reviewed By: kulshrax

Differential Revision: D26891253

fbshipit-source-id: 64f59c56663b4f395679307df4a75dcff1ff811f
2021-03-08 15:58:36 -08:00
Stefan Filip
95ab9679e2 error: fix constructor for NetworkError
Summary: hint is an expected valid keyword argument.

Reviewed By: quark-zju

Differential Revision: D26896943

fbshipit-source-id: 006413838fbfa63eccc24cbc98d0e713d5237a69
2021-03-08 14:56:26 -08:00
svcscm
db739ca8ee Updating submodules
Summary:
GitHub commits:

c20c89175f
e85a11d520
338523c0be
7b63354566
6c560e71c3
a6e6f2acb0

Reviewed By: yns88

fbshipit-source-id: 3ed716c8b75c161e542ad683b6ca3b2fda0b0090
2021-03-08 14:38:20 -08:00
Arun Kulshreshtha
c94dfbcc38 clidispatch: pass repo path to config contructor in from_raw_path
Summary: We weren't passing a repo path when initially loading the repo's config in `clidispatch`. This meant that the resulting `ConfigSet` didn't contain values from the shared-repo `.hgrc.dynamic`. Evidently, some other code path in Python would eventually add these values, but this meant that pure-Rust commands could not see config values set via dynamicconfig. Passing the path fixes the problem.

Reviewed By: DurhamG

Differential Revision: D26508980

fbshipit-source-id: 65f187d18098a08c81325e78cb02a8ed854c739a
2021-03-08 13:31:10 -08:00
svcscm
bbb0f7af67 Updating submodules
Summary:
GitHub commits:

2a16bc38d3
12e3152b04
394c09d937
1b94301891
177b5de4fc

Reviewed By: yns88

fbshipit-source-id: 69c45ca59e36ab2e78c3ee2c5a85f33e56c6e4af
2021-03-08 13:31:10 -08:00
svcscm
664397d785 Updating submodules
Summary:
GitHub commits:

4766723339
25dc8c1c46
aa4ae13e9c
a45567ffe9
5726f51e2d
8310900d55

Reviewed By: yns88

fbshipit-source-id: 0c64b295c9e4db3c4ad2a1de37a21e0dc09224db
2021-03-08 12:46:56 -08:00
Ran Yaniv
e5d163411a run autocargo
Summary: Run autocargo.

Reviewed By: c-ryan747

Differential Revision: D26878408

fbshipit-source-id: 14e2efb280c906fa7a79253da74d7518e1a89079
2021-03-08 12:40:50 -08:00
Jun Wu
02ff6e200c remotenames: clean up bookmarks that are ancestors of master
Summary:
See the previous diff for motivation. This removes bookmarks that are
ancestor of master, too. This is important in practice.

Reviewed By: DurhamG

Differential Revision: D26889412

fbshipit-source-id: 255722ed5b486e88ef56e7e378fae3f1113d5fbe
2021-03-08 11:28:40 -08:00
Jun Wu
2e353eb4ce tests: add a test showing release bookmarks aren't automatically cleaned up
Summary:
The auto cleanup was conservative. It keeps `::draft()`. But that means
ancestors of public commits are not cleaned up. Not all release branches
branch off the master branch.

Reviewed By: DurhamG

Differential Revision: D26889413

fbshipit-source-id: c6a8e3f32cf1f7d2ffe74b7ecd183f4e583949bb
2021-03-08 11:28:40 -08:00
svcscm
de70ded4b3 Updating submodules
Summary:
GitHub commits:

8f50aff1d0

Reviewed By: yns88

fbshipit-source-id: 8e869dc50ebdcf1c243ef5608683ea8949054745
2021-03-08 11:28:40 -08:00
svcscm
692d2522af Updating submodules
Summary:
GitHub commits:

9a5fc814b3
0e3a56d886
25d16203c8

Reviewed By: yns88

fbshipit-source-id: 2b77f4c7fb44f025826f922763c6d4f64731ebe2
2021-03-08 10:26:47 -08:00
Stanislau Hlebik
cc0c8cd0ff mononoke: allow changing xrepo mapping extra for if config is set
Summary:
Normally we prohibit landing commits that might accidentally
change the x-repo mapping. However we do want to allow landing commits like
that to backup repos, because backup repos should have all commits as their
counterpart repositories.

This change also has another side-effect - we don't call `load_additional_changeset()`
which can be very expensive for backup repos because of the issues in configuration -
in particular, we don't have `hooks_ancestors_of` option set, and that caused all ancestors to be considered
as "additional changesets". It would make since more properly later.

Differential Revision: D26883910

fbshipit-source-id: 07ceb7b96bc6cae851ac6ff57071eff5cef387e4
2021-03-08 08:39:30 -08:00
Stefan Filip
f172c2f8ae mononokepeer: wrap read exceptions with NetworkError
Summary:
This allows for errors raised in these cases to be retried. Most notable is
the timeout error.

Reviewed By: johansglock

Differential Revision: D26855441

fbshipit-source-id: 6137ed1755072d43dbdd25fa092ddb21c8669aa3
2021-03-08 08:06:01 -08:00
Stefan Filip
573c25553a mononokepeer: add timeout to socket
Summary:
No timeout is set up by default so the process wait forever when reading bytes
in cases where the connection is lost somehow.

Reviewed By: johansglock

Differential Revision: D26855443

fbshipit-source-id: d741f73e7186fe862f3d78a806f3219c2cbe7e0a
2021-03-08 08:06:00 -08:00
Stefan Filip
882c8c70a7 mononokepeer: prefer NetworkError over Abort
Summary:
Abort one of the most general exceptions in Mercurial. In theory it should be
something that isn't handled. We can say at least that it shouldn't be retried.
For thing that may be transient it is better to use a different type of
exception. NetworkError is something is checked and retries in a few places so
that seems like a natural candidate.

Reviewed By: johansglock

Differential Revision: D26855444

fbshipit-source-id: f15c723293a416b5f44a6592927e3500f3b0b7d5
2021-03-08 08:06:00 -08:00
Stefan Filip
51367f0312 error: generalize NetworkError to all network read errors
Summary: Timeouts are another class of errors that are relevant.

Reviewed By: johansglock

Differential Revision: D26855442

fbshipit-source-id: 8ebb83714fa3d7a2f4efcbed8bd512c98301b49d
2021-03-08 08:06:00 -08:00
svcscm
dc63c9b353 Updating submodules
Summary:
GitHub commits:

122ce9f76b
692604cf54

Reviewed By: wittgenst

fbshipit-source-id: b69a42a55292def4688297e36c4ebbb43f6425d7
2021-03-08 08:06:00 -08:00
svcscm
28ac90930c Updating submodules
Summary:
GitHub commits:

32d058416b

Reviewed By: wittgenst

fbshipit-source-id: 862dd8d80cab08a8d2f604397cd8d0aa5d373a33
2021-03-08 07:13:32 -08:00
Stanislau Hlebik
b5de3e4e21 mononoke: limit the number of hg blobs
Summary:
We ran into an issue while uploading too many blobs at once to darkstorm repo.
We were able to workaround this issue by spawning less blobstore writes at
once.

It's still a bit unclear why this issue happens exactly, but I'd like to make
the number of concurrent uploaded blobs configurable so that we can tweak it if
necessary.

Differential Revision: D26883061

fbshipit-source-id: 57c0d6fc51548b3c7404ebd55b5e07deba9e0601
2021-03-08 05:46:45 -08:00
svcscm
2fe094598f Updating submodules
Summary:
GitHub commits:

c2f26b08e3

Reviewed By: wittgenst

fbshipit-source-id: 14546e83cacd362c5174f6b57b3e6779aaaf46b0
2021-03-08 05:46:45 -08:00
svcscm
6a9e2dfa23 Updating submodules
Summary:
GitHub commits:

89a3d4a781

Reviewed By: wittgenst

fbshipit-source-id: cc5ee1f690e85b6445164f522fcc1bb2a953d98d
2021-03-07 12:50:36 -08:00
svcscm
e06082f58f Updating submodules
Summary:
GitHub commits:

688c8aaafa
210435e325

Reviewed By: wittgenst

fbshipit-source-id: baa7cdc2b5e3b362b469d7adbc74de26ce8af6f2
2021-03-06 12:51:06 -08:00
Stanislau Hlebik
c69b547672 mononoke: set bonsai changeset timezone when importing git commit
Summary:
I ran into an interesting issue - git and Mononoke/mercurial store timezones
differently.

Git - From https://fburl.com/utwmsmcu:
```
Git internal format
It is <unix timestamp> <time zone offset>, where <unix timestamp> is the number of seconds since the UNIX epoch. <time zone offset> is a positive or negative offset from UTC. **For example CET (which is 1 hour ahead of UTC) is +0100.**
```

Note that CET (which is to the east of utc) is stored as +0100.

Hg - now from `hg help dates`
```
This is the internal representation format for dates. The first number is
the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
is the offset of the local timezone, in seconds **west of UTC (negative if the timezone is east of UTC)**.
```

that means that CET will be stored as -0100 i.e. with negative sign.

Mononoke - see https://fburl.com/diffusion/zf59f76j
We use FixedOffset::west_opt, and from docs (https://docs.rs/chrono/0.4.19/chrono/offset/struct.FixedOffset.html#method.west_opt)
```
Makes a new FixedOffset for the Western Hemisphere with given timezone difference. The negative secs means the Eastern Hemisphere.
Returns None on the out-of-bound secs.
```

So in order for mercurial and git to actually mean the same timezone, we need to multiply it by -1.
(note that hggit seem to be doing the same thing - https://fburl.com/code/pgdj5f2s).

You might wonder why mercurial's "hg log" now outputs the same timezone value as git - it converts it before outputting (https://fburl.com/code/ltmc66a1).

Reviewed By: krallin

Differential Revision: D26848463

fbshipit-source-id: fbd8c370565f5b663b438d0c11bddf39d090a16b
2021-03-06 08:02:50 -08:00
svcscm
95def852df Updating submodules
Summary:
GitHub commits:

6b75fe458a

Reviewed By: wittgenst

fbshipit-source-id: fcdbd896d8a2adf3f2337d9a522aa46533163314
2021-03-06 08:02:50 -08:00
svcscm
8caae7ec6d Updating submodules
Summary:
GitHub commits:

a426c36d12

Reviewed By: wittgenst

fbshipit-source-id: 23d5b8663e2e2f85e69b1967babfde8e9cc5ee7f
2021-03-05 23:38:26 -08:00
Andrey Chursin
a43f073d9d checkout: use async_vfs in native checkout
Summary: The goal is to reduce load on tokio scheduler by using threads & channels instead of spawning new task every time

Reviewed By: DurhamG

Differential Revision: D26801249

fbshipit-source-id: a8d9accc721c7ffc981fd538c06ab8cbd908f715
2021-03-05 21:47:51 -08:00
Andrey Chursin
0be8e8ce29 vfs: introduce AsyncVfs
Summary:
AsyncVfs provides async vfs interface.
It will be used in the native checkout instead of current use case that spawns blocking tokio tasks for VFS action

Reviewed By: quark-zju

Differential Revision: D26801250

fbshipit-source-id: bb26c4fc8acac82f4b55bb3f2f3964a6d0b64014
2021-03-05 21:47:51 -08:00
Andrey Chursin
6c7b0134a3 vfs: make clear_conflicts private
Summary: This function is now internal details of vfs, and is not used outside of it. Making it private so it won't be accessed outside

Reviewed By: quark-zju

Differential Revision: D26801251

fbshipit-source-id: 03434e235978fa0745128d90ea0c5975ea662ff1
2021-03-05 21:47:50 -08:00
svcscm
e64b0238ad Updating submodules
Summary:
GitHub commits:

0a54c60498
33ce50d92b
18cbcf203f
a3a0072c95
60a081ee51

Reviewed By: wittgenst

fbshipit-source-id: 9ffb2daa7a4bc6ae8efb295ea3c63458df541e28
2021-03-05 21:47:50 -08:00
svcscm
f51722bfec Updating submodules
Summary:
GitHub commits:

607e1b4956

Reviewed By: wittgenst

fbshipit-source-id: a466c7b14398e066351bcc48c12b4a6c777411a9
2021-03-05 17:53:12 -08:00
Xavier Deguillard
f320f5718e config: silence prefetch-profiles config warning
Summary:
On EdenFS startup, it would always print the following warning:

  W0304 16:32:36.103828 642480 EdenConfig.cpp:424] Ignoring unknown section in eden config: /etc/eden/edenfs.rc, key: prefetch-profiles

This is due to that particular config not being specified in EdenConfig.h. By
adding it to EdenConfig.h, the warning disappear.

Reviewed By: genevievehelsel

Differential Revision: D26834504

fbshipit-source-id: 409de118f015226f839cce3ff79a4a2d5b9b43a3
2021-03-05 16:44:48 -08:00
svcscm
22f7e0c99f Updating submodules
Summary:
GitHub commits:

1f61ce11e6
ab71243f2e
999be74def
0086370e93

Reviewed By: wittgenst

fbshipit-source-id: c2234b9c1cc9194ab00e1f72e676c469d8a4f36c
2021-03-05 16:44:47 -08:00
svcscm
f6e2b2c6aa Updating submodules
Summary:
GitHub commits:

b9a69885d6
b1ab506cc3
a29653ca47
e286eecc73

Reviewed By: wittgenst

fbshipit-source-id: 99cac6106577c016a03ef8383c19c8e15b8ab55f
2021-03-05 14:18:01 -08:00
generatedunixname89002005307016
dc4229e10b Add annotations to eden/integration/hg/lib/histedit_command.py
Reviewed By: xavierd

Differential Revision: D26848360

fbshipit-source-id: fb9ee483e1718f6541766caa60482b093ef983dc
2021-03-05 12:44:35 -08:00
Chad Austin
d45c096063 fast track POSIX ACL xattrs too
Summary:
Fast-track some tricky-to-avoid getxattr requests from the kernel
itself. It would be best to avoid the context switch entirely, but in
lieu of that, at least don't log anything or enter our more expensive
FUSE handling path.

This is follow-up to D24039130 (37f030ba72), which apparently did not completely
eliminate POSIX ACL lookups.

Reviewed By: xavierd

Differential Revision: D26803589

fbshipit-source-id: 18cba8e3ffc45516e6458872e408ed29a562c7a8
2021-03-05 12:29:50 -08:00
svcscm
c925ee0bbf Updating submodules
Summary:
GitHub commits:

1ba9efad7d
3386b91577
b8d425116c
2c635bf125

Reviewed By: wittgenst

fbshipit-source-id: 58b66672554994fb1794ade9fccd386b9162fdf8
2021-03-05 12:29:50 -08:00
svcscm
c92e15ce28 Updating submodules
Summary:
GitHub commits:

33b99b7749
9f066bb6ce

Reviewed By: wittgenst

fbshipit-source-id: 8a9a1cd0ff265d7e51a90c1c032bb43ee53cd180
2021-03-05 11:37:30 -08:00
Xavier Deguillard
94a46d9c0e inodes: make InodeBase::setattr independant from FUSE
Summary:
Taking a fuse_setattr_in arg means that it can only be used on FUSE, and while
FUSE has been the only backend on UNIX for a while, this is changing with NFS
being added. Thus, we need to find a solution that isn't tied to FUSE.

The solution is fairly simple, let's simply have a struct with optional fields
that needs changing, FUSE and NFS will set these to what needs changing.

Reviewed By: chadaustin

Differential Revision: D26742213

fbshipit-source-id: 16e3e8cdd22d88ace43485d9e3744280de1ee8ad
2021-03-05 11:11:19 -08:00
Xavier Deguillard
8c9839ffcf inodes: return a struct stat from InodeBase::setattr
Summary:
As its name implies FuseDispatcher::Attr is purely FUSE related and thus
shouldn't affect the inodes. It also removes a blocker to using setattr for
NFS.

Reviewed By: chadaustin

Differential Revision: D26742214

fbshipit-source-id: 41a67af0c948d969d5a427f24718de5b134980da
2021-03-05 11:11:18 -08:00
Xavier Deguillard
8a270adec1 nfs: add SYMLINK RPC types
Summary:
This merely adds the types needed for the SYMLINK RPC, the implementation will
follow.

Reviewed By: kmancini

Differential Revision: D26737273

fbshipit-source-id: 4ed3029304fe64892e88bc05a64b4b3b19fd5460
2021-03-05 11:11:18 -08:00
Xavier Deguillard
a579ab83cb nfs: add types for READDIRPLUS
Summary: This is merely adding the type, the implementation will follow.

Reviewed By: kmancini

Differential Revision: D26737271

fbshipit-source-id: 42de7873b271a2bf9499f1274bca50f23dc1016b
2021-03-05 11:11:18 -08:00
Xavier Deguillard
dd831ca0e6 nfs: add XdrList
Summary:
Both READDIR and READDIRPLUS RPC (and other) are using lists as a way to have
an unsized array of values. From a behavior perspective, this is similar to an
array of XdrOptionalValue but without it being prefixed by a size, and with an
additional last element being empty.

To simplify writing these RPC, let's add this XdrList type.

Reviewed By: kmancini

Differential Revision: D26729816

fbshipit-source-id: 8d14bbc6f0513aac51d65625e5751cedc2071a0b
2021-03-05 11:11:18 -08:00
svcscm
a1ddc817b0 Updating submodules
Summary:
GitHub commits:

48506cf5ec

Reviewed By: wittgenst

fbshipit-source-id: cd93ad1c202a751dfcebb34cdcb901d103ab7b50
2021-03-05 10:41:27 -08:00
Mark Juggurnauth-Thomas
36d66e8779 test-scs-list-bookmarks: wait for warm bookmark cache to update
Summary:
The recent change to make list-bookmarks be served from the warm bookmark cache
made this test flaky.

Ensure the warm bookmark cache has been populated with all of the bookmarks
before starting the tests.

Reviewed By: StanislavGlebik

Differential Revision: D26847951

fbshipit-source-id: 7e26c3745600fa8c1a337e8a8b47af6cca2f3eff
2021-03-05 09:28:46 -08:00
svcscm
107f223985 Updating submodules
Summary:
GitHub commits:

21055c2318
175d80d958
8e81e8c723
679e10cba0
355508a4c2
88e823ec20

Reviewed By: wittgenst

fbshipit-source-id: 6ad1af498f796f7d24866683e6a61f3621584a86
2021-03-05 09:17:32 -08:00
Stanislau Hlebik
1d7ad86d52 mononoke: switch the order of inserts of bonsai_hg_mapping and changesets
Summary:
Turned out that some of our commit cloud commits dont have an entry in changesets table,
but they do have an entry in bonsai_hg_mapping. It happens because of transient mysql errors.
Because of the mess we have in how we determine if a given hg changeset is present in mononoke or not,
this broken commit is considered backed up by commit cloud, while in reality its impossible to pull this commit.

This diff fixes it by first inserting changeset entry, and then bonsai_hg_mapping.
This way if an insertion of a changeset entry fails then the commit is not
considered to exist at all.
If an insertion of bonsai hg mapping fails, then commit is considered to be inserted but the whole
operation (it can be "hg cloud sync" for example) is considered failed. In this case hg client will
try to reupload this commit later.

But there's one caveat.
Hg changesets and bonsai changesets are not always round-trippable i.e.
generating from bonsai to hg and hg to bonsai might not always
produce the same results. So it's possible to push a commit which inserts changeset entry but not hg bonsai entry,
then we accidentally derive hg changeset from this bonsai and it's different from what user has pushed to mononoke.
This could lead to problems later (i.e. re-pushing the same commit again later would fail).

Another solution (inserting bonsai hg mapping and changeset entry in the same transaction) could make this issue
less likely, but it won't eliminate it completely. We discussed it, and I think it probably make sense to go
with the simpler fix first, since this problem should happen rarely in practice
(and if it happens often then we should prioritize fixing it).

Reviewed By: krallin

Differential Revision: D26845779

fbshipit-source-id: 61f8b0d835dc4aa0130e6be632c43307ff4a771f
2021-03-05 08:02:38 -08:00
Thomas Orozco
7e8332c9a5 mononoke: actually disable control api when !enable_http_control_api
Summary: Like it says in the title. I also replaced one of our status codes that was wrong.

Reviewed By: johansglock

Differential Revision: D26844865

fbshipit-source-id: b8c1261d0077cf5dc006827e16667e382db7d189
2021-03-05 05:26:57 -08:00
Lukas Piatkowski
ad106958f2 eden/scm/lib: autogenerate all Cargo.toml files with autocargo
Summary: This diff removes the split between manually managed and autocargo managed Cargo.toml files in `eden/scm/lib`, now all files are autogenerated.

Reviewed By: quark-zju

Differential Revision: D26830884

fbshipit-source-id: 3a5d8409a61347c7650cc7d8192fa426c03733dc
2021-03-05 04:29:49 -08:00
generatedunixname89002005325677
ef0e758bd4 Daily arc lint --take RUSTFMT
Reviewed By: farnz

Differential Revision: D26841465

fbshipit-source-id: 37d21b771bfc80b00915997754a3130b01bc3857
2021-03-05 04:07:28 -08:00