# configitems.toml - centralized declaration of configuration options
#
# This file contains declarations of the core Mercurial configuration options.
#
# # Structure
#
# items: array of config items
# templates: mapping of template name to template declaration
# template-applications: array of template applications
#
# # Elements
#
# ## Item
#
# Declares a core Mercurial option.
#
# - section: string (required)
# - name: string (required)
# - default-type: boolean, changes how `default` is read
# - default: any
# - generic: boolean
# - priority: integer, only if `generic` is true
# - alias: list of 2-tuples of strings
# - experimental: boolean
# - documentation: string
# - in_core_extension: string
#
# ## Template
#
# Declares a group of options to be re-used for multiple sections.
#
# - all the same fields as `Item`, except `section` and `name`
# - `suffix` (string, required)
#
# ## Template applications
#
# Uses a `Template` to instanciate its options in a given section.
#
# - template: string (required, must match a `Template` name)
# - section: string (required)

[[items]]
section = "alias"
name = ".*"
default-type = "dynamic"
generic = true

[[items]]
section = "auth"
name = "cookiefile"

# bookmarks.pushing: internal hack for discovery
[[items]]
section = "bookmarks"
name = "pushing"
default-type = "list_type"

# bundle.mainreporoot: internal hack for bundlerepo
[[items]]
section = "bundle"
name = "mainreporoot"
default = ""

[[items]]
section = "censor"
name = "policy"
default = "abort"
documentation="""Control how to react when accessing censored content.
Accepted value: "abort", "ignore". Defaults to abort.

A few informative commands such as ``hg grep`` will unconditionally ignore
censored data and merely report that it was encountered.
"""


[[items]]
section = "chgserver"
name = "idletimeout"
default = 3600

[[items]]
section = "chgserver"
name = "skiphash"
default = false

[[items]]
section = "cmdserver"
name = "log"

[[items]]
section = "cmdserver"
name = "max-log-files"
default = 7

[[items]]
section = "cmdserver"
name = "max-log-size"
default = "1 MB"

[[items]]
section = "cmdserver"
name = "max-repo-cache"
default = 0
experimental = true

[[items]]
section = "cmdserver"
name = "message-encodings"
default-type = "list_type"

[[items]]
section = "cmdserver"
name = "shutdown-on-interrupt"
default = true

[[items]]
section = "cmdserver"
name = "track-log"
default-type = "lambda"
default = [ "chgserver", "cmdserver", "repocache",]

[[items]]
section = "color"
name = ".*"
generic = true

[[items]]
section = "color"
name = "mode"
default = "auto"

[[items]]
section = "color"
name = "pagermode"
default-type = "dynamic"

[[items]]
section = "command-templates"
name = "graphnode"
alias = [["ui", "graphnodetemplate"]]

[[items]]
section = "command-templates"
name = "log"
alias = [["ui", "logtemplate"]]

[[items]]
section = "command-templates"
name = "mergemarker"
default = '{node|short} {ifeq(tags, "tip", "", ifeq(tags, "", "", "{tags} "))}{if(bookmarks, "{bookmarks} ")}{ifeq(branch, "default", "", "{branch} ")}- {author|user}: {desc|firstline}'
alias = [["ui", "mergemarkertemplate"]]

[[items]]
section = "command-templates"
name = "oneline-summary"

[[items]]
section = "command-templates"
name = "oneline-summary.*"
default-type = "dynamic"
generic = true

[[items]]
section = "command-templates"
name = "pre-merge-tool-output"
alias = [["ui", "pre-merge-tool-output-template"]]

[[items]]
section = "commands"
name = "commit.post-status"
default = false

[[items]]
section = "commands"
name = "commit.report-head-changes"
default = true
experimental = true
documentation = """
When true (the default) commit reports creation of new named-branch's heads, or
reopening of closed one.
"""

[[items]]
section = "commands"
name = "grep.all-files"
default = false
experimental = true

[[items]]
section = "commands"
name = "merge.require-rev"
default = false

[[items]]
section = "commands"
name = "push.require-revs"
default = false

# Rebase related configuration moved to core because other extension are doing
# strange things. For example, shelve import the extensions to reuse some bit
# without formally loading it.
[[items]]
section = "commands"
name = "rebase.requiredest"
default = false

[[items]]
section = "commands"
name = "resolve.confirm"
default = false

[[items]]
section = "commands"
name = "resolve.explicit-re-merge"
default = false

[[items]]
section = "commands"
name = "resolve.mark-check"
default = "none"

[[items]]
section = "commands"
name = "show.aliasprefix"
default-type = "list_type"

[[items]]
section = "commands"
name = "status.relative"
default = false

[[items]]
section = "commands"
name = "status.skipstates"
default = []
experimental = true

[[items]]
section = "commands"
name = "status.terse"
default = ""

[[items]]
section = "commands"
name = "status.verbose"
default = false

[[items]]
section = "commands"
name = "update.check"

[[items]]
section = "commands"
name = "update.requiredest"
default = false

[[items]]
section = "committemplate"
name = ".*"
generic = true

[[items]]
section = "convert"
name = "bzr.saverev"
default = true

[[items]]
section = "convert"
name = "cvsps.cache"
default = true

[[items]]
section = "convert"
name = "cvsps.fuzz"
default = 60

[[items]]
section = "convert"
name = "cvsps.logencoding"

[[items]]
section = "convert"
name = "cvsps.mergefrom"

[[items]]
section = "convert"
name = "cvsps.mergeto"

[[items]]
section = "convert"
name = "git.committeractions"
default-type = "lambda"
default = [ "messagedifferent",]

[[items]]
section = "convert"
name = "git.extrakeys"
default-type = "list_type"

[[items]]
section = "convert"
name = "git.findcopiesharder"
default = false

[[items]]
section = "convert"
name = "git.remoteprefix"
default = "remote"

[[items]]
section = "convert"
name = "git.renamelimit"
default = 400

[[items]]
section = "convert"
name = "git.saverev"
default = true

[[items]]
section = "convert"
name = "git.similarity"
default = 50

[[items]]
section = "convert"
name = "git.skipsubmodules"
default = false

[[items]]
section = "convert"
name = "hg.clonebranches"
default = false

[[items]]
section = "convert"
name = "hg.ignoreerrors"
default = false

[[items]]
section = "convert"
name = "hg.preserve-hash"
default = false

[[items]]
section = "convert"
name = "hg.revs"

[[items]]
section = "convert"
name = "hg.saverev"
default = false

[[items]]
section = "convert"
name = "hg.sourcename"

[[items]]
section = "convert"
name = "hg.startrev"

[[items]]
section = "convert"
name = "hg.tagsbranch"
default = "default"

[[items]]
section = "convert"
name = "hg.usebranchnames"
default = true

[[items]]
section = "convert"
name = "ignoreancestorcheck"
default = false
experimental = true

[[items]]
section = "convert"
name = "localtimezone"
default = false

[[items]]
section = "convert"
name = "p4.encoding"
default-type = "dynamic"

[[items]]
section = "convert"
name = "p4.startrev"
default = 0

[[items]]
section = "convert"
name = "skiptags"
default = false

[[items]]
section = "convert"
name = "svn.branches"

[[items]]
section = "convert"
name = "svn.dangerous-set-commit-dates"
default = false

[[items]]
section = "convert"
name = "svn.debugsvnlog"
default = true

[[items]]
section = "convert"
name = "svn.startrev"
default = 0

[[items]]
section = "convert"
name = "svn.tags"

[[items]]
section = "convert"
name = "svn.trunk"

[[items]]
section = "debug"
name = "bundling-stats"
default = false
documentation = "Display extra information about the bundling process."

[[items]]
section = "debug"
name = "dirstate.delaywrite"
default = 0

[[items]]
section = "debug"
name = "revlog.debug-delta"
default = false

[[items]]
section = "debug"
name = "revlog.verifyposition.changelog"
default = ""

[[items]]
section = "debug"
name = "unbundling-stats"
default = false
documentation = "Display extra information about the unbundling process."

[[items]]
section = "defaults"
name = ".*"
generic = true

[[items]]
section = "devel"
name = "all-warnings"
default = false

[[items]]
section = "devel"
name = "bundle.delta"
default = ""

[[items]]
section = "devel"
name = "bundle2.debug"
default = false

[[items]]
section = "devel"
name = "cache-vfs"

[[items]]
section = "devel"
name = "clonebundles.override-operation-id"
documentation = """
override the operation id used to produce unique filename at generation time.

Useful to stabilize some filename in the tests.
"""

[[items]]
section = "devel"
name = "check-locks"
default = false

[[items]]
section = "devel"
name = "check-relroot"
default = false

[[items]]
section = "devel"
name = "copy-tracing.multi-thread"
default = true

# Track copy information for all files, not just "added" ones (very slow)
[[items]]
section = "devel"
name = "copy-tracing.trace-all-files"
default = false

[[items]]
section = "devel"
name = "debug.abort-transaction"
default = ""
documentation = """If set to one of the listed values, all transactions will
abort. This is used to test transaction rollback and recovery. Possible values:
- ``abort-post-finalize``: abort the transaction normally after finalization but
  before closing the transaction, causing a rollback
- ``kill-9-post-finalize``: like abort-post-finalize but kill the process with
  SIGKILL (9), leaving an abandoned transaction on disk
"""

[[items]]
section = "devel"
name = "debug.abort-update"
default = false
documentation = """If true, then any merge with the working copy, \
e.g. [hg update], will be aborted after figuring out what needs to be done, \
but before spawning the parallel worker."""

[[items]]
section = "devel"
name = "update.abort-on-dirstate-change"
default = false
documentation = """If true, then the dirstate state changes during an update \
 will abort."""

[[items]]
section = "devel"
name = "debug.copies"
default = false

[[items]]
section = "devel"
name = "debug.extensions"
default = false

[[items]]
section = "devel"
name = "debug.peer-request"
default = false

[[items]]
section = "devel"
name = "debug.repo-filters"
default = false

[[items]]
section = "devel"
name = "default-date"

[[items]]
section = "devel"
name = "deprec-warn"
default = false

# possible values:
# - auto (the default)
# - force-append
# - force-new
[[items]]
section = "devel"
name = "dirstate.v2.data_update_mode"
default = "auto"

[[items]]
section = "devel"
name = "disableloaddefaultcerts"
default = false

[[items]]
section = "devel"
name = "discovery.exchange-heads"
default = true
documentation = """If false, the discovery will not start with remote \
head fetching and local head querying."""

[[items]]
section = "devel"
name = "discovery.grow-sample"
default = true
documentation = """If false, the sample size used in set discovery \
will not be increased through the process."""

[[items]]
section = "devel"
name = "discovery.grow-sample.dynamic"
default = true
documentation = """If true, the default, the sample size is adapted to the shape \
of the undecided set. It is set to the max of:
`<target-size>, len(roots(undecided)), len(heads(undecided))`"""

[[items]]
section = "devel"
name = "discovery.grow-sample.rate"
default = 1.05
documentation = "Controls the rate at which the sample grows."

[[items]]
section = "devel"
name = "discovery.randomize"
default = true
documentation = """If false, random samplings during discovery are deterministic. \
It is meant for integration tests."""

[[items]]
section = "devel"
name = "discovery.sample-size"
default = 200
documentation = "Controls the initial size of the discovery sample."

[[items]]
section = "devel"
name = "discovery.sample-size.initial"
default = 100
documentation = "Controls the initial size of the discovery for initial change."

[[items]]
section = "devel"
name = "fileindex.vacuum-mode"
default = "auto"
experimental = true
documentation = """Controls when to vacuum the file index tree file.
Possible values:
- ``auto`` (default): vacuum based on storage.fileindex.max-unused-percentage
- ``never``: never vacuum
- ``always``: always vacuum when writing the file index
This config only has an effect if the operation writes the file index. For
example, a commit that adds no files will never vacuum, even with ``always``.
"""

[[items]]
section = "devel"
name = "fileindex.garbage-timestamp"
experimental = true
documentation = """Controls the timestamp used when the file index creates a new
garbage entry. When unset, the current time is used."""

[[items]]
section = "devel"
name = "legacy.exchange"
default-type = "list_type"

[[items]]
section = "devel"
name = "lock-wait-sync-file"
default = ""

[[items]]
section = "devel"
name = "persistent-nodemap"
default = false
documentation = """When true, revlogs use a special reference version of the \
nodemap, that is not performant but is "known" to behave properly."""

[[items]]
section = "devel"
name = "server-insecure-exact-protocol"
default = ""

[[items]]
section = "devel"
name = "servercafile"
default = ""

[[items]]
section = "devel"
name = "serverexactprotocol"
default = ""

[[items]]
section = "devel"
name = "serverrequirecert"
default = false

[[items]]
section = "devel"
name = "strip-obsmarkers"
default = true

[[items]]
section = 'devel'
name = 'sync.status.pre-dirstate-write-file'
documentation = """
Makes the status algorithm wait for the existence of this file \
(or until a timeout of `devel.sync.status.pre-dirstate-write-file-timeout` \
seconds) before taking the lock and writing the dirstate. \
Status signals that it's ready to wait by creating a file \
with the same name + `.waiting`. \
Useful when testing race conditions."""

[[items]]
section = 'devel'
name = 'sync.status.pre-dirstate-write-file-timeout'
default=20

[[items]]
section = 'devel'
name = 'sync.dirstate.post-docket-read-file'

[[items]]
section = 'devel'
name = 'sync.dirstate.post-docket-read-file-timeout'
default=20

[[items]]
section = 'devel'
name = 'sync.dirstate.pre-read-file'

[[items]]
section = 'devel'
name = 'sync.dirstate.pre-read-file-timeout'
default=20

[[items]]
section = 'devel'
name = 'sync.fileindex.pre-read-data-files'

[[items]]
section = 'devel'
name = 'sync.fileindex.pre-read-data-files-timeout'
default = 20

[[items]]
section = "devel"
name = "user.obsmarker"

[[items]]
section = "devel"
name = "warn-config"

[[items]]
section = "devel"
name = "warn-config-default"

[[items]]
section = "devel"
name = "warn-config-unknown"

[[items]]
section = "devel"
name = "warn-empty-changegroup"
default = false

[[items]]
section = "diff"
name = "merge"
default = false
documentation = """Show a "merge diff" instead of defaulting to a diff against
the working directory's first parent. A "merge diff" will diff against the
conflict regions in the merge, which is very useful to make sense of what
the merge commit itself has done."""

[[items]]
section = "email"
name = "bcc"

[[items]]
section = "email"
name = "cc"

[[items]]
section = "email"
name = "charsets"
default-type = "list_type"

[[items]]
section = "email"
name = "from"

[[items]]
section = "email"
name = "method"
default = "smtp"

[[items]]
section = "email"
name = "reply-to"

[[items]]
section = "email"
name = "to"

[[items]]
section = "experimental"
name = "archivemetatemplate"
default-type = "dynamic"

[[items]]
section = "experimental"
name = "auto-publish"
default = "publish"


# Kept around for a few version in case it need to be disabled quickly
[[items]]
section = "experimental"
name = "branch-cache-v3"
default = false

[[items]]
section = "experimental"
name = "bundle-phases"
default = false

[[items]]
section = "experimental"
name = "bundle2-advertise"
default = true

[[items]]
section = "experimental"
name = "bundle2-output-capture"
default = false

[[items]]
section = "experimental"
name = "bundle2.pushback"
default = false

[[items]]
section = "experimental"
name = "bundle2lazylocking"
default = false

[[items]]
section = "experimental"
name = "bundlecomplevel"

[[items]]
section = "experimental"
name = "bundlecomplevel.bzip2"

[[items]]
section = "experimental"
name = "bundlecomplevel.gzip"

[[items]]
section = "experimental"
name = "bundlecomplevel.none"

[[items]]
section = "experimental"
name = "bundlecomplevel.zstd"

[[items]]
section = "experimental"
name = "bundlecompthreads"

[[items]]
section = "experimental"
name = "bundlecompthreads.bzip2"

[[items]]
section = "experimental"
name = "bundlecompthreads.gzip"

[[items]]
section = "experimental"
name = "bundlecompthreads.none"

[[items]]
section = "experimental"
name = "bundlecompthreads.zstd"

[[items]]
section = "experimental"
name = "changegroup4"
default = false

[[items]]
section = "experimental"
name = "changegroup5"
default = false

# might remove rank configuration once the computation has no impact
[[items]]
section = "experimental"
name = "changelog-v2.compute-rank"
default = true

[[items]]
section = "experimental"
name = "cleanup-as-archived"
default = false

[[items]]
section = "experimental"
name = "clientcompressionengines"
default-type = "list_type"

[[items]]
section = "experimental"
name = "copies.read-from"
default = "filelog-only"

[[items]]
section = "experimental"
name = "copies.write-to"
default = "filelog-only"

[[items]]
section = "experimental"
name = "copytrace"
default = "on"

[[items]]
section = "experimental"
name = "copytrace.movecandidateslimit"
default = 100

[[items]]
section = "experimental"
name = "copytrace.sourcecommitlimit"
default = 100

[[items]]
section = "experimental"
name = "crecordtest"

[[items]]
section = "experimental"
name = "directaccess"
default = false

[[items]]
section = "experimental"
name = "directaccess.revnums"
default = false

[[items]]
section = "experimental"
name = "editortmpinhg"
default = false

[[items]]
section = "experimental"
name = "evolution"
default-type = "list_type"

[[items]]
section = "experimental"
name = "evolution.allowdivergence"
default = false
alias = [["experimental", "allowdivergence"]]

[[items]]
section = "experimental"
name = "evolution.allowunstable"

[[items]]
section = "experimental"
name = "evolution.bundle-obsmarker"
default = false

[[items]]
section = "experimental"
name = "evolution.bundle-obsmarker:mandatory"
default = true

[[items]]
section = "experimental"
name = "evolution.createmarkers"

[[items]]
section = "experimental"
name = "evolution.effect-flags"
default = true
alias = [["experimental", "effect-flags"]]

[[items]]
section = "experimental"
name = "evolution.exchange"

[[items]]
section = "experimental"
name = "evolution.report-instabilities"
default = true

[[items]]
section = "experimental"
name = "evolution.track-operation"
default = true

[[items]]
section = "experimental"
name = "exportableenviron"
default-type = "list_type"

[[items]]
section = "experimental"
name = "extendedheader.index"

[[items]]
section = "experimental"
name = "extendedheader.similarity"
default = false

[[items]]
section = "experimental"
name = "extra-filter-revs"
documentation = """Repo-level config to prevent a revset from being visible.
The target use case is to use `share` to expose different subsets of the same \
repository, especially server side. See also `server.view`."""

[[items]]
section = "experimental"
name = "graphshorten"
default = false

[[items]]
section = "experimental"
name = "graphstyle.grandparent"
default-type = "dynamic"

[[items]]
section = "experimental"
name = "graphstyle.missing"
default-type = "dynamic"

[[items]]
section = "experimental"
name = "graphstyle.parent"
default-type = "dynamic"

[[items]]
section = "experimental"
name = "hook-track-tags"
default = false

[[items]]
section = "experimental"
name = "httppostargs"
default = false

[[items]]
section = "experimental"
name = "log.topo"
default = false

[[items]]
section = "experimental"
name = "maxdeltachainspan"
default = -1

[[items]]
section = "experimental"
name = "merge-track-salvaged"
default = false
documentation = """Tracks files which were undeleted (merge might delete them \
but we explicitly kept/undeleted them) and creates new filenodes for them."""

[[items]]
section = "experimental"
name = "merge.checkpathconflicts"
default = false

[[items]]
section = "experimental"
name = "narrow"
default = false

[[items]]
section = "experimental"
name = "nointerrupt"
default = false

[[items]]
section = "experimental"
name = "nointerrupt-interactiveonly"
default = true

[[items]]
section = "experimental"
name = "nonnormalparanoidcheck"
default = false

[[items]]
section = "experimental"
name = "obsmarkers-exchange-debug"
default = false

[[items]]
section = "experimental"
name = "rebaseskipobsolete"
default = true

[[items]]
section = "experimental"
name = "remotenames"
default = false

[[items]]
section = "experimental"
name = "removeemptydirs"
default = true

[[items]]
section = "experimental"
name = "revert.interactive.select-to-keep"
default = false

[[items]]
section = "experimental"
name = "revisions.disambiguatewithin"

[[items]]
section = "experimental"
name = "revisions.prefixhexnode"
default = false

# "out of experimental" todo list.
#
# * include management of a persistent nodemap in the main docket
# * enforce a "no-truncate" policy for mmap safety
#      - for censoring operation
#      - for stripping operation
#      - for rollback operation
# * proper streaming (race free) of the docket file
# * track garbage data to evemtually allow rewriting -existing- sidedata.
# * Exchange-wise, we will also need to do something more efficient than
#   keeping references to the affected revlogs, especially memory-wise when
#   rewriting sidedata.
# * introduce a proper solution to reduce the number of filelog related files.
# * use caching for reading sidedata (similar to what we do for data).
# * no longer set offset=0 if sidedata_size=0 (simplify cutoff computation).
# * Improvement to consider
#   - avoid compression header in chunk using the default compression?
#   - forbid "inline" compression mode entirely?
#   - split the data offset and flag field (the 2 bytes save are mostly trouble)
#   - keep track of uncompressed -chunk- size (to preallocate memory better)
#   - keep track of chain base or size (probably not that useful anymore)
[[items]]
section = "experimental"
name = "revlogv2"

[[items]]
section = "experimental"
name = "rust.index"
default = false

[[items]]
section = "experimental"
name = "server.allow-hidden-access"
default-type = "list_type"

[[items]]
section = "experimental"
name = "server.filesdata.recommended-batch-size"
default = 50000

[[items]]
section = "experimental"
name = "server.manifestdata.recommended-batch-size"
default = 100000

[[items]]
section = "experimental"
name = "server.stream-narrow-clones"
default = false

[[items]]
section = "experimental"
name = "single-head-per-branch"
default = false

[[items]]
section = "experimental"
name = "single-head-per-branch:account-closed-heads"
default = false

[[items]]
section = "experimental"
name = "single-head-per-branch:public-changes-only"
default = false

[[items]]
section = "experimental"
name = "sparse-read"
default = false

[[items]]
section = "experimental"
name = "sparse-read.density-threshold"
default = 0.5

[[items]]
section = "experimental"
name = "sparse-read.min-gap-size"
default = "65K"

[[items]]
section = "experimental"
name = "stream-v3"
default = false

[[items]]
section = "experimental"
name = "treemanifest"
default = false

[[items]]
section = "experimental"
name = "update.atomic-file"
default = false

[[items]]
section = "experimental"
name = "web.full-garbage-collection-rate"
default = 1  # still forcing a full collection on each request

[[items]]
section = "experimental"
name = "worker.repository-upgrade"
default = false

[[items]]
section = "experimental"
name = "worker.wdir-get-thread-safe"
default = false

[[items]]
section = "experimental"
name = "xdiff"
default = false

[[items]]
section = "extdata"
name = ".*"
generic = true

[[items]]
section = "extensions"
name = "[^:]*"
generic = true

[[items]]
section = "extensions"
name = "[^:]*:required"
default = false
generic = true


# The format section is dedicated to control of the repository on disk format
# and constraints.
#
# A format change affects which data is expected to be stored in the repository
# and how. It impacts other client whichever their version are, format change
# often comes with an associated entry in the requirements.
#
# The option are usually in the form `use-xxx-yyy` (with xxx-yy the feature name).
#
# To configure details of how the repository is accessed, without affect the
# repository formats, see the `storage section`.

[[items]]
section = "format"
name = "bookmarks-in-store"
default = false

[[items]]
section = "format"
name = "chunkcachesize"
experimental = true

[[items]]
section = "format"
name = "dotencode"
default = true

# The interaction between the archived phase and obsolescence markers needs to
# be sorted out before wider usage of this are to be considered.
#
# At the time this message is written, behavior when archiving obsolete
# changeset differ significantly from stripping. As part of stripping, we also
# remove the obsolescence marker associated to the stripped changesets,
# revealing the precedecessors changesets when applicable. When archiving, we
# don't touch the obsolescence markers, keeping everything hidden. This can
# result in quite confusing situation for people combining exchanging draft
# with the archived phases. As some markers needed by others may be skipped
# during exchange.
[[items]]
section = "format"
name = "exp-archived-phase"
default = false
experimental = true

# Experimental TODOs:
#
# * Same as for revlogv2 (but for the reduction of the number of files)
# * Actually computing the rank of changesets
# * Improvement to investigate
#   - storing .hgtags fnode
#   - storing branch related identifier
[[items]]
section = "format"
name = "exp-use-changelog-v2"
experimental = true

[[items]]
section = "format"
name = "exp-use-copies-side-data-changeset"
default = false
experimental = true

# Experimental feature TODO:
#
# The format is now frozen, but the feature is worth a bit more attention.
#
# * checking the performance without rust
# * easily accessible fast upgrade
# * updated delta strategie if relevant
[[items]]
section = "format"
name = "use-delta-info-flags"
default = false
experimental = true
documentation = """Store more information through flags in the revlog's index.

These flags allow for more efficient data access, data exchange and
data storage in general.

In particular, one can expect better performance for the following categories of
commands for repositories using this format can expect better performance than
ones using older formats:

- `hg status --copies --rev X`
- `hg diff`
- `hg merge`
- `hg clone`
- `hg pull`
- `hg push`
- `hg unbundle`
"""

# This will never get out of experimental and will be removed once the fileindex
# is able to cover this usecase.
[[items]]
section = "format"
name = "exp-use-very-fragile-and-unsafe-plain-store-encoding"
experimental = true
documentation = """Switch to an extremely simplified version of the store encoding used for filelogs.

It only ensures that directories and filenames cannot collide. Any other filename
weirdness is preserved as-is. This should not be used outside of specific
server setups and it is very unlikely that you need it at all. If you think you
should use it, please contact the Mercurial core developers.

This feature currently implies the use of `store` and `fncache`. It is
incompatible with the use of `dotencode`, so make sure you set `format.dotencode=no`.

This is an experimental feature and its support might be removed in the future.
"""

[[items]]
section = "format"
name = "generaldelta"
default = false
experimental = true

[[items]]
section = "format"
name = "manifestcachesize"
experimental = true

[[items]]
section = "format"
name = "maxchainlen"
default-type = "dynamic"
experimental = true

[[items]]
section = "format"
name = "obsstore-version"

[[items]]
section = "format"
name = "revlog-compression"
default-type = "lambda"
alias = [["experimental", "format.compression"]]
default = [ "zstd", "zlib",]

[[items]]
section = "format"
name = "sparse-revlog"
default = true

[[items]]
section = "format"
name = "use-dirstate-tracked-hint"
default = false
documentation = """Enable or disable the writing of "tracked key" file alongside
the dirstate. (default to disabled)

That "tracked-hint" can help external automations to detect changes to
the set of tracked files. (i.e the result of 'hg files' or 'hg status
-macd')

The tracked-hint is written in a new '.hg/dirstate-tracked-hint'. That
file contains two lines: - the first line is the file version
(currently: 1), - the second line contains the "tracked-hint". That
file is written right after the dirstate is written.

The tracked-hint changes whenever the set of file tracked in the
dirstate changes. The general idea is: - if the hint is identical, the
set of tracked file SHOULD be identical, - if the hint is different,
the set of tracked file MIGHT be different.

The "hint is identical" case uses 'SHOULD' as the dirstate and the
hint file are two distinct files and therefore that cannot be read or
written to in an atomic way. If the key is identical, nothing
garantees that the dirstate is not updated right after the hint file.
This is considered a negligible limitation for the intended usecase.
It is actually possible to prevent this race by taking the repository
lock during read operations.

They are two "ways" to use this feature:

1) monitoring changes to the '.hg/dirstate-tracked-hint', if the file
changes, the tracked set might have changed.

2) storing the value and comparing it to a later value.
"""

[[items]]
section = "format"
name = "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories"
default = false

[[items]]
section = "format"
name = "use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet"
default = false

[[items]]
section = "format"
name = "use-dirstate-tracked-hint.version"
default = 1

[[items]]
section = "format"
name = "use-dirstate-v2"
default = false
alias = [["format", "exp-rc-dirstate-v2"]]
documentation = """Enables dirstate-v2 format *when creating a new repository*.
Which format to use for existing repos is controlled by `.hg/requires`."""

[[items]]
section = "format"
name = "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories"
default = false
experimental = true

[[items]]
section = "format"
name = "use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet"
default = false
experimental = true

# Having this on by default means we are confident about the scaling of phases.
# This is not garanteed to be the case at the time this message is written.
[[items]]
section = "format"
name = "use-internal-phase"
default = false
experimental = true

[[items]]
section = "format"
name = "use-persistent-nodemap"
default-type = "dynamic"

[[items]]
section = "format"
name = "use-share-safe"
default = true

[[items]]
section = "format"
name = "use-share-safe.automatic-upgrade-of-mismatching-repositories"
default = false
experimental = true

[[items]]
section = "format"
name = "use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet"
default = false
experimental = true

[[items]]
section = "format"
name = "usefncache"
default = true

# Experimental todo's
# - fix the windows mmap limitation?
[[items]]
section = "format"
name = "use-fileindex-v1"
default = false
experimental = true
documentation = """Use the `file-index` to store the set of files tracked in the
repository store and efficiently manipulate these filenames.

This format supersedes the `fncache` and is incompatible with it. The
`file-index` provides overall improved performance especially when adding
new files and more flexibility that other features rely on.

This format impacts internal implementation details for the `store` and will not
affect how a repository interracts with other repositories. It has no effect on
the core information stored within the repository and doesn't affect the
wire prototocol (neither at the changegroup nor stream clone level).
"""

[[items]]
section = "format"
name = "usegeneraldelta"
default = true

[[items]]
section = "format"
name = "usestore"
default = true

[[items]]
section = "fsmonitor"
name = "warn_update_file_count"
default = 50000

[[items]]
section = "fsmonitor"
name = "warn_update_file_count_rust"
default = 400000

[[items]]
section = "fsmonitor"
name = "warn_when_unused"
default = true

[[items]]
section = "help"
name = 'hidden-command\..*'
default = false
generic = true

[[items]]
section = "help"
name = 'hidden-topic\..*'
default = false
generic = true

[[items]]
section = "hgweb-paths"
name = ".*"
default-type = "list_type"
generic = true

[[items]]
section = "hooks"
name = ".*:run-with-plain"
default = true
generic = true

[[items]]
section = "hooks"
name = "[^:]*"
default-type = "dynamic"
generic = true

[[items]]
section = "hostfingerprints"
name = ".*"
default-type = "list_type"
generic = true

[[items]]
section = "hostsecurity"
name = ".*:ciphers$"
default-type = "dynamic"
generic = true

[[items]]
section = "hostsecurity"
name = ".*:fingerprints$"
default-type = "list_type"
generic = true

[[items]]
section = "hostsecurity"
name = ".*:minimumprotocol$"
default-type = "dynamic"
generic = true

[[items]]
section = "hostsecurity"
name = ".*:verifycertsfile$"
generic = true

[[items]]
section = "hostsecurity"
name = "ciphers"

[[items]]
section = "hostsecurity"
name = "minimumprotocol"
default-type = "dynamic"

[[items]]
section = "http"
name = "timeout"

[[items]]
section = "http_proxy"
name = "always"
default = false

[[items]]
section = "http_proxy"
name = "host"

[[items]]
section = "http_proxy"
name = "no"
default-type = "list_type"

[[items]]
section = "http_proxy"
name = "passwd"

[[items]]
section = "http_proxy"
name = "user"

[[items]]
section = "logtoprocess"
name = "command"

[[items]]
section = "logtoprocess"
name = "commandexception"

[[items]]
section = "logtoprocess"
name = "commandfinish"

[[items]]
section = "logtoprocess"
name = "develwarn"

[[items]]
section = "logtoprocess"
name = "uiblocked"

[[items]]
section = "merge"
name = "checkignored"
default = "abort"

[[items]]
section = "merge"
name = "checkunknown"
default = "abort"

[[items]]
section = "merge"
name = "disable-partial-tools"
default = false
experimental = true

[[items]]
section = "merge"
name = "followcopies"
default = true

[[items]]
section = "merge"
name = "on-failure"
default = "continue"

[[items]]
section = "merge"
name = "preferancestor"
default-type = "lambda"
default = ["*"]
experimental = true

[[items]]
section = "merge"
name = "strict-capability-check"
default = false

[[items]]
section = "experimental"
name = "relaxed-block-sync-merge"
default = false
documentation="""When using built-in simple merge tools, this config makes it so that changes
touching adjacent file regions no longer conflict with each other.

In particular, addition/modification/removal adjacent to modification/removal
are all allowed with no conflict.

Addition next to addition is still treated as a conflict because it presents
a legitimate ambiguity.

The change tweaks existing logic for aligning file changes, making it so
that a 0-length spacing between regions is just as good as a 1-line spacing.
(default: False)
"""

[[items]]
section = "merge-tools"
name = ".*"
generic = true

[[items]]
section = "merge-tools"
name = '.*\.args$'
default = "$local $base $other"
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.binary$'
default = false
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.check$'
default-type = "list_type"
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.checkchanged$'
default = false
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.executable$'
default-type = "dynamic"
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.fixeol$'
default = false
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.gui$'
default = false
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.mergemarkers$'
default = "basic"
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.mergemarkertemplate$'  # take from command-templates.mergemarker
default-type = "dynamic"
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.premerge$'
default-type = "dynamic"
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.priority$'
default = 0
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.regappend$'
default = ""
generic = true
priority = -1

[[items]]
section = "merge-tools"
name = '.*\.symlink$'
default = false
generic = true
priority = -1

[[items]]
section = "pager"
name = "attend-.*"
default-type = "dynamic"
generic = true

[[items]]
section = "pager"
name = "ignore"
default-type = "list_type"

[[items]]
section = "pager"
name = "pager"
default-type = "dynamic"

[[items]]
section = "partial-merge-tools"
name = ".*"
generic = true
experimental = true

[[items]]
section = "partial-merge-tools"
name = '.*\.args'
default = "$local $base $other"
generic = true
priority = -1
experimental = true

[[items]]
section = "partial-merge-tools"
name = '.*\.disable'
default = false
generic = true
priority = -1
experimental = true

[[items]]
section = "partial-merge-tools"
name = '.*\.executable$'
default-type = "dynamic"
generic = true
priority = -1
experimental = true

[[items]]
section = "partial-merge-tools"
name = '.*\.order'
default = 0
generic = true
priority = -1
experimental = true

[[items]]
section = "partial-merge-tools"
name = '.*\.patterns'
default-type = "dynamic"
generic = true
priority = -1
experimental = true

[[items]]
section = "patch"
name = "eol"
default = "strict"

[[items]]
section = "patch"
name = "fuzz"
default = 2

[[items]]
section = "paths"
name = "[^:]*"
generic = true

[[items]]
section = "paths"
name = ".*:bookmarks.mode"
default = "default"
generic = true

[[items]]
section = "paths"
name = ".*:multi-urls"
default = false
generic = true

[[items]]
section = "paths"
name = ".*:pulled-delta-reuse-policy"
generic = true

[[items]]
section = "paths"
name = ".*:pushrev"
generic = true

[[items]]
section = "paths"
name = ".*:pushurl"
generic = true

[[items]]
section = "paths"
name = "default"

[[items]]
section = "paths"
name = "default-push"

[[items]]
section = "phases"
name = "checksubrepos"
default = "follow"

[[items]]
section = "phases"
name = "new-commit"
default = "draft"

[[items]]
section = "phases"
name = "publish"
default = true

[[items]]
section = "profiling"
name = "enabled"
default = false

[[items]]
section = "profiling"
name = "format"
default = "text"

[[items]]
section = "profiling"
name = "freq"
default = 1000

[[items]]
section = "profiling"
name = "limit"
default = 30

[[items]]
section = "profiling"
name = "nested"
default = 0

[[items]]
section = "profiling"
name = "output"

[[items]]
section = "profiling"
name = "output-dir"
documentation = """Directory in which profiling data or report should \
be saved. The data will be written to a file with the naming scheme \
"hg-profile-{TIMESTAMP}-{PID}.prof". If both ``output`` and ``output-dir`` \
are specified, ``output`` will take precedence.
"""

[[items]]
section = "profiling"
name = "output-dir:create"
default = false
documentation = "Create output-dir if it doesn't already exist."

[[items]]
section = "profiling"
name = "showmax"
default = 0.999

[[items]]
section = "profiling"
name = "showmin"
default-type = "dynamic"

[[items]]
section = "profiling"
name = "showtime"
default = true

[[items]]
section = "profiling"
name = "sort"
default = "inlinetime"

[[items]]
section = "profiling"
name = "statformat"
default = "hotpath"

[[items]]
section = "profiling"
name = "time-track"
default-type = "dynamic"

[[items]]
section = "profiling"
name = "type"
default = "stat"

[[items]]
section = "profiling"
name = "py-spy.exe"
default = "py-spy"

[[items]]
section = "profiling"
name = "py-spy.freq"
default = 100

[[items]]
section = "profiling"
name = "py-spy.format"

[[items]]
section = "progress"
name = "assume-tty"
default = false

[[items]]
section = "progress"
name = "changedelay"
default = 1

[[items]]
section = "progress"
name = "clear-complete"
default = true

[[items]]
section = "progress"
name = "debug"
default = false

[[items]]
section = "progress"
name = "delay"
default = 3

[[items]]
section = "progress"
name = "disable"
default = false

[[items]]
section = "progress"
name = "estimateinterval"
default = 60.0

[[items]]
section = "progress"
name = "format"
default-type = "lambda"
default = [ "topic", "bar", "number", "estimate",]

[[items]]
section = "progress"
name = "refresh"
default = 0.1

[[items]]
section = "progress"
name = "width"
default-type = "dynamic"

[[items]]
section = "pull"
name = "confirm"
default = false

[[items]]
section = "push"
name = "pushvars.server"
default = false

[[items]]
section = "rebase"
name = "experimental.inmemory"
default = false

[[items]]
section = "rebase"
name = "singletransaction"
default = false

[[items]]
section = "rebase"
name = "store-source"
default = true
experimental = true
documentation = """Controls creation of a `rebase_source` extra field during rebase.
When false, no such field is created. This is useful e.g. for incrementally \
converting changesets and then rebasing them onto an existing repo.
WARNING: this is an advanced setting reserved for people who know \
exactly what they are doing. Misuse of this setting can easily \
result in obsmarker cycles and a vivid headache."""

[[items]]
section = "rewrite"
name = "backup-bundle"
default = true
alias = [["ui", "history-editing-backup"]]

[[items]]
section = "rewrite"
name = "empty-successor"
default = "skip"
experimental = true

[[items]]
section = "rewrite"
name = "update-timestamp"
default = false

[[items]]
section = "rhg"
name = "cat"
default = true
experimental = true
documentation = """rhg cat has some quirks that need to be ironed out. \
In particular, the `-r` argument accepts a partial hash, but does not \
correctly resolve `abcdef` as a potential bookmark, tag or branch name."""

[[items]]
section = "rhg"
name = "fallback-exectutable"
experimental = true

[[items]]
section = "rhg"
name = "fallback-immediately"
default = false
experimental = true

[[items]]
section = "rhg"
name = "ignored-extensions"
default-type = "list_type"
experimental = true

[[items]]
section = "rhg"
name = "on-unsupported"
default = "abort"
experimental = true

[[items]]
section = "rust"
name = "update-from-null"
default = true
experimental = true
documentation = """Whether to use the Rust fast-path when an update from null
is detected. This config item is here to help users disable the fastpath in
case one of their extensions is interfering with the update code. If you are
one of these people, please reach out.
"""

[[items]]
section = "rust"
name = "update-from-clean"
default = true
experimental = true
documentation = """Whether to use the Rust fast-path when an update from clean
is detected. An update is "from clean" if no tracked files are affected.
This config item is here to help users disable the fastpath in
case one of their extensions is interfering with the update code. If you are
one of these people, please reach out.
"""

[[items]]
section = "server"
name = "bookmarks-pushkey-compat"
default = true

[[items]]
section = "server"
name = "bundle1"
default = true

[[items]]
section = "server"
name = "bundle1.pull"

[[items]]
section = "server"
name = "bundle1.push"

[[items]]
section = "server"
name = "bundle1gd"

[[items]]
section = "server"
name = "bundle1gd.pull"

[[items]]
section = "server"
name = "bundle1gd.push"

[[items]]
section = "server"
name = "bundle2.stream"
default = true
alias = [["experimental", "bundle2.stream"]]

[[items]]
section = "server"
name = "compressionengines"
default-type = "list_type"

[[items]]
section = "server"
name = "concurrent-push-mode"
default = "check-related"

[[items]]
section = "server"
name = "disablefullbundle"
default = false

[[items]]
section = "server"
name = "maxhttpheaderlen"
default = 1024

[[items]]
section = "server"
name = "preferuncompressed"
default = false

[[items]]
section = "server"
name = "pullbundle"
default = true

[[items]]
section = "server"
name = "streamunbundle"
default = false

[[items]]
section = "server"
name = "uncompressed"
default = true

[[items]]
section = "server"
name = "uncompressedallowsecret"
default = false

[[items]]
section = "server"
name = "validate"
default = false

[[items]]
section = "server"
name = "view"
default = "served"

[[items]]
section = "server"
name = "zliblevel"
default = -1

[[items]]
section = "server"
name = "zstdlevel"
default = 3

[[items]]
section = "server"
name = "peer-bundle-cache-root"
default = "bundle-cache"

[[items]]
section = "share"
name = "pool"

[[items]]
section = "share"
name = "poolnaming"
default = "identity"

[[items]]
section = "share"
name = "safe-mismatch.source-not-safe"
default = "abort"

[[items]]
section = "share"
name = "safe-mismatch.source-not-safe.warn"
default = true

[[items]]
section = "share"
name = "safe-mismatch.source-not-safe:verbose-upgrade"
default = true

[[items]]
section = "share"
name = "safe-mismatch.source-safe"
default = "abort"

[[items]]
section = "share"
name = "safe-mismatch.source-safe.warn"
default = true

[[items]]
section = "share"
name = "safe-mismatch.source-safe:verbose-upgrade"
default = true

[[items]]
section = "shelve"
name = "maxbackups"
default = 10

[[items]]
section = "shelve"
name = "store"
default = "internal"
experimental = true

[[items]]
section = "smtp"
name = "host"

[[items]]
section = "smtp"
name = "local_hostname"

[[items]]
section = "smtp"
name = "password"

[[items]]
section = "smtp"
name = "port"
default-type = "dynamic"

[[items]]
section = "smtp"
name = "tls"
default = "none"

[[items]]
section = "smtp"
name = "username"

[[items]]
section = "sparse"
name = "missingwarning"
default = true
experimental = true


# The "storage" section house config options that change how the repository
# data are accessed by  the current process but does not affects the on disk
# format. They can also adjust how the storage is computed, but without affect
# compatibility wither other clients.
#
# For deeper format change, see the `format` section.


[[items]]
section = "storage"
name = "all-slow-path"
default = "abort"
documentation = """Control the behavior of Mercurial when lacking performant code

Some format features might only have a fast implementation when a specific
flavor is installed (e.g. when the Rust extensions are available). A slow pure
Python implementation might be available to help with converting the repository
to another format or to perform a few accesses in an automation context.
Using such accesses might result in Mercurial becoming multiple time slower
than usual.

Acceptable values:

``allow``: Silently use the slower implementation to access the repository.
``warn``: Warn, but use the slower implementation to access the repository.
``abort``: Prevent access to such repositories. (This is the default)

See the individual "storage.*.slow-path" configs for details. These options can
override the default.
"""


[[items]]
section = "storage"
name = "delta-fold-estimate"
default = "when-fast"
experimental = true
documentation = """Whenever possible use delta folding to estimate the size of
a delta before computing it.

Acceptable value:
- always: always use
- when-fast: use only if a fast implementation is available (default)
- never: never use
"""

[[items]]
section = "storage"
name = "delta-fold-tolerance-percentage"
default = 5
experimental = true
documentation = """The maximum extra size allowed when using folding. The value
is expressed in percentage (5 means up to 105% of the original size, 50 means
150% of the original size.)

Negative value disable the use of delta folding.
(the delta folding usage is only used for revlog using te delta-info-flags feature).
"""

[[items]]
section = "storage"
name = "dirstate-v2.slow-path"
default = "default"
documentation = """Control the behavior of Mercurial when using a repository with the "dirstate-v2"
feature with an installation of Mercurial without a fast implementation for
the feature:

``allow``: Silently use the slower implementation to access the repository.
``warn``: Warn, but use the slower implementation to access the repository.
``default``: use value from the `storage.all-slow-path` value.
``abort``: Prevent access to such repositories. (This is the default)

For details on the "dirstate-v2" feature, see:
:hg:`help config.format.use-dirstate-v2`.
"""

[[items]]
section = "storage"
name = "revbranchcache.mmap"
default-type = "dynamic"

[[items]]
section = "storage"
name = "new-repo-backend"
default = "revlogv1"
experimental = true

[[items]]
section = "storage"
name = "revlog.delta-parent-search.candidate-group-chunk-size"
default = 20

[[items]]
section = "storage"
name = "revlog.exchange-compressed-delta"
default = true
experimental = true
documentation = """Controls whether the repository might emit or request
compressed deltas in bundles.

Exchanging deltas in their compressed form results in larger bundles and higher
bandwidth usage, but reduces CPU usage on both ends and helps the main server
to use agressive compression levels to share that benefit with ordinary clients
pulling from them.

Even when activated, the exchange of compressed deltas will only be used if the
exchange uses a changegroup format that supports it (04 and above) and the
receiving end supports it.
"""

[[items]]
section = "storage"
name = "revlog.issue6528.fix-incoming"
default = true

[[items]]
section = "storage"
name = "revlog.mmap.index"
default-type = "dynamic"

[[items]]
section = "storage"
name = "revlog.mmap.index:size-threshold"
default = "1 MB"

[[items]]
section = "storage"
name = "revlog.optimize-delta-parent-choice"
default = true
alias = [["format", "aggressivemergedeltas"]]

[[items]]
section = "storage"
name = "revlog.persistent-nodemap.mmap"
default = true

[[items]]
section = "storage"
name = "revlog.persistent-nodemap.slow-path"
default = "default"
documentation = """Control the behavior of Mercurial when using a repository with a "persistent"
nodemap with an installation of Mercurial without a fast implementation for
the feature:

``allow``: Silently use the slower implementation to access the repository.
``warn``: Warn, but use the slower implementation to access the repository.
``default``: use the value from the `storage.all-slow-path` value.
``abort``: Prevent access to such repositories. (This is the default)

For details on the "persistent-nodemap" feature, see:
:hg:`help config.format.use-persistent-nodemap`.
"""

[[items]]
section = "storage"
name = "revlog.reuse-external-delta"
default = true

[[items]]
section = "storage"
name = "revlog.reuse-external-delta-parent"
documentation = """This option is true unless `format.generaldelta` is set."""


[[items]]
section = "storage"
name = "revlog.reuse-external-suspicious-delta-parent"
default = false
# This should likely be merged into `paths.*:pulled-delta-reuse-policy` instead
# of existing on its own.
experimental = true
documentation = """When false, ignored suggested delta-parent if it does not
seems to match an optimal base or a snapshot. Only apply to repository
supporting sparse-revlog"""

[[items]]
section = "storage"
name = "revlog.reuse-external-delta-compression"
default = true
documentation = """When true, reuse the compression of incoming deltas
when receiving a compressed delta if its compression type is compatible
with the one used by the revlog.
"""

[[items]]
section = "storage"
name = "revlog.record-delta-quality"
default = true
experimental = true
documentation = """When set, record information about the quality of the stored
delta compared to the delta we could obtain from the parent.

Only affects revlogs using a format capable of storing such information (like a
revlog using delta-info-flags).
"""

[[items]]
section = "storage"
name = "revlog.validate-delta-base"
default = false
documentation = """Validate the integrity of bases when computing deltas.

Since the base of reused deltas is not validated either, we recommend using the
`server.validate` option if you want to guarantee the integrity of inbound
content."""
experimental = true

[[items]]
section = "storage"
name = "filelog.expected-max-compression-ratio"
# Arbitrary value picked to help the delta searching algorithme, there might be
# some data where compression works better, but 10 seems like a reasonably high
# value that will help filter some cases.
default = 10
documentation = """the expected maximum compression ratio expected for a
filelog. This is used to estimate the size of a delta before compressing it.

Setting this to 0 will disable the use of such estimate."""
experimental = true

[[items]]
section = "storage"
name = "revlog.zlib.level"

[[items]]
section = "storage"
name = "revlog.zstd.level"

[[items]]
section = "storage"
name = "fileindex.max-unused-percentage"
default = 50
experimental = true
documentation = """Maximum percentage of unreachable bytes / total bytes in the
file index tree file. When this is exceeded, the tree is vacuumed."""

[[items]]
section = "storage"
name = "fileindex.gc-retention-seconds"
default = 86400
experimental = true
documentation = """File index garbage collection retention period in seconds.
When the file index needs to rewrite one of its internal data files, it chooses
a new filename and leaves the old file on disk. That old file will be eligible
for garbage collection once the retention period has elapsed and a sufficient
number of transactions have occurred.

As a special case, if it is set to 0, then garbage collection is based solely on
the number of transactions and is not influenced by the current time.
"""

[[items]]
section = "storage"
name = "fileindex.slow-path"
default = "default"
experimental = true  # experimental as long as format.use-fileindex-v1 is.
documentation = """Control the behavior of Mercurial when using a repository
with the "fileindex-v1" feature with an installation of Mercurial without a fast
implementation for the feature:

``allow``: Silently use the slower implementation to access the repository.
``warn``: Warn, but use the slower implementation to access the repository.
``default``: use value from the `storage.all-slow-path` value.
``abort``: Prevent access to such repositories. (This is the default)

For details on the "fileindex-v1" feature, see:
:hg:`help config.format.use-fileindex-v1`.
"""

[[items]]
section = "subrepos"
name = "allowed"
default-type = "dynamic"  # to make backporting simpler

[[items]]
section = "subrepos"
name = "git:allowed"
default-type = "dynamic"

[[items]]
section = "subrepos"
name = "hg:allowed"
default-type = "dynamic"

[[items]]
section = "subrepos"
name = "svn:allowed"
default-type = "dynamic"

[[items]]
section = "templateconfig"
name = ".*"
default-type = "dynamic"
generic = true

[[items]]
section = "templates"
name = ".*"
generic = true

[[items]]
section = "trusted"
name = "groups"
default-type = "list_type"

[[items]]
section = "trusted"
name = "users"
default-type = "list_type"

[[items]]
section = "ui"
name = "_usedassubrepo"
default = false

[[items]]
section = "ui"
name = "allowemptycommit"
default = false

[[items]]
section = "ui"
name = "archivemeta"
default = true

[[items]]
section = "ui"
name = "askusername"
default = false

[[items]]
section = "ui"
name = "available-memory"

[[items]]
section = "ui"
name = "clonebundlefallback"
default = false

[[items]]
section = "ui"
name = "clonebundleprefers"
default-type = "list_type"

[[items]]
section = "ui"
name = "clonebundles"
default = true

[[items]]
section = "ui"
name = "color"
default = "auto"

[[items]]
section = "ui"
name = "commitsubrepos"
default = false

[[items]]
section = "ui"
name = "debug"
default = false

[[items]]
section = "ui"
name = "debugger"

[[items]]
section = "ui"
name = "detailed-exit-code"
default = false
experimental = true

[[items]]
section = "ui"
name = "editor"
default-type = "dynamic"

[[items]]
section = "ui"
name = "fallbackencoding"

[[items]]
section = "ui"
name = "forcecwd"

[[items]]
section = "ui"
name = "forcemerge"

[[items]]
section = "ui"
name = "formatdebug"
default = false

[[items]]
section = "ui"
name = "formatjson"
default = false

[[items]]
section = "ui"
name = "formatted"

[[items]]
section = "ui"
name = "interactive"

[[items]]
section = "ui"
name = "interface"

[[items]]
section = "ui"
name = "interface.chunkselector"

[[items]]
section = "ui"
name = "large-file-limit"
default = 10485760

[[items]]
section = "ui"
name = "logblockedtimes"
default = false

[[items]]
section = "ui"
name = "merge"

[[items]]
section = "ui"
name = "mergemarkers"
default = "basic"

[[items]]
section = "ui"
name = "message-output"
default = "stdio"

[[items]]
section = "ui"
name = "nontty"
default = false

[[items]]
section = "ui"
name = "origbackuppath"

[[items]]
section = "ui"
name = "paginate"
default = true

[[items]]
section = "ui"
name = "patch"

[[items]]
section = "ui"
name = "portablefilenames"
default = "warn"

[[items]]
section = "ui"
name = "promptecho"
default = false

[[items]]
section = "ui"
name = "quiet"
default = false

[[items]]
section = "ui"
name = "quietbookmarkmove"
default = false

[[items]]
section = "ui"
name = "relative-paths"
default = "legacy"

[[items]]
section = "ui"
name = "remotecmd"
default = "hg"

[[items]]
section = "ui"
name = "report_untrusted"
default = true

[[items]]
section = "ui"
name = "rollback"
default = true

[[items]]
section = "ui"
name = "signal-safe-lock"
default = true

[[items]]
section = "ui"
name = "slash"
default = false

[[items]]
section = "ui"
name = "ssh"
default = "ssh"

[[items]]
section = "ui"
name = "ssherrorhint"

[[items]]
section = "ui"
name = "statuscopies"
default = false

[[items]]
section = "ui"
name = "strict"
default = false

[[items]]
section = "ui"
name = "style"
default = ""

[[items]]
section = "ui"
name = "supportcontact"

[[items]]
section = "ui"
name = "textwidth"
default = 78

[[items]]
section = "ui"
name = "timeout"
default = "600"

[[items]]
section = "ui"
name = "timeout.warn"
default = 0

[[items]]
section = "ui"
name = "timestamp-output"
default = false

[[items]]
section = "ui"
name = "traceback"
default = false

[[items]]
section = "ui"
name = "tweakdefaults"
default = false

[[items]]
section = "ui"
name = "username"
alias = [["ui", "user"]]

[[items]]
section = "ui"
name = "verbose"
default = false

[[items]]
section = "usage"
name = "repository-role"
default = "default"
documentation = """What this repository is used for.

This is used to adjust behavior and performance to best fit the repository purpose.

Currently recognised values are:
- default: an all purpose repository
"""

[[items]]
section = "usage"
name = "resources"
default = "default"
documentation = """How aggressive Mercurial can be with resource usage:

Currently recognised values are:
- default: the default value currently is equivalent to medium,
- high:    allows for higher cpu, memory and disk-space usage to improve the performance of some operations.
- medium:  aims at a moderate resource usage,
- low:     reduces resources usage when possible, decreasing overall performance.

For finer configuration, see also `usage.resources.cpu`,
`usage.resources.disk` and `usage.resources.memory`.
"""

[[items]]
section = "usage"
name = "resources.cpu"
default = "default"
documentation = """How aggressive Mercurial can be in terms of cpu usage:

Currently recognised values are:
- default: the default value, inherits the value from `usage.resources`,
- high:    allows for more aggressive cpu usage, improving storage quality and
           the performance of some operations at the expense of machine load
- medium:  aims at a moderate cpu usage,
- low:     reduces cpu usage when possible, potentially at the expense of
           slower operations, increased storage and exchange payload.

"""

[[items]]
section = "usage"
name = "resources.disk"
default = "default"
documentation = """How aggressive Mercurial can be in terms of disk usage:

Currently recognised values are:
- default: the default value, inherits the value from `usage.resources`,
- high:    allows for more disk space usage where it can improve the performance,
- medium:  aims at a moderate disk usage,
- low:     reduces disk usage when possible, decreasing performance in some occasion.
"""

[[items]]
section = "usage"
name = "resources.memory"
default = "default"
documentation = """How aggressive Mercurial can be in terms of memory usage:

Currently recognised values are:
- default: the default value, inherits the value from `usage.resources`,
- high:    allows for more aggressive memory usage to improve overall performance,
- medium:  aims at a moderate memory usage,
- low:     reduces memory usage when possible at the cost of overall performance.
"""


[[items]]
section = "usage"
name = "resources.bandwidth"
default = "default"
documentation = """How aggressive Mercurial can be in terms of bandwidth usage:

Currently recognised values are:
- default: the default value, inherits the value from `usage.resources`,
- high:    allows for more aggressive bandwidth usage to improve overall performance,
- medium:  aims at a moderate bandwidth usage,
- low:     reduces bandwidth usage when possible at the cost of overall performance.
"""

[[items]]
section = "verify"
name = "skipflags"
default = 0

[[items]]
section = "web"
name = "accesslog"
default = "-"

[[items]]
section = "web"
name = "address"
default = ""

[[items]]
section = "web"
name = "allow-archive"
default-type = "list_type"
alias = [["web", "allow_archive"]]

[[items]]
section = "web"
name = "allow-pull"
default = true
alias = [["web", "allowpull"]]

[[items]]
section = "web"
name = "allow-push"
default-type = "list_type"
alias = [["web", "allow_push"]]

[[items]]
section = "web"
name = "allow_read"
default-type = "list_type"

[[items]]
section = "web"
name = "allowbz2"
default = false

[[items]]
section = "web"
name = "allowgz"
default = false

[[items]]
section = "web"
name = "allowzip"
default = false

[[items]]
section = "web"
name = "archivesubrepos"
default = false

[[items]]
section = "web"
name = "baseurl"

[[items]]
section = "web"
name = "cacerts"

[[items]]
section = "web"
name = "cache"
default = true

[[items]]
section = "web"
name = "certificate"

[[items]]
section = "web"
name = "collapse"
default = false

[[items]]
section = "web"
name = "comparisoncontext"
default = 5

[[items]]
section = "web"
name = "contact"

[[items]]
section = "web"
name = "csp"

[[items]]
section = "web"
name = "deny_push"
default-type = "list_type"

[[items]]
section = "web"
name = "deny_read"
default-type = "list_type"

[[items]]
section = "web"
name = "descend"
default = true

[[items]]
section = "web"
name = "description"
default = ""

[[items]]
section = "web"
name = "encoding"
default-type = "lazy_module"
default = "encoding.encoding"

[[items]]
section = "web"
name = "errorlog"
default = "-"

[[items]]
section = "web"
name = "guessmime"
default = false

[[items]]
section = "web"
name = "hidden"
default = false

[[items]]
section = "web"
name = "ipv6"
default = false

[[items]]
section = "web"
name = "labels"
default-type = "list_type"

[[items]]
section = "web"
name = "logoimg"
default = "hglogo.png"

[[items]]
section = "web"
name = "logourl"
default = "https://mercurial-scm.org/"

[[items]]
section = "web"
name = "maxchanges"
default = 10

[[items]]
section = "web"
name = "maxfiles"
default = 10

[[items]]
section = "web"
name = "maxshortchanges"
default = 60

[[items]]
section = "web"
name = "motd"
default = ""

[[items]]
section = "web"
name = "name"
default-type = "dynamic"

[[items]]
section = "web"
name = "port"
default = 8000

[[items]]
section = "web"
name = "prefix"
default = ""

[[items]]
section = "web"
name = "push_ssl"
default = true

[[items]]
section = "web"
name = "refreshinterval"
default = 20

[[items]]
section = "web"
name = "server-header"

[[items]]
section = "web"
name = "static"

[[items]]
section = "web"
name = "staticurl"

[[items]]
section = "web"
name = "stripes"
default = 1

[[items]]
section = "web"
name = "style"
default = "paper"

[[items]]
section = "web"
name = "templates"

[[items]]
section = "web"
name = "view"
default = "served"
experimental = true

[[items]]
section = "worker"
name = "backgroundclose"
default-type = "dynamic"

[[items]]
section = "worker"
name = "backgroundclosemaxqueue"
# Windows defaults to a limit of 512 open files. A buffer of 128
# should give us enough headway.
default = 384

[[items]]
section = "worker"
name = "backgroundcloseminfilecount"
default = 2048

[[items]]
section = "worker"
name = "backgroundclosethreadcount"
default = 4

[[items]]
section = "worker"
name = "enabled"
default = true

[[items]]
section = "worker"
name = "numcpus"


[[items]]
section = "worker"
name = "parallel-stream-bundle-processing"
default = false
documentation="""
Read, parse and write stream bundle in parallel speeding up the process.

Also see `worker.parallel-stream-bundle-processing.memory-target` to control
the memory usage of the buffers.

Also see `worker.parallel-stream-bundle-processing.num-writer` to control the
amount of concurrent writers.
"""

[[items]]
section = "worker"
name = "parallel-stream-bundle-processing.num-writer"
default = 0
documentation="""
Control the number of file being written concurrently when applying a stream
bundle.

When set to 0, the default, the value used depends on the value of the
`usage.resources.cpu` configuration:

- low:    1 writer
- medium: 4 writers (default)
- high:   8 writers
"""

[[items]]
section = "worker"
name = "parallel-stream-bundle-processing.memory-target"
default = 0
documentation="""Limit memory usage around this value. This is not a hard target a Mercurial will use a bit more, but this reduce the amount of buffered stream content that we read ahead.

If set to a negative value, the amount of memory used will not be restricted.

When set to 0, the default value depends on the value of the
`usage.resources.memory` configuration:

- low:    100 MB
- medium: 500 MB (default)
- high:     2 GB
"""


# Templates and template applications

[[template-applications]]
template = "diff-options"
section = "annotate"

[[template-applications]]
template = "diff-options"
section = "commands"
prefix = "commit.interactive"

[[template-applications]]
template = "diff-options"
section = "commands"
prefix = "revert.interactive"

[[template-applications]]
template = "diff-options"
section = "diff"

[templates]
[[templates.diff-options]]
suffix = "nodates"
default = false

[[templates.diff-options]]
suffix = "showfunc"
default = false

[[templates.diff-options]]
suffix = "unified"

[[templates.diff-options]]
suffix = "git"
default = false

[[templates.diff-options]]
suffix = "ignorews"
default = false

[[templates.diff-options]]
suffix = "ignorewsamount"
default = false

[[templates.diff-options]]
suffix = "ignoreblanklines"
default = false

[[templates.diff-options]]
suffix = "ignorewseol"
default = false

[[templates.diff-options]]
suffix = "nobinary"
default = false

[[templates.diff-options]]
suffix = "noprefix"
default = false

[[templates.diff-options]]
suffix = "word-diff"
default = false

# In-core extensions

[[items]]
section = "blackbox"
name = "debug.to-stderr"
default = false
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "dirty"
default = false
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "maxsize"
default = "1 MB"
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "logsource"
default = false
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "maxfiles"
default = 7
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "track"
default-type = "lambda"
default = ["*"]
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "ignore"
default-type = "lambda"
default = ["chgserver", "cmdserver", "extension"]
in_core_extension = "blackbox"

[[items]]
section = "blackbox"
name = "date-format"
default = ""
in_core_extension = "blackbox"
