Commit Graph

190 Commits

Author SHA1 Message Date
Boris Feld
38f9c73dbd configitems: adds a developer warning when accessing undeclared configuration
Now that all known options are declared, we setup a warning to make sure it will
stay this way.

We disable the warning in two tests checking other behavior with random options.
2017-10-16 17:41:27 +02:00
Pulkit Goyal
98c13e4c70 copies: add a config to limit the number of candidates to check in heuristics
The heuristics algorithm find possible candidates for move/copy and then check
whether they are actually a copy or move. In some cases, there can be lot of
candidates possible which can actually slow down the algorithm.

This patch introduces a config option
`experimental.copytrace.movecandidateslimit` using which one can limit the
candidates to check. The limit defaults to 100.

Thanks to Yuya for suggesting to skip copytracing for that file with a
warning.

Differential Revision: https://phab.mercurial-scm.org/D987
2017-10-10 02:25:03 +05:30
Boris Feld
ad5f3bc109 configitems: move rebase config into core
The shelve extensions import and call rebase content without loading the
extension. This is problematic as the config items rebase uses are not
declared and the default value are not set, etc...

The shelve extension should be using core utilities only and the necessary bit
should be moved from rebase into core. In the meantime, I'm taking a small
step to get config registration completed with minimal overhead. The rebase
extension is shipped with core so registering its config option within core is
not a big issue.

This is the last step needed before we can install a warning that enforces all
config to be registered.
2017-10-13 23:00:31 +02:00
Boris Feld
3796be0790 configitems: register the 'web.archivesubrepos' config 2017-10-16 18:16:29 +02:00
Boris Feld
6241e08062 configitems: register the 'experimental.effect-flags' config 2017-10-08 22:22:27 +02:00
Boris Feld
ed9a31a26e configitems: register the full 'merge-tools' config and sub-options
We register the merge-tools config section (which has an arbitrary base config
value) and the possible sub-attribute. The sub-attribute has to be registered
first or at the same time otherwise the '.*' item would shadow them.

Merge tools could include "." in their name so we can't constrain any more
than just ".*".
2017-10-08 20:37:13 +02:00
Paul Morelle
549788470a revlog-sparse-read: add a lower-threshold for read block size
The option experimental.sparse-read.min-block-size specifies the minimal size
of a deltachain span, under which it won't be split by _slicechunk.
2017-10-14 17:05:41 +02:00
Paul Morelle
d1288f1f44 revlog: introduce an experimental flag to slice chunks reads when too sparse
Delta chains can become quite sparse if there is a lot of unrelated data between
relevant pieces. Right now, revlog always reads all the necessary data for the
delta chain in one single read. This can lead to a lot of unrelated data to be
read (see issue5482 for more details).
One can use the `experimental.maxdeltachainspan` option with a large value
(or -1) to easily produce a very sparse delta chain.

This change introduces the ability to slice the chunks retrieval into  multiple
reads, skipping large sections of unrelated data. Preliminary testing shows
interesting results. For example the peak memory consumption to read a manifest
on a large repository is reduced from 600MB to 250MB (200MB without
maxdeltachainspan). However, the slicing itself and the multiple reads can have
an negative impact on performance. This is why the new feature is hidden behind
an experimental flag.

Future changesets will add various parameters to control the slicing heuristics.
We hope to experiment a wide variety of repositories during 4.4 and hopefully
turn the feature on by default in 4.5.
As a first try, the algorithm itself is prone to deep changes. However, we wish
to define APIs and have a baseline to work on.
2017-10-10 17:50:27 +02:00
Boris Feld
902027adea config: simplify aliasing commands.update.check
experimental.updatecheck was renamed into commands.update.check, use the
config system to provides the fallback on the old config name instead of
adding more code.

Differential Revision: https://phab.mercurial-scm.org/D1117
2017-10-16 18:58:16 +02:00
Ryan McElroy
cc72ebf3bc filemerge: introduce functions to halt merge flow
Depends on D931.

This patch introduces functions and a config option that will allow a user
to halt the merge if there are failures during a file merge. These functions
will be used in the next patch.

Differential Revision: https://phab.mercurial-scm.org/D932
2017-10-06 06:48:43 -07:00
Boris Feld
9d80c5624f configitems: register the 'hostsecurity.*:verifycertsfile' config 2017-10-14 00:30:14 +02:00
Boris Feld
2c9df67473 configitems: register the 'hostsecurity.*:fingerprints' config 2017-10-14 00:29:31 +02:00
Boris Feld
3411c59c2f configitems: register the 'hostsecurity.*:ciphers' config 2017-10-14 00:28:48 +02:00
Boris Feld
a087914d79 configitems: register the 'hostsecurity.*:minimumprotocol' config 2017-10-14 00:28:13 +02:00
Boris Feld
c8ced9d060 configitems: register the 'extdata' section 2017-10-13 23:23:48 +02:00
Boris Feld
967247e8ec configitems: fix registration of extensions config
The new 'itemregister' class should be used when loading the extension config.
This was and oversight when itemregister was introduced.
2017-10-13 23:33:31 +02:00
Boris Feld
4c94a47479 configitems: register the 'web.staticurl' config 2017-10-13 23:03:46 +02:00
Boris Feld
14093a3043 configitems: register the 'hgweb-paths' section 2017-10-12 00:44:45 +02:00
Boris Feld
eeada116f6 configitems: register the 'hostfingerprints' section 2017-10-12 00:20:41 +02:00
Boris Feld
a345bd5d76 configitems: register the 'hostsecurity.minimumprotocol' config 2017-10-12 00:19:12 +02:00
Boris Feld
cb6b7ec15b configitems: register the 'progress.format' config 2017-10-11 22:53:17 +02:00
Boris Feld
5068121d4c configitems: fixup default value of annotate config option
It turned out that configbool is used for most of them so the registered
default value was wrong.
2017-10-16 15:12:50 +02:00
Boris Feld
834dcb3800 configitems: fixup default value of diff config option
It turned out that configbool is used for most of them so the registered
default value was wrong.
2017-10-13 22:08:55 +02:00
Boris Feld
2253c06027 devel-warn: add 'warn-' to 'devel.empty-changegroup' config
Rename 'devel.empty-changegroup' to 'devel.warn-empty- changegroup' in order
to clarify it controls a warning message.

No alias is installed since the previous configuration option was not
documented.
2017-10-08 21:42:32 +02:00
Augie Fackler
2fea5f41d1 config: graduate experimental.updatecheck to commands.update.check
.. feature::

  New `commands.update.check` feature to adjust constraints on when
  `hg update` will allow updates with a dirty working copy.

also

.. bc::

    The `experimental.updatecheck` name for the new `commands.update.check`
    feature is now deprecated, and will be removed after this release.

Differential Revision: https://phab.mercurial-scm.org/D1070
2017-10-14 03:13:50 -04:00
Boris Feld
7fa654bef2 configitems: register the 'templates' section 2017-10-08 21:29:24 +02:00
Boris Feld
1dca7c7296 configitems: register the 'paths' config section 2017-10-11 05:01:55 +02:00
Boris Feld
2ea04ee5d5 configitems: register the 'pager.attend-.*' options 2017-10-11 02:26:09 +02:00
Boris Feld
9296910ea4 configitems: register the 'hooks' config section 2017-10-13 16:39:06 +02:00
Boris Feld
0748d57ee7 configitems: register the 'extensions' section 2017-10-10 10:48:47 +02:00
Boris Feld
90436ba7a8 configitems: register the 'defaults' section 2017-10-08 20:39:51 +02:00
Boris Feld
04cc694185 configitems: register the 'committemplate' section 2017-10-08 21:02:02 +02:00
Boris Feld
abe633ebaf configitems: register the 'color' section 2017-10-10 10:49:28 +02:00
Boris Feld
101b5cf034 configitems: register the 'alias' section 2017-10-08 20:26:25 +02:00
Boris Feld
f9a854f7cf configitems: allow for the registration of "generic" config item
Some section can contains arbitrary keys (eg: color, alias, extensions). We
add a way to register some generic config items for them. This is necessary to
get all the config registered. We use a regular expression because some sub-
attributes (eg: hooks.xxx.priority) can define default value on their own.
2017-10-10 10:49:15 +02:00
Yuya Nishihara
607219189c configitems: correct default values of web.allow<archtype> and web.hidden
The default of ui.configbool() is False unless explicitly specified.
2017-10-13 00:14:28 +09:00
Boris Feld
9ab1fae2b8 configitems: register the annotate diff options 2017-10-11 05:23:45 +02:00
Boris Feld
cfd170bf5c configitems: register the 'ui.interface.chunkselector' config 2017-10-11 05:36:10 +02:00
Boris Feld
b09f40c232 configitems: register the 'experimental.archivemetatemplate' config 2017-10-11 05:18:20 +02:00
Boris Feld
bea8fba132 configitems: register the 'server.bundle*' family of config
All these config use the same function specifying a default value. We need to
register them all at the same time.
2017-10-11 17:51:40 +02:00
Boris Feld
baa18d572d configitems: register the 'web.logourl' config 2017-10-11 04:16:17 +02:00
Boris Feld
8209e13aaa configitems: register the 'web.logoimg' config 2017-10-11 04:16:05 +02:00
Boris Feld
783ea5f54c configitems: register the 'web.labels' config 2017-10-11 04:15:48 +02:00
Boris Feld
da25127b96 configitems: register the 'web.hidden' config 2017-10-11 04:15:37 +02:00
Boris Feld
34bf70b86f configitems: register the 'web.guessmime' config 2017-10-11 04:15:24 +02:00
Boris Feld
c8a7ed3681 configitems: register the 'web.deny_push' config 2017-10-11 04:15:08 +02:00
Boris Feld
4be8c3b528 configitems: register the 'web.contact' config 2017-10-11 04:14:44 +02:00
Boris Feld
c71a63f860 configitems: register the 'web.cache' config 2017-10-11 04:14:33 +02:00
Boris Feld
4d84c5f2d5 configitems: register the 'web.allowzip' config 2017-10-11 04:14:14 +02:00
Boris Feld
088bf5e857 configitems: register the 'web.allow_push' config 2017-10-11 04:14:01 +02:00