Commit Graph

13 Commits

Author SHA1 Message Date
Xavier Deguillard
63e18be4d6 treemanifest: use Rust repack for server treemanifest repack
Summary:
We were still using the Python based repack, let's switch to the Rust one. As
far as I can tell, this code is unused, so the test change should be safe to
do.

Reviewed By: quark-zju

Differential Revision: D17207643

fbshipit-source-id: 89d0ba85327077dfc4e26c55ade3284beeb44b50
2019-09-10 11:36:00 -07:00
Mark Thomas
d21fc6233a treemanifest: don't purge shared packs while repack is running
Summary:
If treemanifest finds there are too many shared packs (more than
`packs.maxpackfilecount`) then it will purge them.  This is a shame if there is
currently a repack in progress, as it will purge the packfiles from underneath
the repack, deleting lots of cache data that will be imminently repacked).

Skip the purge if there is a repack ongoing.

Reviewed By: mitrandir77

Differential Revision: D17155854

fbshipit-source-id: 20d46f29c252e508177b1fde08ca7a69841dcd7e
2019-09-06 00:40:52 -07:00
Xavier Deguillard
3f21c278d4 remotefilelog: Rust repack is the default
Summary:
This option has been on for several months now, let's enable it by default in
the tests too. Since the behavior is slightly different, the tests had to be
adjusted:
  - The packfile hashes are different due to a different repack algorithm,
  - test-fb-hgext-remotefilelog-gcrepack.t removed due to gc not being a thing
    with the Rust repack,
  - test-fb-hgext-remotefilelog-repack-corrupt.t corrupt packs aren't detected
    and removed at repack time, but later,
  - test-fb-hgext-remotefilelog-repack.t we no longer re-delta context in the
    Rust repack

Reviewed By: quark-zju

Differential Revision: D16774858

fbshipit-source-id: 7b7a3d96598c1ded0f64237047c3d97510050e4a
2019-08-13 10:50:02 -07:00
Xavier Deguillard
1b69ae4751 tests: remove use of remotefilelog.{use,}fastdatapack
Summary: These 2 options simply do not exist anymore.

Reviewed By: kulshrax

Differential Revision: D15993203

fbshipit-source-id: e845c060b5c96a78659556488da620a92f63e121
2019-06-26 11:10:55 -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
Durham Goode
2dfd48c8de treemanifest: default to treeonly
Summary:
Now that all our repos are treeonly, let's default the extension to
using treeonly. This opens the doors for moving all the tests to operating on
treeonly repos in a future diff.

Reviewed By: quark-zju

Differential Revision: D15030251

fbshipit-source-id: cd289775174bbacd6a6cdc7a5b07fe7e41238584
2019-05-24 10:00:49 -07:00
Xavier Deguillard
f09d3b816c treemanifest: fix repack and backfilltree
Summary: These 2 commands were broken when treemanifest.treeonly=True was set

Reviewed By: DurhamG

Differential Revision: D14316779

fbshipit-source-id: e626df41c92036fa3bd61c072f09b0d6c99c6f9f
2019-03-05 11:40:46 -08:00
Xavier Deguillard
25f6272a15 test-fb-hgext-treemanifest-repack.t: use packsonly when purging packs
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
2019-02-12 11:21:34 -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
b10c8ada95 remotefilelog: add incremental repack for local data
Summary:
The incremental repack implementation omits repacking local data - it was
recently added for full repack, but not incremental repack.  Add it to
incremental repack.

We also don't run `_deletebigpacks` for non-shared data, as that data is
only stored locally.

Reviewed By: DurhamG

Differential Revision: D10525957

fbshipit-source-id: 012d7e8d455ac607773fc7013dcc4df0881665e8
2018-10-26 01:16:13 -07:00
Durham Goode
5849411988 fastmanifest: switch to using manifestlog.ui where possible
Summary:
Previously, the fastmanifest factory class kept a copy of the initial ui object
from uisetup(). This meant it executed all things using the configuration of the
first repository. In a command that opens many repositories, like hg pull or hg
gc, this caused it to use the wrong configuration.

To fix this, let's switch as much of the fastmanifest factory to use
manifestlog.ui (which is the repo specific ui) instead of self.ui. We can't get
rid of self.ui just yet, since it's still required for the revlog.add()
override, but this fixes the hg gc breakage. We should fix the revlog.add case
later too.

Reviewed By: quark-zju

Differential Revision: D8840003

fbshipit-source-id: 037dcf98422826a0223a9941c2a5931b7408b2a5
2018-07-15 10:03:33 -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
0fbed23c0d treemanifest: move treemanifest tests to tests/
Summary:
Now that fastmanifest and treemanifest are moved, we can moved the
tests.

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

Reviewers: singhsrb, #mercurial

Reviewed By: singhsrb

Subscribers: singhsrb

Differential Revision: https://phabricator.intern.facebook.com/D6685334

Signature: 6685334:1515526455:57791d7f9d2a3f2a6119c0e79a81b31e63a11c60
2018-01-09 12:59:00 -08:00