Summary:
The test uses named branches heavily. It seems the test just wants to make
sure remotenames work with the schemes extension. Rewrite it to stop using
named branches.
Reviewed By: singhsrb
Differential Revision: D13978570
fbshipit-source-id: 3d0f284bb2398da0283b3bf5a06d879182a70d84
Summary:
Purging of packs may happen before the repack operation, and when loosefiles
are also present, repack will reconstruct the packs from them. By forcing a
packsonly, we won't have a chance of reconstructing the purged ones.
Differential Revision: D14013788
fbshipit-source-id: d77d9ec2b9c5a086caaf9164a8ac56dd7d1e1255
Summary:
The refresh function is intended to load on-disk packfiles that aren't yet
present in the cache, but it had several issues that resulted in unexpected
behavior. Mainly, the new files would be added in the wrong order in the cache,
and runonpacks would not update the last used packs.
Differential Revision: D14013785
fbshipit-source-id: da4151b859441f0ba51863f3907852922c255f82
Summary:
Previously, the logic for chosing between the rust repack, and the python one
was deeply integrated with the python repack. This resulted in work being
performed unnecessarily.
The drawbacks of this method is that in the case of fallback to Python, the
repacklock will be dropped and re-obtained, as well as the prerepack hook will
be ran twice. Since the python code will soon be entirely replaced this is
probably not important.
Differential Revision: D14013790
fbshipit-source-id: 7c754db3fb984cc9e6b7df1a4e32b72fa4a1531b
Summary: Most of the code is identical between these 2 functions, so let's merge them.
Differential Revision: D14013787
fbshipit-source-id: f0469e05fcf723db02d9f4c28097e61f958284a5
Summary:
Repacking one packfile will yield the same packfile, so we can save some IO by
not trying to repack.
Differential Revision: D14013789
fbshipit-source-id: 8069840cc7cb1837eb94cea97e50b3bbaa548873
Summary:
This should auto recover from a state where watchman returns too many files,
which makes "hg status" slow.
The default config value 200 is not chosen very scientifically, but it should
cover the 6s status case where there are 90k changed files reported.
Differential Revision: D14036494
fbshipit-source-id: 368f53e99e2e54343a6ac9145cbb86e4ac65e4ac
Summary:
akushner encountered a case where "hg status" takes 5+ seconds and cannot
self-recover. That is because watchman constantly returns huge number of files
and fsmonitor didn't choose to update the clock to address that.
Reviewed By: DurhamG
Differential Revision: D14036493
fbshipit-source-id: 0bd8f7c9e3a51b6b4d2a1584b68883f8579e3f0f
Summary:
D13875656 made a config path change that breaks tests without using HGRCPATH,
or local build runs.
Reviewed By: DurhamG
Differential Revision: D14034919
fbshipit-source-id: 80de214f1769a8f40e79dc0ab1dbba4d55f506a7
Summary:
We've settled on the following grouping for imports:
- standard library
- 3rd party crates
- internal crates
- modules within same crate
This diff updates revisionstore accordingly.
Reviewed By: singhsrb
Differential Revision: D14030243
fbshipit-source-id: 74a7897342e39eb1d80202c8aae8c149bf08fc41
Summary: This is caused by D13516212, and not covered by tests.
Reviewed By: DurhamG, StanislavGlebik
Differential Revision: D14025817
fbshipit-source-id: 8a529085c40c5d2ae17ccf3de1ccea22c8d7dbd2
Summary: It is unavailable on OSX, but we have a custom implementation.
Reviewed By: DurhamG
Differential Revision: D14028103
fbshipit-source-id: 4b6916792fc9da43795b0f9db57ec2a057c92283
Summary: It turns out that `hyper-tls` does not support ALPN for negotiating HTTP/2 connections, and only supports HTTP/2 prior knowledge. (This is a limitation of the underlying TLS library, `native-tls`.) Unfortunately, while the Mononoke API server itself is fine with HTTP/2 prior knowledge for non-TLS connections, the Mononoke VIPs require TLS, and thus per the HTTP/2 spec require ALPN negotiation from an HTTP/1.1 initial connection. As a result, we need to revert back to using HTTP/1.1 for now in order to use TLS.
Reviewed By: singhsrb
Differential Revision: D14015335
fbshipit-source-id: b78197d4cfecf184479162c5b14ba54cbef66ee7
Summary:
To connect to the memcache client it used a path from a loose files data store (`remotefilelogcontentstore._path`), which is a path to the hg cache, but pack files store doesn't have the same field.
I replaced the path with cache path from shallowutil.
Reviewed By: singhsrb, liubov-dmitrieva
Differential Revision: D14020122
fbshipit-source-id: 29bc8a01fc42d43eddc6ae67cf4e41fc552e117c
Summary:
This back ports Yuya's patch from upstream:
changeset: 443029011990c75c533ec0454fd0f5c1060d4690
branch: stable
user: Yuya Nishihara <yuya@tcha.org>
date: Sun, 01 Jul 2018 06:36:53 -0800
encoding: alias cp65001 to utf-8 on Windows
As far as I can tell, cp65001 is the Windows name for UTF-8. I don't know
how different it is from the UTF-8, but Python 3 appears to have introduced
new codec for cp65001, so the alias is enabled only for Python 2.
https://bugs.python.org/issue13216
This patch is untested, but hopefully fixes the following issue.
https://bitbucket.org/tortoisehg/thg/issues/5127/
More context:
Windows 10 Build 17035 (November 2017) introduced a
"Use Unicode UTF-8 for worldwide language support" checkbox, which makes the
"A" flavored APIs use UTF-8 instead of some non-UTF-8 local encoding. With
that checkbox ticked, hg would crash in cmd.exe complaining
"LookupError: unknown encoding: cp65001"
{F150484107}
Reviewed By: phillco
Differential Revision: D14017361
fbshipit-source-id: a648b2a9bc341d796532c6fd2730c083402b3736
Summary:
Change system config entry point to only `/etc/mercurial/system.rc` (unix) and
`\ProgramData\Facebook\Mercurial\system.rc` (Windows) so they won't overlap
with a vanilla Mercurial installation.
Another goal of this change is to make it easier to drop the directory
`%include` feature. So detecting config changes (for example, edenfs wants to
make sure ignore rules are up-to-date) can be made cheaper by just stating
files without `listdir`.
Reviewed By: markbt
Differential Revision: D13875656
fbshipit-source-id: 314c0bf87ff086dec5b88e232edca0133356484e
Summary:
The super python builtin expects a type as an argument, while a string was
passed, this was causing trouble for some users.
Reviewed By: DurhamG
Differential Revision: D14012716
fbshipit-source-id: 6714eb20745428818721ec3df85588a7b4c7ebb7
Summary:
It would be massy if there are 2 chg servers running: one for fb hg, one for
upstream hg, and they share a same socket path.
Change socket path and the commandserver name so fb-hg chg can only talk to
fb-hg chg servers.
Reviewed By: markbt
Differential Revision: D13869319
fbshipit-source-id: f9d42af9bdfc542207f23c536b478fd5ef8d02a0
Summary:
The test is about treating the "default" remote branch specially.
Named branches are going away, therefore delete the test.
Reviewed By: ikostia
Differential Revision: D13976850
fbshipit-source-id: 0283e78c120efd0cf9c91811b823923780cdbfd9
Summary:
The test uses named branch. Since subrepo is also on the list to kill, just
remove the test now.
Differential Revision: D13954459
fbshipit-source-id: 29e8009376081d964441497796fda3490f2137e3
Summary:
The test was about the connection handling between remotefilelog and
fastannotate. It uses named branch to test certain code paths, which
is not trivial to migrate off.
We'll probably rework the protocol used here and maybe do something very
different regarding on linelog with Mononoke. Therefore just remove the
test for now.
Reviewed By: singhsrb
Differential Revision: D13934435
fbshipit-source-id: 9ba0b760ba17efd3ede6de7612e6532f3d13a4f8
Summary:
The test was relying on the ability to merge a "fast-forward" commit, it's no
longer possible without named branches. So the DAG was changed from two linear
commits to "Y"-ish 3 commits.
This makes the test future-proof.
Differential Revision: D13954460
fbshipit-source-id: 944747404843e985f06d18fe0618843dca64630f
Summary: This will be used by scmmemcache to send history data to memcache
Reviewed By: DurhamG
Differential Revision: D13975346
fbshipit-source-id: f41eaf9a4968072dd07efbcd9d539e6293c3fa4f
Summary:
We can now fetch history data stored in memcache and write it to a history
pack.
Reviewed By: DurhamG
Differential Revision: D13975308
fbshipit-source-id: 2196328ad60a55d1e2b39d88d939f434e496837a
Summary:
The initial get_data/set_data only sent the full-text to memcache, which is
just enough for non-LFS data. Let's use Serde to serialize/deserialize the data
that we send to memcache. This will make it simple to add checksuming, or more
metadata to it.
Reviewed By: DurhamG
Differential Revision: D13974714
fbshipit-source-id: 41a235e1d1e8128b14f00b668745f4f9a070a360
Summary:
Similarly to the get_data, we can now read a datapack and send the proper
deltas to memcache. This change is lacking in the same way the get_data is.
Reviewed By: DurhamG
Differential Revision: D13886026
fbshipit-source-id: a00475e89b7e75dbbe9afa9f9d293a686f969a3f
Summary:
The IterableStore trait allows iterating over all the keys of a DataStore.
Since this is applicable to a UnionStore, let's implement it there. We can now
use it in their async variants.
Regarding the async variants, the code effectively builds a Vec of Key, which
may use a lot of memory, a better alternative would be to use a Stream of Key.
This will be tackled later.
Reviewed By: DurhamG
Differential Revision: D13951905
fbshipit-source-id: 15944b18d7ffea08d191e5dc7e1b8e2b783f69d1
Summary: TP2 version for itertools was updated to 0.8.
Reviewed By: singhsrb
Differential Revision: D14008855
fbshipit-source-id: 081a43c5b02cd39c6a0a6b491bfa0767ddf0b7ed
Summary: This test was broken by D13980892 and needs to be updated.
Reviewed By: DurhamG
Differential Revision: D14001840
fbshipit-source-id: 6487159445f8aa049996a35e1bb70dad5af614ac
Summary: My earlier diff broke master, this is the fix.
Reviewed By: markbt
Differential Revision: D14005894
fbshipit-source-id: 6ce43913fb501791592512f2f12cd67ef27f0457
Summary:
Currently if default path and infinitepush both point to the remote path
from the repo, the activepath function returns 'infinitepush' rather than
'default' because of the logic I have fixed.
It makes your smartlog looks like.
```
o 037dddb5 62 minutes ago infinitepush/fbobjc/stable remote/fbobjc/stable
.
o 66e0e00c Today at 05:58 infinitepush/fbandroid/stable
remote/fbandroid/stable
.
@ 28c3b5b0 Today at 05:40 mlesyk D14003881 T27597699
. [fbar][prod_role] fix region detection part
.
o 407504d6 Today at 04:58 infinitepush/fbsource/stable
remote/fbsource/stable
```
When you pull it updates infinitepush/master, etc instead of remote/master,
etc.
This only happens if they both point to the same url.
This is not desirable for infinitepush.
I also introduced infinitepush-other that we will use for the secondary commit cloud backend.
It would have the same issue if it matches the url of the default path.
Reviewed By: markbt
Differential Revision: D14005639
fbshipit-source-id: f3ea8098e1c418e2efd43b5430bb4252f6ad6b2c
Summary: Size is not always the same, let just use number of files.
Reviewed By: rlangst
Differential Revision: D14004261
fbshipit-source-id: 13e21d8fd95ee09fc54c750ceecc48bcd484bc9e
Summary:
this fixes `hg-new-workdir` by matching the function signature
and propagating the arguments.
Reviewed By: singhsrb
Differential Revision: D13992348
fbshipit-source-id: 582025affe2e0511f239e82bc880b2fecea84ac7
Summary:
previously, unexpected output would cause the harness to
stack trace and not show the actual test failure.
This catches the error and treats it as a failed run, which causes
the test output to be displayed.
No more `ValueError: invalid literal for int() with base 10: '0\xe2\x90\x8a'`
Reviewed By: DurhamG
Differential Revision: D13995000
fbshipit-source-id: 5c1a9e8d6f8e81a924cdbf760fa75cdc0d33b74d
Summary:
Change the test to avoid creating branches so it could still work
once `hg branch` gets removed.
Differential Revision: D13954467
fbshipit-source-id: ec6ee3430cecd4ee4daa23b303f0a36be9198659
Summary:
Change the test to not create branches, so it could still work
once `hg branch` gets removed.
Differential Revision: D13954465
fbshipit-source-id: 10ff86b2a765cb8bd57d1589a4e3624d553b4d07
Summary:
The test relies on named branches. Since the "hg rollback" command will also be
removed in the future, just delete the test for now.
There are a couple of other tests relying on the "hg rollback" command, which
makes the "rollback" command itself harder to delete.
Differential Revision: D13954464
fbshipit-source-id: 6a56ca15de96258c79deb90114438b42d802d8b0
Summary:
logexchange was a subset of remotenames, added by:
changeset: 5a62910948d2d4bac5defe305d0ddb22f0fda549 D1547
user: Pulkit Goyal <7895pulkit@gmail.com>
date: Wed, 04 Oct 2017 10:32:02 -0800
summary: remotenames: move function to pull remotenames from the remoterepo to core
Since we use the full remotenames instead, remove logexchange and its test,
which depends on named branch.
Differential Revision: D13954458
fbshipit-source-id: d565c131100ef90f3cf69e9051643ac8e5846f0d