The share-safe functionality is complete and all configuration options are
implemented. The behavior is well discussed on mailing list and in reviews.
Let's unmark this as experimental to solve a chichen and egg issue.
The share-safe functionality is complete and all configuration options are
implemented. The behavior is well discussed on mailing list and in reviews.
Let's unmark this as experimental to solve a chichen and egg issue.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
This looks good. The documentation could be a bit better. However this can be dealt with during the freeze. So lets focus on the implementation/behavior side for now.
Path | Packages | |||
---|---|---|---|---|
M | mercurial/configitems.py (3 lines) | |||
M | mercurial/helptext/config.txt (6 lines) | |||
M | mercurial/helptext/internals/requirements.txt (6 lines) | |||
M | mercurial/localrepo.py (4 lines) | |||
M | mercurial/requirements.py (2 lines) | |||
M | mercurial/upgrade_utils/actions.py (2 lines) | |||
M | tests/test-copies-chain-merge.t (2 lines) | |||
M | tests/test-copies-in-changeset.t (10 lines) | |||
M | tests/test-help.t (2 lines) | |||
M | tests/test-persistent-nodemap.t (6 lines) | |||
M | tests/test-share-bookmarks.t (4 lines) | |||
M | tests/test-share-safe.t (40 lines) | |||
M | tests/test-share.t (4 lines) | |||
M | tests/test-sidedata.t (8 lines) | |||
M | tests/test-upgrade-repo.t (30 lines) |
coreconfigitem( | coreconfigitem( | ||||
b'format', | b'format', | ||||
b'exp-use-side-data', | b'exp-use-side-data', | ||||
default=False, | default=False, | ||||
experimental=True, | experimental=True, | ||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
b'format', | b'format', | ||||
b'exp-share-safe', | b'use-share-safe', | ||||
default=False, | default=False, | ||||
experimental=True, | |||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
b'format', | b'format', | ||||
b'internal-phase', | b'internal-phase', | ||||
default=False, | default=False, | ||||
experimental=True, | experimental=True, | ||||
) | ) | ||||
coreconfigitem( | coreconfigitem( |
Such version will by default refuse to access such repositories. That | Such version will by default refuse to access such repositories. That | ||||
behavior can be controlled by configuration. Check | behavior can be controlled by configuration. Check | ||||
:hg:`help config.storage.revlog.persistent-nodemap.slowpath` for details. | :hg:`help config.storage.revlog.persistent-nodemap.slowpath` for details. | ||||
Repository with this on-disk format require Mercurial version 5.4 or above. | Repository with this on-disk format require Mercurial version 5.4 or above. | ||||
Disabled by default. | Disabled by default. | ||||
``use-share-safe`` | |||||
Enable or disable the "share-safe" functionality, which enables shares | |||||
to read requirements and configuration of its source repository. | |||||
Disabled by default. | |||||
``usestore`` | ``usestore`` | ||||
Enable or disable the "store" repository format which improves | Enable or disable the "store" repository format which improves | ||||
compatibility with systems that fold case or otherwise mangle | compatibility with systems that fold case or otherwise mangle | ||||
filenames. Disabling this option will allow you to store longer filenames | filenames. Disabling this option will allow you to store longer filenames | ||||
in some situations at the expense of compatibility. | in some situations at the expense of compatibility. | ||||
Repositories with this on-disk format require Mercurial version 0.9.4. | Repositories with this on-disk format require Mercurial version 0.9.4. | ||||
Support for this requirement was added in Mercurial 5.5 (released August 2020). | Support for this requirement was added in Mercurial 5.5 (released August 2020). | ||||
Note that as of 5.5, only installations compiled with the Rust extension will | Note that as of 5.5, only installations compiled with the Rust extension will | ||||
benefit from a speedup. The other installations will do the necessary work to | benefit from a speedup. The other installations will do the necessary work to | ||||
keep the index up to date, but will suffer a slowdown. | keep the index up to date, but will suffer a slowdown. | ||||
exp-sharesafe | exp-sharesafe | ||||
============= | ============= | ||||
NOTE: This requirement is for internal development only. The semantics are not | |||||
frozed yet, the feature is experimental. It's not advised to use it for any | |||||
production repository yet. | |||||
Represents that the repository can be shared safely. Requirements and config of | Represents that the repository can be shared safely. Requirements and config of | ||||
the source repository will be shared. | the source repository will be shared. | ||||
Requirements are stored in ``.hg/store`` instead of directly in ``.hg/`` where | Requirements are stored in ``.hg/store`` instead of directly in ``.hg/`` where | ||||
they used to be stored. Some working copy related requirements are still stored | they used to be stored. Some working copy related requirements are still stored | ||||
in ``.hg/``. | in ``.hg/``. | ||||
Shares read the ``.hg/hgrc`` of the source repository. | Shares read the ``.hg/hgrc`` of the source repository. | ||||
Support for this requirement was added in Mercurial 5.7 (released | Support for this requirement was added in Mercurial 5.7 (released | ||||
February 2021). The requirement will only be present on repositories that have | February 2021). The requirement will only be present on repositories that have | ||||
opted in to this format (by having ``format.exp-share-safe=true`` set when | opted in to this format (by having ``format.use-share-safe=true`` set when | ||||
they were created). | they were created). |
if ui.configbool(b'format', b'bookmarks-in-store'): | if ui.configbool(b'format', b'bookmarks-in-store'): | ||||
requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT) | requirements.add(bookmarks.BOOKMARKS_IN_STORE_REQUIREMENT) | ||||
if ui.configbool(b'format', b'use-persistent-nodemap'): | if ui.configbool(b'format', b'use-persistent-nodemap'): | ||||
requirements.add(requirementsmod.NODEMAP_REQUIREMENT) | requirements.add(requirementsmod.NODEMAP_REQUIREMENT) | ||||
# if share-safe is enabled, let's create the new repository with the new | # if share-safe is enabled, let's create the new repository with the new | ||||
# requirement | # requirement | ||||
if ui.configbool(b'format', b'exp-share-safe'): | if ui.configbool(b'format', b'use-share-safe'): | ||||
requirements.add(requirementsmod.SHARESAFE_REQUIREMENT) | requirements.add(requirementsmod.SHARESAFE_REQUIREMENT) | ||||
return requirements | return requirements | ||||
def checkrequirementscompat(ui, requirements): | def checkrequirementscompat(ui, requirements): | ||||
"""Checks compatibility of repository requirements enabled and disabled. | """Checks compatibility of repository requirements enabled and disabled. | ||||
b"cannot create shared repository as source was created" | b"cannot create shared repository as source was created" | ||||
b" with 'format.usestore' config disabled" | b" with 'format.usestore' config disabled" | ||||
) | ) | ||||
) | ) | ||||
if requirementsmod.SHARESAFE_REQUIREMENT in requirements: | if requirementsmod.SHARESAFE_REQUIREMENT in requirements: | ||||
ui.warn( | ui.warn( | ||||
_( | _( | ||||
b"ignoring enabled 'format.exp-share-safe' config because " | b"ignoring enabled 'format.use-share-safe' config because " | ||||
b"it is incompatible with disabled 'format.usestore'" | b"it is incompatible with disabled 'format.usestore'" | ||||
b" config\n" | b" config\n" | ||||
) | ) | ||||
) | ) | ||||
dropped.add(requirementsmod.SHARESAFE_REQUIREMENT) | dropped.add(requirementsmod.SHARESAFE_REQUIREMENT) | ||||
return dropped | return dropped | ||||
# Denotes that current repository is a share and the shared source path is | # Denotes that current repository is a share and the shared source path is | ||||
# relative to the current repository root path | # relative to the current repository root path | ||||
RELATIVE_SHARED_REQUIREMENT = b'relshared' | RELATIVE_SHARED_REQUIREMENT = b'relshared' | ||||
# A repository with share implemented safely. The repository has different | # A repository with share implemented safely. The repository has different | ||||
# store and working copy requirements i.e. both `.hg/requires` and | # store and working copy requirements i.e. both `.hg/requires` and | ||||
# `.hg/store/requires` are present. | # `.hg/store/requires` are present. | ||||
SHARESAFE_REQUIREMENT = b'exp-sharesafe' | SHARESAFE_REQUIREMENT = b'share-safe' | ||||
# List of requirements which are working directory specific | # List of requirements which are working directory specific | ||||
# These requirements cannot be shared between repositories if they | # These requirements cannot be shared between repositories if they | ||||
# share the same store | # share the same store | ||||
# * sparse is a working directory specific functionality and hence working | # * sparse is a working directory specific functionality and hence working | ||||
# directory specific requirement | # directory specific requirement | ||||
# * SHARED_REQUIREMENT and RELATIVE_SHARED_REQUIREMENT are requirements which | # * SHARED_REQUIREMENT and RELATIVE_SHARED_REQUIREMENT are requirements which | ||||
# represents that the current working copy/repository shares store of another | # represents that the current working copy/repository shares store of another |
b'storage model should require less network and ' | b'storage model should require less network and ' | ||||
b'CPU resources, making "hg push" and "hg pull" ' | b'CPU resources, making "hg push" and "hg pull" ' | ||||
b'faster' | b'faster' | ||||
) | ) | ||||
@registerformatvariant | @registerformatvariant | ||||
class sharesafe(requirementformatvariant): | class sharesafe(requirementformatvariant): | ||||
name = b'exp-sharesafe' | name = b'share-safe' | ||||
_requirement = requirements.SHARESAFE_REQUIREMENT | _requirement = requirements.SHARESAFE_REQUIREMENT | ||||
default = False | default = False | ||||
description = _( | description = _( | ||||
b'old shared repositories do not share source repository ' | b'old shared repositories do not share source repository ' | ||||
b'requirements and config. This leads to various problems ' | b'requirements and config. This leads to various problems ' | ||||
b'when the source repository format is upgraded or some new ' | b'when the source repository format is upgraded or some new ' |
> exp-use-side-data = yes | > exp-use-side-data = yes | ||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> EOF | > EOF | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no yes no | sidedata: no yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no yes no | copies-sdc: no yes no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: * (glob) | compression: * (glob) | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo --run --quiet | $ hg debugupgraderepo --run --quiet |
$ hg init repo | $ hg init repo | ||||
$ cd repo | $ cd repo | ||||
#if sidedata | #if sidedata | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes yes no | sidedata: yes yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: yes yes no | copies-sdc: yes yes no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
#else | #else | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
#endif | #endif | ||||
downgrading (keeping some sidedata) | downgrading (keeping some sidedata) | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes yes no | sidedata: yes yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: yes yes no | copies-sdc: yes yes no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugsidedata -c -- 0 | $ hg debugsidedata -c -- 0 | ||||
> exp-use-copies-side-data-changeset = no | > exp-use-copies-side-data-changeset = no | ||||
> EOF | > EOF | ||||
$ hg debugupgraderepo --run --quiet --no-backup > /dev/null | $ hg debugupgraderepo --run --quiet --no-backup > /dev/null | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes yes no | sidedata: yes yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugsidedata -c -- 0 | $ hg debugsidedata -c -- 0 | ||||
> exp-use-copies-side-data-changeset = yes | > exp-use-copies-side-data-changeset = yes | ||||
> EOF | > EOF | ||||
$ hg debugupgraderepo --run --quiet --no-backup > /dev/null | $ hg debugupgraderepo --run --quiet --no-backup > /dev/null | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes yes no | sidedata: yes yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: yes yes no | copies-sdc: yes yes no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugsidedata -c -- 0 | $ hg debugsidedata -c -- 0 |
"usegeneraldelta" | "usegeneraldelta" | ||||
"dotencode" | "dotencode" | ||||
"usefncache" | "usefncache" | ||||
"use-persistent-nodemap" | "use-persistent-nodemap" | ||||
"use-share-safe" | |||||
"usestore" | "usestore" | ||||
"sparse-revlog" | "sparse-revlog" | ||||
"revlog-compression" | "revlog-compression" | ||||
"bookmarks-in-store" | "bookmarks-in-store" | ||||
#endif | #endif | ||||
$ hg debugformat | $ hg debugformat | ||||
format-variant repo | format-variant repo | ||||
fncache: yes | fncache: yes | ||||
dotencode: yes | dotencode: yes | ||||
generaldelta: yes | generaldelta: yes | ||||
exp-sharesafe: no | share-safe: no | ||||
sparserevlog: yes | sparserevlog: yes | ||||
sidedata: no | sidedata: no | ||||
persistent-nodemap: yes | persistent-nodemap: yes | ||||
copies-sdc: no | copies-sdc: no | ||||
plain-cl-delta: yes | plain-cl-delta: yes | ||||
compression: zlib | compression: zlib | ||||
compression-level: default | compression-level: default | ||||
$ hg debugbuilddag .+5000 --new-file | $ hg debugbuilddag .+5000 --new-file | ||||
> [format] | > [format] | ||||
> use-persistent-nodemap=no | > use-persistent-nodemap=no | ||||
> EOF | > EOF | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: yes no no | persistent-nodemap: yes no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo --run --no-backup --quiet | $ hg debugupgraderepo --run --no-backup --quiet | ||||
> [format] | > [format] | ||||
> use-persistent-nodemap=yes | > use-persistent-nodemap=yes | ||||
> EOF | > EOF | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no yes no | persistent-nodemap: no yes no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo --run --no-backup --quiet | $ hg debugupgraderepo --run --no-backup --quiet |
#testcases vfs svfs | #testcases vfs svfs | ||||
#testcases safe normal | #testcases safe normal | ||||
#if safe | #if safe | ||||
$ echo "[format]" >> $HGRCPATH | $ echo "[format]" >> $HGRCPATH | ||||
$ echo "exp-share-safe = True" >> $HGRCPATH | $ echo "use-share-safe = True" >> $HGRCPATH | ||||
#endif | #endif | ||||
$ echo "[extensions]" >> $HGRCPATH | $ echo "[extensions]" >> $HGRCPATH | ||||
$ echo "share = " >> $HGRCPATH | $ echo "share = " >> $HGRCPATH | ||||
#if svfs | #if svfs | ||||
$ echo "[format]" >> $HGRCPATH | $ echo "[format]" >> $HGRCPATH | ||||
$ echo "bookmarks-in-store = yes " >> $HGRCPATH | $ echo "bookmarks-in-store = yes " >> $HGRCPATH | ||||
bm3 4:62f4ded848e4 | bm3 4:62f4ded848e4 | ||||
bm4 5:92793bfc8cad | bm4 5:92793bfc8cad | ||||
$ cd .. | $ cd .. | ||||
Test that if store is disabled, we drop the bookmarksinstore requirement | Test that if store is disabled, we drop the bookmarksinstore requirement | ||||
$ hg init brokenrepo --config format.bookmarks-in-store=True --config format.usestore=false | $ hg init brokenrepo --config format.bookmarks-in-store=True --config format.usestore=false | ||||
ignoring enabled 'format.bookmarks-in-store' config beacuse it is incompatible with disabled 'format.usestore' config | ignoring enabled 'format.bookmarks-in-store' config beacuse it is incompatible with disabled 'format.usestore' config | ||||
ignoring enabled 'format.exp-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) | ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) |
setup | setup | ||||
$ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
> [extensions] | > [extensions] | ||||
> share = | > share = | ||||
> [format] | > [format] | ||||
> exp-share-safe = True | > use-share-safe = True | ||||
> [storage] | > [storage] | ||||
> revlog.persistent-nodemap.slow-path=allow | > revlog.persistent-nodemap.slow-path=allow | ||||
> EOF | > EOF | ||||
prepare source repo | prepare source repo | ||||
$ hg init source | $ hg init source | ||||
$ cd source | $ cd source | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
exp-sharesafe | share-safe | ||||
$ cat .hg/store/requires | $ cat .hg/store/requires | ||||
dotencode | dotencode | ||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ hg debugrequirements | $ hg debugrequirements | ||||
dotencode | dotencode | ||||
exp-sharesafe | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
share-safe | |||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ echo a > a | $ echo a > a | ||||
$ hg ci -Aqm "added a" | $ hg ci -Aqm "added a" | ||||
$ echo b > b | $ echo b > b | ||||
$ hg ci -Aqm "added b" | $ hg ci -Aqm "added b" | ||||
$ HGEDITOR=cat hg config --shared | $ HGEDITOR=cat hg config --shared | ||||
abort: repository is not shared; can't use --shared | abort: repository is not shared; can't use --shared | ||||
[10] | [10] | ||||
$ cd .. | $ cd .. | ||||
Create a shared repo and check the requirements are shared and read correctly | Create a shared repo and check the requirements are shared and read correctly | ||||
$ hg share source shared1 | $ hg share source shared1 | ||||
updating working directory | updating working directory | ||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
$ cd shared1 | $ cd shared1 | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
exp-sharesafe | share-safe | ||||
shared | shared | ||||
$ hg debugrequirements -R ../source | $ hg debugrequirements -R ../source | ||||
dotencode | dotencode | ||||
exp-sharesafe | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
share-safe | |||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ hg debugrequirements | $ hg debugrequirements | ||||
dotencode | dotencode | ||||
exp-sharesafe | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
share-safe | |||||
shared | shared | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ echo c > c | $ echo c > c | ||||
$ hg ci -Aqm "added c" | $ hg ci -Aqm "added c" | ||||
Check that config of the source repository is also loaded | Check that config of the source repository is also loaded | ||||
#if zstd | #if zstd | ||||
$ echo "[format]" >> .hg/hgrc | $ echo "[format]" >> .hg/hgrc | ||||
$ echo "revlog-compression=zstd" >> .hg/hgrc | $ echo "revlog-compression=zstd" >> .hg/hgrc | ||||
$ hg debugupgraderepo --run -q | $ hg debugupgraderepo --run -q | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store | ||||
added: revlog-compression-zstd | added: revlog-compression-zstd | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg log -r . | $ hg log -r . | ||||
$ hg debugupgraderepo --run -q -R ../shared1 | $ hg debugupgraderepo --run -q -R ../shared1 | ||||
abort: cannot upgrade repository; unsupported source requirement: shared | abort: cannot upgrade repository; unsupported source requirement: shared | ||||
[255] | [255] | ||||
$ hg debugupgraderepo --run -q | $ hg debugupgraderepo --run -q | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store (no-zstd !) | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd !) | ||||
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (zstd !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd !) | ||||
added: persistent-nodemap | added: persistent-nodemap | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg log -r . | $ hg log -r . | ||||
$ hg showconfig ui.curses -R ../shared1 | $ hg showconfig ui.curses -R ../shared1 | ||||
false | false | ||||
$ cd ../ | $ cd ../ | ||||
Test that upgrading using debugupgraderepo works | Test that upgrading using debugupgraderepo works | ||||
================================================= | ================================================= | ||||
$ hg init non-share-safe --config format.exp-share-safe=false | $ hg init non-share-safe --config format.use-share-safe=false | ||||
$ cd non-share-safe | $ cd non-share-safe | ||||
$ hg debugrequirements | $ hg debugrequirements | ||||
dotencode | dotencode | ||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
store | store | ||||
$ cd non-share-safe | $ cd non-share-safe | ||||
Upgrade | Upgrade | ||||
$ hg debugupgraderepo -q | $ hg debugupgraderepo -q | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
added: exp-sharesafe | added: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugupgraderepo --run -q | $ hg debugupgraderepo --run -q | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
added: exp-sharesafe | added: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. | repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. | ||||
$ hg debugrequirements | $ hg debugrequirements | ||||
dotencode | dotencode | ||||
exp-sharesafe | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
share-safe | |||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
exp-sharesafe | share-safe | ||||
$ cat .hg/store/requires | $ cat .hg/store/requires | ||||
dotencode | dotencode | ||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ cd ../non-share-safe | $ cd ../non-share-safe | ||||
Test that downgrading works too | Test that downgrading works too | ||||
$ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
> [extensions] | > [extensions] | ||||
> share = | > share = | ||||
> [format] | > [format] | ||||
> exp-share-safe = False | > use-share-safe = False | ||||
> EOF | > EOF | ||||
$ hg debugupgraderepo -q | $ hg debugupgraderepo -q | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
removed: exp-sharesafe | removed: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugupgraderepo -q --run | $ hg debugupgraderepo -q --run | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
removed: exp-sharesafe | removed: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
repository downgraded to not use share safe mode, existing shares will not work and needs to be reshared. | repository downgraded to not use share safe mode, existing shares will not work and needs to be reshared. | ||||
@ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar | @ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar | ||||
| | | | ||||
o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo | o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo | ||||
Testing automatic upgrade of shares when config is set | Testing automatic upgrade of shares when config is set | ||||
$ hg debugupgraderepo -q --run --config format.exp-share-safe=True | $ hg debugupgraderepo -q --run --config format.use-share-safe=True | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store | ||||
added: exp-sharesafe | added: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. | repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. | ||||
$ hg debugrequirements | $ hg debugrequirements | ||||
dotencode | dotencode | ||||
exp-sharesafe | |||||
fncache | fncache | ||||
generaldelta | generaldelta | ||||
revlogv1 | revlogv1 | ||||
share-safe | |||||
sparserevlog | sparserevlog | ||||
store | store | ||||
$ hg log -GT "{node}: {desc}\n" -R ../nss-share | $ hg log -GT "{node}: {desc}\n" -R ../nss-share | ||||
abort: version mismatch: source uses share-safe functionality while the current share does not | abort: version mismatch: source uses share-safe functionality while the current share does not | ||||
[255] | [255] | ||||
Check that if lock is taken, upgrade fails but read operation are successful | Check that if lock is taken, upgrade fails but read operation are successful | ||||
$ hg log -GT "{node}: {desc}\n" -R ../nss-share --config share.safe-mismatch.source-safe=upgra | $ hg log -GT "{node}: {desc}\n" -R ../nss-share --config share.safe-mismatch.source-safe=upgra |
#testcases safe normal | #testcases safe normal | ||||
#if safe | #if safe | ||||
$ echo "[format]" >> $HGRCPATH | $ echo "[format]" >> $HGRCPATH | ||||
$ echo "exp-share-safe = True" >> $HGRCPATH | $ echo "use-share-safe = True" >> $HGRCPATH | ||||
#endif | #endif | ||||
$ echo "[extensions]" >> $HGRCPATH | $ echo "[extensions]" >> $HGRCPATH | ||||
$ echo "share = " >> $HGRCPATH | $ echo "share = " >> $HGRCPATH | ||||
prepare repo1 | prepare repo1 | ||||
$ hg init repo1 | $ hg init repo1 | ||||
Explicitly kill daemons to let the test exit on Windows | Explicitly kill daemons to let the test exit on Windows | ||||
$ killdaemons.py | $ killdaemons.py | ||||
Test sharing a repository which was created with store requirement disable | Test sharing a repository which was created with store requirement disable | ||||
$ hg init nostore --config format.usestore=false | $ hg init nostore --config format.usestore=false | ||||
ignoring enabled 'format.exp-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) | ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) | ||||
$ hg share nostore sharednostore | $ hg share nostore sharednostore | ||||
abort: cannot create shared repository as source was created with 'format.usestore' config disabled | abort: cannot create shared repository as source was created with 'format.usestore' config disabled | ||||
[255] | [255] |
------------------------------------- | ------------------------------------- | ||||
$ hg init up-no-side-data --config format.exp-use-side-data=no | $ hg init up-no-side-data --config format.exp-use-side-data=no | ||||
$ hg debugformat -v -R up-no-side-data | $ hg debugformat -v -R up-no-side-data | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugformat -v -R up-no-side-data --config format.exp-use-side-data=yes | $ hg debugformat -v -R up-no-side-data --config format.exp-use-side-data=yes | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no yes no | sidedata: no yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo -R up-no-side-data --config format.exp-use-side-data=yes > /dev/null | $ hg debugupgraderepo -R up-no-side-data --config format.exp-use-side-data=yes > /dev/null | ||||
Check that we can downgrade from sidedata | Check that we can downgrade from sidedata | ||||
----------------------------------------- | ----------------------------------------- | ||||
$ hg init up-side-data --config format.exp-use-side-data=yes | $ hg init up-side-data --config format.exp-use-side-data=yes | ||||
$ hg debugformat -v -R up-side-data | $ hg debugformat -v -R up-side-data | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes no no | sidedata: yes no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugformat -v -R up-side-data --config format.exp-use-side-data=no | $ hg debugformat -v -R up-side-data --config format.exp-use-side-data=no | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes no no | sidedata: yes no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo -R up-side-data --config format.exp-use-side-data=no > /dev/null | $ hg debugupgraderepo -R up-side-data --config format.exp-use-side-data=no > /dev/null |
$ hg init empty | $ hg init empty | ||||
$ cd empty | $ cd empty | ||||
$ hg debugformat | $ hg debugformat | ||||
format-variant repo | format-variant repo | ||||
fncache: yes | fncache: yes | ||||
dotencode: yes | dotencode: yes | ||||
generaldelta: yes | generaldelta: yes | ||||
exp-sharesafe: no | share-safe: no | ||||
sparserevlog: yes | sparserevlog: yes | ||||
sidedata: no | sidedata: no | ||||
persistent-nodemap: no | persistent-nodemap: no | ||||
copies-sdc: no | copies-sdc: no | ||||
plain-cl-delta: yes | plain-cl-delta: yes | ||||
compression: zlib | compression: zlib | ||||
compression-level: default | compression-level: default | ||||
$ hg debugformat --verbose | $ hg debugformat --verbose | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugformat --verbose --config format.usefncache=no | $ hg debugformat --verbose --config format.usefncache=no | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes no yes | fncache: yes no yes | ||||
dotencode: yes no yes | dotencode: yes no yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugformat --verbose --config format.usefncache=no --color=debug | $ hg debugformat --verbose --config format.usefncache=no --color=debug | ||||
format-variant repo config default | format-variant repo config default | ||||
[formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | ||||
[formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|exp-sharesafe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | ||||
[formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | ||||
$ hg debugformat -Tjson | $ hg debugformat -Tjson | ||||
"config": true, | "config": true, | ||||
"default": true, | "default": true, | ||||
"name": "generaldelta", | "name": "generaldelta", | ||||
"repo": true | "repo": true | ||||
}, | }, | ||||
{ | { | ||||
"config": false, | "config": false, | ||||
"default": false, | "default": false, | ||||
"name": "exp-sharesafe", | "name": "share-safe", | ||||
"repo": false | "repo": false | ||||
}, | }, | ||||
{ | { | ||||
"config": true, | "config": true, | ||||
"default": true, | "default": true, | ||||
"name": "sparserevlog", | "name": "sparserevlog", | ||||
"repo": true | "repo": true | ||||
}, | }, | ||||
> store | > store | ||||
> EOF | > EOF | ||||
$ hg debugformat | $ hg debugformat | ||||
format-variant repo | format-variant repo | ||||
fncache: no | fncache: no | ||||
dotencode: no | dotencode: no | ||||
generaldelta: no | generaldelta: no | ||||
exp-sharesafe: no | share-safe: no | ||||
sparserevlog: no | sparserevlog: no | ||||
sidedata: no | sidedata: no | ||||
persistent-nodemap: no | persistent-nodemap: no | ||||
copies-sdc: no | copies-sdc: no | ||||
plain-cl-delta: yes | plain-cl-delta: yes | ||||
compression: zlib | compression: zlib | ||||
compression-level: default | compression-level: default | ||||
$ hg debugformat --verbose | $ hg debugformat --verbose | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: no yes yes | fncache: no yes yes | ||||
dotencode: no yes yes | dotencode: no yes yes | ||||
generaldelta: no yes yes | generaldelta: no yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: no yes yes | sparserevlog: no yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugformat --verbose --config format.usegeneraldelta=no | $ hg debugformat --verbose --config format.usegeneraldelta=no | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: no yes yes | fncache: no yes yes | ||||
dotencode: no yes yes | dotencode: no yes yes | ||||
generaldelta: no no yes | generaldelta: no no yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: no no yes | sparserevlog: no no yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | ||||
format-variant repo config default | format-variant repo config default | ||||
[formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|exp-sharesafe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|sidedata: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | ||||
[formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | ||||
[formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | ||||
[formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | ||||
$ hg debugupgraderepo | $ hg debugupgraderepo | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zstd zlib zlib | compression: zstd zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib | compression: zlib zlib zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zstd zstd zlib | compression: zstd zstd zlib | ||||
compression-level: default default default | compression-level: default default default | ||||
$ cat .hg/requires | $ cat .hg/requires | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes no no | sidedata: yes no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zlib (zstd !) | compression: zstd zstd zlib (zstd !) | ||||
compression-level: default default default | compression-level: default default default | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: no no no | sidedata: no no no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zlib (zstd !) | compression: zstd zstd zlib (zstd !) | ||||
compression-level: default default default | compression-level: default default default | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugformat -v | $ hg debugformat -v | ||||
format-variant repo config default | format-variant repo config default | ||||
fncache: yes yes yes | fncache: yes yes yes | ||||
dotencode: yes yes yes | dotencode: yes yes yes | ||||
generaldelta: yes yes yes | generaldelta: yes yes yes | ||||
exp-sharesafe: no no no | share-safe: no no no | ||||
sparserevlog: yes yes yes | sparserevlog: yes yes yes | ||||
sidedata: yes yes no | sidedata: yes yes no | ||||
persistent-nodemap: no no no | persistent-nodemap: no no no | ||||
copies-sdc: no no no | copies-sdc: no no no | ||||
plain-cl-delta: yes yes yes | plain-cl-delta: yes yes yes | ||||
compression: zlib zlib zlib (no-zstd !) | compression: zlib zlib zlib (no-zstd !) | ||||
compression: zstd zstd zlib (zstd !) | compression: zstd zstd zlib (zstd !) | ||||
compression-level: default default default | compression-level: default default default |