Commit Graph

9 Commits

Author SHA1 Message Date
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
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
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
Jun Wu
b40af5890c metrics: add metrics about fetching remote data
Summary: Log data about round-trip count, and object count for files, trees, and SSH calls.

Differential Revision: D14515776

fbshipit-source-id: cce416fd7dccdad3c73a9f1751a04ddac0d2c507
2019-03-20 22:49:18 -07:00
Jun Wu
9dc21f8d0b codemod: import from the edenscm package
Summary:
D13853115 adds `edenscm/` to `sys.path` and code still uses `import mercurial`.
That has nasty problems if both `import mercurial` and
`import edenscm.mercurial` are used, because Python would think `mercurial.foo`
and `edenscm.mercurial.foo` are different modules so code like
`try: ... except mercurial.error.Foo: ...`, or `isinstance(x, mercurial.foo.Bar)`
would fail to handle the `edenscm.mercurial` version. There are also some
module-level states (ex. `extensions._extensions`) that would cause trouble if
they have multiple versions in a single process.

Change imports to use the `edenscm` so ideally the `mercurial` is no longer
imported at all. Add checks in extensions.py to catch unexpected extensions
importing modules from the old (wrong) locations when running tests.

Reviewed By: phillco

Differential Revision: D13868981

fbshipit-source-id: f4e2513766957fd81d85407994f7521a08e4de48
2019-01-29 17:25:32 -08:00
Mark Thomas
78a14a1687 remotefilelog: don't process manifests when not necessary
Summary:
When building a bundle that will be used for a pull that can't use the linkrev
fastpath, we need to process the manifests of the commits for which we will
send files so that we can correctly set up their linkrevs.  Currently this is
sometimes happening for all commits, which can be very slow when pulling a
large number of commits.

First, make it clearer what `LocalFiles` and `LocalTrees` means, and make it
easier to test for trees being local.

Second, when processing manifests looking for files that will be included in
the bundle, don't process non-local trees if we are only interested in local
trees.

Third, correctly determine whether to send all, local, or no trees or files
depending on what combinations of treemanifest and remotefilelog the client and
server support, and what operation is taking place.

Finally, we aren't passing `b2caps` through to `changegroup.makestream` in the
changegroup part generator for bundle2 parts.  This means the above test for
whether the client supports treemanifest always failed.

With these combined changes, a pull of a specific public revision (so not
following the fastpath) where the client supports both remotefilelog and
treemanifest, will result in the server using `LocalFiles` and `LocalTrees`,
and therefore not processing the manifests of public commits looking for which
files to send.

Reviewed By: DurhamG, ikostia

Differential Revision: D8446137

fbshipit-source-id: 9a4247af75fe79c1962a29fcb8bf0181868699f4
2018-06-19 10:20:07 -07:00
Mark Thomas
5d1c8f581b add test for pulling public commits by revision
Summary:
Add a test for pulling public treeonly commits by their revision number.
Unlike a normal pull, this doesn't use the fastpath, and attempts to
recalculate some information.  It tries to calculate too much, and as a result
ends up diffing each flat manifest pair between the client head and the
requested revision.  For large numbers of commits, this is really slow.

Reviewed By: DurhamG

Differential Revision: D8446138

fbshipit-source-id: 5e2cbb7e710282b094d4fe93b1f7a37afaf7ab3d
2018-06-19 10:20:07 -07:00