Commit Graph

20 Commits

Author SHA1 Message Date
Xavier Deguillard
a6c6909237 remotefilelog: honor --quiet for background repack
Summary:
We would always print that a background repack is started, regardless of
whether --quiet was being passed in.

Reviewed By: quark-zju

Differential Revision: D17677229

fbshipit-source-id: 4e7d2fa355f11fdeea0e4cb59f78bc8f0c56b242
2019-10-01 14:34:03 -07:00
Jun Wu
b178492317 changelog: disable inline revlog
Summary:
The inline revlog format merges `.i` and `.d` into one `.i` file. It was intended to reduce the
number of files for filelogs. For the changelog one extra file does not hurt.

This makes it easier to write native code parsing the changelog revlog index.

Reviewed By: xavierd

Differential Revision: D17125922

fbshipit-source-id: f48ffe0d2df71abec007a80e05b684dcbac71883
2019-08-30 14:58:02 -07:00
Durham Goode
ad813edcbd treemanifest: enable treemanifest by default in tests
Summary:
Now that all our repos are treemanifest, let's enable the extension by
default in tests. Once we're certain no one needs it in production we'll also
make it the default in core Mercurial.

This diff includes a minor fix in treemanifest to be aware of always-enabled
extensions. It won't matter until we actually add treemanifest to the list of
default enabled extensions, but I caught this while testing things.

Reviewed By: ikostia

Differential Revision: D15030253

fbshipit-source-id: d8361f915928b6ad90665e6ed330c1df5c8d8d86
2019-05-28 03:17:02 -07:00
Mark Thomas
66d79c86c8 pull: remove postincoming advice
Summary:
The postincoming checks prints out advice of the following forms:

* `(run 'hg heads' to see heads)`
* `(run 'hg heads' to see heads, 'hg merge' to merge)`
* `(run 'hg heads .' to see heads, 'hg merge' to merge)`
* `(run 'hg update' to get a working copy)`

This advice is no longer useful, so remove it.

Reviewed By: DurhamG, farnz

Differential Revision: D15317185

fbshipit-source-id: 50ba576406c96715fa058399da53462be9b7a3bf
2019-05-20 06:19:49 -07:00
Mateusz Kwapich
8c79ef09d4 tests: fix flaky test_fb_hgext_remotefilelog_bgprefetch_t
Differential Revision: D15080925

fbshipit-source-id: 26b648c0ac4809019bdf1b8d6b50b9284884c9f8
2019-04-25 11:22:15 -07:00
Aida Getoeva
6f4459dd42 don't skip metadata while creating data wirepacks
Summary:
Currently we skip metadata when constructing data wirepacks.
We need copy metadata in the data packflies, because the client expects the base text to contain copy metadata since the delta base on the server also contains copy metadata.

It is also needed for future file nodes validation.

Differential Revision: D14851678

fbshipit-source-id: 1a3f79dc2565cdb864bee2400d331ae3a7c3751b
2019-04-09 10:37:01 -07:00
Aida Getoeva
b8454aac03 test missing copy-from info in datapacks fetched from the server
Summary: Added new test to show that applying changes on the renamed file fails because of missing copy-from data in the datapacks.

Reviewed By: StanislavGlebik

Differential Revision: D14851679

fbshipit-source-id: 41fa2008bdfe0a74c97a0a24af58bf6abf4ebd80
2019-04-09 10:37:01 -07:00
Jun Wu
077313f1af dispatch: move deferred to atexit handler
Summary:
See D14606986 for context. `repo.close` should be protected by not crashing on
stdout or stderr write errors (SIGPIPE or EPIPE). Move `deferred` to `atexit`
handler to get the protection.

Test changes are caused by ordering changes.

Differential Revision: D14607407

fbshipit-source-id: 5a42aefcec395f48b8ecb67426429ef2e41f5666
2019-03-25 18:33:05 -07:00
Mark Thomas
9a19e06fee strip: move extension to core and rename to debugstrip
Summary:
Move the strip extension to core.  Rename the command to `hg debugstrip` as it
is not intended for use by users.  Users should use `hg hide` instead.

Reviewed By: quark-zju

Differential Revision: D14185822

fbshipit-source-id: ef096488cb94b72a7bb79f5bf153c064e0555b34
2019-02-25 03:55:08 -08:00
Durham Goode
8d31ac8424 simplecache: add checksum to simplecache values
Summary:
We're encountering an issue that I think is caused by invalid data
coming back from memcache, possibly due to our recently introduced connection
reusing. Let's add some checksums to verify that the data we put in is identical
to the data we get out for a given key.

Reviewed By: kulshrax

Differential Revision: D14141683

fbshipit-source-id: 206b51b862db7d54def02f5310b90f473d5a0d03
2019-02-20 13:56:33 -08:00
Saurabh Singh
b02696d961 remotefilelog: fix the test broken by defaulting file blobs to version 1
Summary: This test was broken by D13980892 and needs to be updated.

Reviewed By: DurhamG

Differential Revision: D14001840

fbshipit-source-id: 6487159445f8aa049996a35e1bb70dad5af614ac
2019-02-08 10:52:16 -08:00
Liubov Dmitrieva
3cc2093659 fix tests
Summary: Size is not always the same, let just use number of files.

Reviewed By: rlangst

Differential Revision: D14004261

fbshipit-source-id: 13e21d8fd95ee09fc54c750ceecc48bcd484bc9e
2019-02-08 08:30:11 -08:00
Liubov Dmitrieva
da5a666d2f use simplecache store on the server side to store remotefilelog cache
Summary:
simplecache can be configured with memcache backend

this will potentially save us a lot of disk space and allow us to have a shared cache between hg hosts.

getting rid of the caches on disks will save 966GB of disk space per machine.
P60876105

Reviewed By: quark-zju

Differential Revision: D13950137

fbshipit-source-id: 015e971f1bfed334edb4fe2381c2c6336b84b161
2019-02-07 05:15:11 -08:00
Aida Getoeva
996ac6da37 prefetch: add requestpacks
Summary: Implemented logic for fetching data from the scmmemcache and the server in pack files format. By default `prefetch` will still use loose files, unless the `remotefilelog.fetchpacks` config flag will be set to true.

Differential Revision: D13905733

fbshipit-source-id: cc559f5bc600067199a91efe6cf44b1bde6bf69b
2019-02-06 10:43:15 -08:00
Jun Wu
4b5df986f1 remotefilelog: use latest supported version for mutabledatapack
Summary:
This fixes LFS compatibility with packlocaldata.

Also drop the config as the default version is 1 now.

Reviewed By: DurhamG

Differential Revision: D13469486

fbshipit-source-id: 1dc4a1051667419d7aab97bf95f93cacd166468a
2018-12-15 16:27:04 -08:00
Mark Thomas
e05bddd309 connectionpool: test connectionpool expiry more thoroughly
Summary:
Test that the connections are not reused in both cases that it expired while
active and expired while waiting to be reused.

Reviewed By: mitrandir77

Differential Revision: D8394988

fbshipit-source-id: d52538c24c728bc885b8aba227f1c811c69feb08
2018-06-14 02:42:39 -07:00
Mark Thomas
abdd30febd connectionpool: add configurable reuse lifetime for connections
Summary:
Re-using long-running connections can cause problems, as the `hg serve` process
on the server may be using large amounts of resources.  Add a new configuration
option `connectionpool.lifetime`.  Connections that are older than that time
will be closed and not re-used.

Reviewed By: DurhamG

Differential Revision: D8204415

fbshipit-source-id: ac937778e3dc79e77e367017db2141066bd17263
2018-06-05 04:36:06 -07:00
Jun Wu
f5924da1d3 tests: improve test compatibility with different zlib
Summary:
When running with a Python runtime with a slightly different zlib module,
some `zlib.compress` outputs are different. Some tests are testing the
length, or the content of `zlib.compress` output, directly or indirectly.
That's causing issues.

This patch adds a `common-zlib` hghave test so it can be used to gate tests
checking zlib output. Some lengths are also changed to glob patterns to be
compatible.

Reviewed By: ryanmce

Differential Revision: D6937735

fbshipit-source-id: 2328a39d7f2022f16d51f61b6178568b26dfe2fb
2018-04-13 21:51:09 -07:00
Jun Wu
1cde63d99c codemod: drop hacks changing PYTHONPATH in tests
Summary:
Now they are unnecessary since `run-tests.py` will set up `PYTONPATH`
correctly.

Differential Revision: D6865042

fbshipit-source-id: ca95314f725968e14349a9d916434aa832c596f9
2018-04-13 21:51:00 -07:00
Durham Goode
fe980ff373 remotefilelog: move to hgext/
Summary:
Moves the remotefilelog extension into hgext/ and it's tests into
tests/.

I did not fix up all the check-module errors, since it's a ton of work for
very little impact at this point.

Test Plan: make local && ./run-tests.py

Reviewers: #mercurial

Differential Revision: https://phabricator.intern.facebook.com/D6680030
2018-01-08 18:58:08 -08:00