The rename of the old experimental name was overlooked before the 6.0 release.
We rename everything to use the new name (and keep the released name as an alias
for compatibility).
( )
Alphare |
hg-reviewers |
The rename of the old experimental name was overlooked before the 6.0 release.
We rename everything to use the new name (and keep the released name as an alias
for compatibility).
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/configitems.py (5 lines) | |||
M | mercurial/helptext/config.txt (4 lines) | |||
M | mercurial/helptext/internals/dirstate-v2.txt (10 lines) | |||
M | mercurial/helptext/rust.txt (2 lines) | |||
M | mercurial/localrepo.py (6 lines) | |||
M | tests/test-basic.t (2 lines) | |||
M | tests/test-commandserver.t (2 lines) | |||
M | tests/test-dirstate-race.t (2 lines) | |||
M | tests/test-dirstate-race2.t (2 lines) | |||
M | tests/test-dirstate.t (2 lines) | |||
M | tests/test-help.t (2 lines) | |||
M | tests/test-hgignore.t (2 lines) | |||
M | tests/test-permissions.t (2 lines) | |||
M | tests/test-persistent-nodemap.t (6 lines) | |||
M | tests/test-purge.t (2 lines) | |||
M | tests/test-share-safe.t (16 lines) | |||
M | tests/test-status.t (2 lines) | |||
M | tests/test-stream-bundle-v2.t (4 lines) | |||
M | tests/test-symlinks.t (2 lines) | |||
M | tests/test-upgrade-repo.t (10 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
6a2244017535 | 2b271cab2d1c | Pierre-Yves David | Feb 1 2022, 10:36 AM |
b'chunkcachesize', | b'chunkcachesize', | ||||
default=None, | default=None, | ||||
experimental=True, | experimental=True, | ||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
# Enable this dirstate format *when creating a new repository*. | # Enable this dirstate format *when creating a new repository*. | ||||
# Which format to use for existing repos is controlled by .hg/requires | # Which format to use for existing repos is controlled by .hg/requires | ||||
b'format', | b'format', | ||||
b'exp-rc-dirstate-v2', | b'use-dirstate-v2', | ||||
default=False, | default=False, | ||||
experimental=True, | experimental=True, | ||||
alias=[(b'format', b'exp-rc-dirstate-v2')], | |||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
b'format', | b'format', | ||||
b'dotencode', | b'dotencode', | ||||
default=True, | default=True, | ||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
b'format', | b'format', | ||||
default=False, | default=False, | ||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
b'rewrite', | b'rewrite', | ||||
b'empty-successor', | b'empty-successor', | ||||
default=b'skip', | default=b'skip', | ||||
experimental=True, | experimental=True, | ||||
) | ) | ||||
# experimental as long as format.exp-rc-dirstate-v2 is. | # experimental as long as format.use-dirstate-v2 is. | ||||
coreconfigitem( | coreconfigitem( | ||||
b'storage', | b'storage', | ||||
b'dirstate-v2.slow-path', | b'dirstate-v2.slow-path', | ||||
default=b"abort", | default=b"abort", | ||||
experimental=True, | experimental=True, | ||||
) | ) | ||||
coreconfigitem( | coreconfigitem( | ||||
b'storage', | b'storage', |
the "store" repository format (which has to be enabled to use | the "store" repository format (which has to be enabled to use | ||||
fncache) to allow longer filenames and avoids using Windows | fncache) to allow longer filenames and avoids using Windows | ||||
reserved names, e.g. "nul". | reserved names, e.g. "nul". | ||||
Repositories with this on-disk format require Mercurial version 1.1. | Repositories with this on-disk format require Mercurial version 1.1. | ||||
Enabled by default. | Enabled by default. | ||||
``exp-rc-dirstate-v2`` | ``use-dirstate-v2`` | ||||
Enable or disable the experimental "dirstate-v2" feature. The dirstate | Enable or disable the experimental "dirstate-v2" feature. The dirstate | ||||
functionality is shared by all commands interacting with the working copy. | functionality is shared by all commands interacting with the working copy. | ||||
The new version is more robust, faster and stores more information. | The new version is more robust, faster and stores more information. | ||||
The performance-improving version of this feature is currently only | The performance-improving version of this feature is currently only | ||||
implemented in Rust (see :hg:`help rust`), so people not using a version of | implemented in Rust (see :hg:`help rust`), so people not using a version of | ||||
Mercurial compiled with the Rust parts might actually suffer some slowdown. | Mercurial compiled with the Rust parts might actually suffer some slowdown. | ||||
For this reason, such versions will by default refuse to access repositories | For this reason, such versions will by default refuse to access repositories | ||||
with "dirstate-v2" enabled. | with "dirstate-v2" enabled. | ||||
This behavior can be adjusted via configuration: check | This behavior can be adjusted via configuration: check | ||||
:hg:`help config.storage.dirstate-v2.slow-path` for details. | :hg:`help config.storage.dirstate-v2.slow-path` for details. | ||||
Repositories with this on-disk format require Mercurial 6.0 or above. | Repositories with this on-disk format require Mercurial 6.0 or above. | ||||
By default this format variant is disabled if the fast implementation is not | By default this format variant is disabled if the fast implementation is not | ||||
available, and enabled by default if the fast implementation is available. | available, and enabled by default if the fast implementation is available. | ||||
To accomodate installations of Mercurial without the fast implementation, | To accomodate installations of Mercurial without the fast implementation, | ||||
you can downgrade your repository. To do so run the following command: | you can downgrade your repository. To do so run the following command: | ||||
$ hg debugupgraderepo \ | $ hg debugupgraderepo \ | ||||
--run \ | --run \ | ||||
--config format.exp-rc-dirstate-v2=False \ | --config format.use-dirstate-v2=False \ | ||||
--config storage.dirstate-v2.slow-path=allow | --config storage.dirstate-v2.slow-path=allow | ||||
For a more comprehensive guide, see :hg:`help internals.dirstate-v2`. | For a more comprehensive guide, see :hg:`help internals.dirstate-v2`. | ||||
``use-persistent-nodemap`` | ``use-persistent-nodemap`` | ||||
Enable or disable the "persistent-nodemap" feature which improves | Enable or disable the "persistent-nodemap" feature which improves | ||||
performance if the Rust extensions are available. | performance if the Rust extensions are available. | ||||
When `share-safe` is enabled, different repositories sharing the same store | When `share-safe` is enabled, different repositories sharing the same store | ||||
can use different dirstate formats. | can use different dirstate formats. | ||||
Enabling `dirstate-v2` for new local repositories | Enabling `dirstate-v2` for new local repositories | ||||
------------------------------------------------ | ------------------------------------------------ | ||||
When creating a new local repository such as with `hg init` or `hg clone`, | When creating a new local repository such as with `hg init` or `hg clone`, | ||||
the `exp-rc-dirstate-v2` boolean in the `format` configuration section | the `use-dirstate-v2` boolean in the `format` configuration section | ||||
controls whether to use this file format. | controls whether to use this file format. | ||||
This is disabled by default as of this writing. | This is disabled by default as of this writing. | ||||
To enable it for a single repository, run for example:: | To enable it for a single repository, run for example:: | ||||
$ hg init my-project --config format.exp-rc-dirstate-v2=1 | $ hg init my-project --config format.use-dirstate-v2=1 | ||||
Checking the format of an existing local repository | Checking the format of an existing local repository | ||||
-------------------------------------------------- | -------------------------------------------------- | ||||
The `debugformat` commands prints information about | The `debugformat` commands prints information about | ||||
which of multiple optional formats are used in the current repository, | which of multiple optional formats are used in the current repository, | ||||
including `dirstate-v2`:: | including `dirstate-v2`:: | ||||
$ hg debugformat | $ hg debugformat | ||||
format-variant repo | format-variant repo | ||||
fncache: yes | fncache: yes | ||||
dirstate-v2: yes | dirstate-v2: yes | ||||
[…] | […] | ||||
Upgrading or downgrading an existing local repository | Upgrading or downgrading an existing local repository | ||||
----------------------------------------------------- | ----------------------------------------------------- | ||||
The `debugupgrade` command does various upgrades or downgrades | The `debugupgrade` command does various upgrades or downgrades | ||||
on a local repository | on a local repository | ||||
based on the current Mercurial version and on configuration. | based on the current Mercurial version and on configuration. | ||||
The same `format.exp-rc-dirstate-v2` configuration is used again. | The same `format.use-dirstate-v2` configuration is used again. | ||||
Example to upgrade:: | Example to upgrade:: | ||||
$ hg debugupgrade --config format.exp-rc-dirstate-v2=1 | $ hg debugupgrade --config format.use-dirstate-v2=1 | ||||
Example to downgrade to `dirstate-v1`:: | Example to downgrade to `dirstate-v1`:: | ||||
$ hg debugupgrade --config format.exp-rc-dirstate-v2=0 | $ hg debugupgrade --config format.use-dirstate-v2=0 | ||||
Both of this commands do nothing but print a list of proposed changes, | Both of this commands do nothing but print a list of proposed changes, | ||||
which may include changes unrelated to the dirstate. | which may include changes unrelated to the dirstate. | ||||
Those other changes are controlled by their own configuration keys. | Those other changes are controlled by their own configuration keys. | ||||
Add `--run` to a command to actually apply the proposed changes. | Add `--run` to a command to actually apply the proposed changes. | ||||
Backups of `.hg/requires` and `.hg/dirstate` are created | Backups of `.hg/requires` and `.hg/dirstate` are created | ||||
in a `.hg/upgradebackup.*` directory. | in a `.hg/upgradebackup.*` directory. |
Features | Features | ||||
======== | ======== | ||||
The following operations are sped up when using Rust: | The following operations are sped up when using Rust: | ||||
- discovery of differences between repositories (pull/push) | - discovery of differences between repositories (pull/push) | ||||
- nodemap (see :hg:`help config.format.use-persistent-nodemap`) | - nodemap (see :hg:`help config.format.use-persistent-nodemap`) | ||||
- all commands using the dirstate (status, commit, diff, add, update, etc.) | - all commands using the dirstate (status, commit, diff, add, update, etc.) | ||||
- dirstate-v2 (see :hg:`help config.format.exp-rc-dirstate-v2`) | - dirstate-v2 (see :hg:`help config.format.use-dirstate-v2`) | ||||
- iteration over ancestors in a graph | - iteration over ancestors in a graph | ||||
More features are in the works, and improvements on the above listed are still | More features are in the works, and improvements on the above listed are still | ||||
in progress. For more experimental work see the "rhg" section. | in progress. For more experimental work see the "rhg" section. | ||||
Checking for Rust | Checking for Rust | ||||
================= | ================= | ||||
ui.warn(_(b'falling back to default value: %s\n') % default) | ui.warn(_(b'falling back to default value: %s\n') % default) | ||||
slow_path = default | slow_path = default | ||||
msg = _( | msg = _( | ||||
b"accessing `dirstate-v2` repository without associated " | b"accessing `dirstate-v2` repository without associated " | ||||
b"fast implementation." | b"fast implementation." | ||||
) | ) | ||||
hint = _( | hint = _( | ||||
b"check `hg help config.format.exp-rc-dirstate-v2` " b"for details" | b"check `hg help config.format.use-dirstate-v2` " b"for details" | ||||
) | ) | ||||
if not dirstate.HAS_FAST_DIRSTATE_V2: | if not dirstate.HAS_FAST_DIRSTATE_V2: | ||||
if slow_path == b'warn': | if slow_path == b'warn': | ||||
msg = b"warning: " + msg + b'\n' | msg = b"warning: " + msg + b'\n' | ||||
ui.warn(msg) | ui.warn(msg) | ||||
if not ui.quiet: | if not ui.quiet: | ||||
hint = b'(' + hint + b')\n' | hint = b'(' + hint + b')\n' | ||||
ui.warn(hint) | ui.warn(hint) | ||||
elif compengine != b'zlib': | elif compengine != b'zlib': | ||||
requirements.add(b'exp-compression-%s' % compengine) | requirements.add(b'exp-compression-%s' % compengine) | ||||
if scmutil.gdinitconfig(ui): | if scmutil.gdinitconfig(ui): | ||||
requirements.add(requirementsmod.GENERALDELTA_REQUIREMENT) | requirements.add(requirementsmod.GENERALDELTA_REQUIREMENT) | ||||
if ui.configbool(b'format', b'sparse-revlog'): | if ui.configbool(b'format', b'sparse-revlog'): | ||||
requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) | requirements.add(requirementsmod.SPARSEREVLOG_REQUIREMENT) | ||||
# experimental config: format.exp-rc-dirstate-v2 | # experimental config: format.use-dirstate-v2 | ||||
# Keep this logic in sync with `has_dirstate_v2()` in `tests/hghave.py` | # Keep this logic in sync with `has_dirstate_v2()` in `tests/hghave.py` | ||||
if ui.configbool(b'format', b'exp-rc-dirstate-v2'): | if ui.configbool(b'format', b'use-dirstate-v2'): | ||||
requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT) | requirements.add(requirementsmod.DIRSTATE_V2_REQUIREMENT) | ||||
# experimental config: format.exp-use-copies-side-data-changeset | # experimental config: format.exp-use-copies-side-data-changeset | ||||
if ui.configbool(b'format', b'exp-use-copies-side-data-changeset'): | if ui.configbool(b'format', b'exp-use-copies-side-data-changeset'): | ||||
requirements.add(requirementsmod.CHANGELOGV2_REQUIREMENT) | requirements.add(requirementsmod.CHANGELOGV2_REQUIREMENT) | ||||
requirements.add(requirementsmod.COPIESSDC_REQUIREMENT) | requirements.add(requirementsmod.COPIESSDC_REQUIREMENT) | ||||
if ui.configbool(b'experimental', b'treemanifest'): | if ui.configbool(b'experimental', b'treemanifest'): | ||||
requirements.add(requirementsmod.TREEMANIFEST_REQUIREMENT) | requirements.add(requirementsmod.TREEMANIFEST_REQUIREMENT) |
Create a repository: | Create a repository: | ||||
#if no-extraextensions | #if no-extraextensions | ||||
$ hg config | $ hg config | ||||
chgserver.idletimeout=60 | chgserver.idletimeout=60 | ||||
devel.all-warnings=true | devel.all-warnings=true | ||||
devel.default-date=0 0 | devel.default-date=0 0 | ||||
extensions.fsmonitor= (fsmonitor !) | extensions.fsmonitor= (fsmonitor !) | ||||
format.exp-rc-dirstate-v2=1 (dirstate-v2 !) | format.use-dirstate-v2=1 (dirstate-v2 !) | ||||
largefiles.usercache=$TESTTMP/.cache/largefiles | largefiles.usercache=$TESTTMP/.cache/largefiles | ||||
lfs.usercache=$TESTTMP/.cache/lfs | lfs.usercache=$TESTTMP/.cache/lfs | ||||
ui.slash=True | ui.slash=True | ||||
ui.interactive=False | ui.interactive=False | ||||
ui.detailed-exit-code=True | ui.detailed-exit-code=True | ||||
ui.merge=internal:merge | ui.merge=internal:merge | ||||
ui.mergemarkers=detailed | ui.mergemarkers=detailed | ||||
ui.promptecho=True | ui.promptecho=True |
... runcommand(server, [b'init', b'foo']) | ... runcommand(server, [b'init', b'foo']) | ||||
... runcommand(server, [b'-R', b'foo', b'showconfig', b'ui', b'defaults']) | ... runcommand(server, [b'-R', b'foo', b'showconfig', b'ui', b'defaults']) | ||||
*** runcommand showconfig | *** runcommand showconfig | ||||
bundle.mainreporoot=$TESTTMP/repo | bundle.mainreporoot=$TESTTMP/repo | ||||
chgserver.idletimeout=60 | chgserver.idletimeout=60 | ||||
devel.all-warnings=true | devel.all-warnings=true | ||||
devel.default-date=0 0 | devel.default-date=0 0 | ||||
extensions.fsmonitor= (fsmonitor !) | extensions.fsmonitor= (fsmonitor !) | ||||
format.exp-rc-dirstate-v2=1 (dirstate-v2 !) | format.use-dirstate-v2=1 (dirstate-v2 !) | ||||
largefiles.usercache=$TESTTMP/.cache/largefiles | largefiles.usercache=$TESTTMP/.cache/largefiles | ||||
lfs.usercache=$TESTTMP/.cache/lfs | lfs.usercache=$TESTTMP/.cache/lfs | ||||
ui.slash=True | ui.slash=True | ||||
ui.interactive=False | ui.interactive=False | ||||
ui.detailed-exit-code=True | ui.detailed-exit-code=True | ||||
ui.merge=internal:merge | ui.merge=internal:merge | ||||
ui.mergemarkers=detailed | ui.mergemarkers=detailed | ||||
ui.ssh=* (glob) | ui.ssh=* (glob) |
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
$ hg init repo | $ hg init repo | ||||
$ cd repo | $ cd repo | ||||
$ echo a > a | $ echo a > a |
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
Checking the size/permissions/file-type of files stored in the | Checking the size/permissions/file-type of files stored in the | ||||
dirstate after an update where the files are changed concurrently | dirstate after an update where the files are changed concurrently | ||||
outside of hg's control. | outside of hg's control. |
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
------ Test dirstate._dirs refcounting | ------ Test dirstate._dirs refcounting | ||||
$ hg init t | $ hg init t |
-------- | -------- | ||||
"usegeneraldelta" | "usegeneraldelta" | ||||
"dotencode" | "dotencode" | ||||
"usefncache" | "usefncache" | ||||
"exp-rc-dirstate-v2" | "use-dirstate-v2" | ||||
"use-persistent-nodemap" | "use-persistent-nodemap" | ||||
"use-share-safe" | "use-share-safe" | ||||
"usestore" | "usestore" | ||||
"sparse-revlog" | "sparse-revlog" |
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
$ hg init ignorerepo | $ hg init ignorerepo | ||||
$ cd ignorerepo | $ cd ignorerepo | ||||
#require unix-permissions no-root reporevlogstore | #require unix-permissions no-root reporevlogstore | ||||
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
$ hg init t | $ hg init t | ||||
$ cd t | $ cd t | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo --run --no-backup --quiet | $ hg debugupgraderepo --run --no-backup --quiet | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | ||||
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | ||||
removed: persistent-nodemap | removed: persistent-nodemap | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | ||||
compression: zstd zstd zstd (zstd !) | compression: zstd zstd zstd (zstd !) | ||||
compression-level: default default default | compression-level: default default default | ||||
$ hg debugupgraderepo --run --no-backup --quiet | $ hg debugupgraderepo --run --no-backup --quiet | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | ||||
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | ||||
added: persistent-nodemap | added: persistent-nodemap | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)' | ||||
Running unrelated upgrade | Running unrelated upgrade | ||||
$ hg debugupgraderepo --run --no-backup --quiet --optimize re-delta-all | $ hg debugupgraderepo --run --no-backup --quiet --optimize re-delta-all | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | ||||
preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | ||||
optimisations: re-delta-all | optimisations: re-delta-all | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
init | init | ||||
$ hg init t | $ hg init t |
$ 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, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (dirstate-v2 !) | ||||
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 . | ||||
[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, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd no-dirstate-v2 !) | ||||
preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-zstd dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlog-compression-zstd, revlogv1, share-safe, sparserevlog, store (zstd dirstate-v2 !) | ||||
added: persistent-nodemap | added: persistent-nodemap | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg log -r . | $ hg log -r . | ||||
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 (no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | ||||
added: share-safe | added: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugupgraderepo --run | $ hg debugupgraderepo --run | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | ||||
added: share-safe | added: share-safe | ||||
share-safe | share-safe | ||||
Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
> share = | > share = | ||||
> [format] | > [format] | ||||
> use-share-safe = False | > use-share-safe = False | ||||
> EOF | > EOF | ||||
$ hg debugupgraderepo -q | $ hg debugupgraderepo -q | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | ||||
removed: share-safe | removed: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
$ hg debugupgraderepo --run | $ hg debugupgraderepo --run | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | ||||
removed: share-safe | removed: share-safe | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs | ||||
- changelog | - changelog | ||||
- manifest | - manifest | ||||
beginning upgrade... | beginning upgrade... | ||||
Testing automatic upgrade of shares when config is set | Testing automatic upgrade of shares when config is set | ||||
$ hg debugupgraderepo -q --run --config format.use-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 (no-dirstate-v2 !) | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-dirstate-v2 !) | ||||
preserved: dotencode, exp-rc-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | preserved: dotencode, use-dirstate-v2, fncache, generaldelta, revlogv1, sparserevlog, store (dirstate-v2 !) | ||||
added: share-safe | 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. |
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
$ hg init repo1 | $ hg init repo1 | ||||
$ cd repo1 | $ cd repo1 | ||||
$ mkdir a b a/1 b/1 b/2 | $ mkdir a b a/1 b/1 b/2 |
> EOF | > EOF | ||||
$ hg bundle -a --type="none-v2;stream=v2" bundle.hg | $ hg bundle -a --type="none-v2;stream=v2" bundle.hg | ||||
$ hg debugbundle bundle.hg | $ hg debugbundle bundle.hg | ||||
Stream params: {} | Stream params: {} | ||||
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (no-zstd !) | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (no-zstd !) | ||||
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (zstd no-rust !) | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (zstd no-rust !) | ||||
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (rust no-dirstate-v2 !) | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (rust no-dirstate-v2 !) | ||||
stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cexp-rc-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (dirstate-v2 !) | stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cuse-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (dirstate-v2 !) | ||||
$ hg debugbundle --spec bundle.hg | $ hg debugbundle --spec bundle.hg | ||||
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore (no-zstd !) | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore (no-zstd !) | ||||
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (zstd no-rust !) | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (zstd no-rust !) | ||||
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (rust no-dirstate-v2 !) | none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (rust no-dirstate-v2 !) | ||||
none-v2;stream=v2;requirements%3Ddotencode%2Cexp-rc-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (dirstate-v2 !) | none-v2;stream=v2;requirements%3Ddotencode%2Cuse-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (dirstate-v2 !) | ||||
Test that we can apply the bundle as a stream clone bundle | Test that we can apply the bundle as a stream clone bundle | ||||
$ cat > .hg/clonebundles.manifest << EOF | $ cat > .hg/clonebundles.manifest << EOF | ||||
> http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg` | > http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg` | ||||
> EOF | > EOF | ||||
$ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log | $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log |
#require symlink | #require symlink | ||||
#testcases dirstate-v1 dirstate-v2 | #testcases dirstate-v1 dirstate-v2 | ||||
#if dirstate-v2 | #if dirstate-v2 | ||||
$ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
> [format] | > [format] | ||||
> exp-rc-dirstate-v2=1 | > use-dirstate-v2=1 | ||||
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path=allow | > dirstate-v2.slow-path=allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
== tests added in 0.7 == | == tests added in 0.7 == | ||||
$ hg init test-symlinks-0.7; cd test-symlinks-0.7; | $ hg init test-symlinks-0.7; cd test-symlinks-0.7; |
> [storage] | > [storage] | ||||
> dirstate-v2.slow-path = allow | > dirstate-v2.slow-path = allow | ||||
> EOF | > EOF | ||||
#endif | #endif | ||||
Upgrade to dirstate-v2 | Upgrade to dirstate-v2 | ||||
$ hg debugformat -v --config format.exp-rc-dirstate-v2=1 | grep dirstate-v2 | $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2 | ||||
dirstate-v2: no yes no | dirstate-v2: no yes no | ||||
$ hg debugupgraderepo --config format.exp-rc-dirstate-v2=1 --run | $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: * (glob) | preserved: * (glob) | ||||
added: dirstate-v2 | added: dirstate-v2 | ||||
dirstate-v2 | dirstate-v2 | ||||
"hg status" will be faster | "hg status" will be faster | ||||
dirstate-v2: no no no | dirstate-v2: no no no | ||||
$ hg status | $ hg status | ||||
$ cd .. | $ cd .. | ||||
dirstate-v2: upgrade and downgrade from and empty repository: | dirstate-v2: upgrade and downgrade from and empty repository: | ||||
------------------------------------------------------------- | ------------------------------------------------------------- | ||||
$ hg init --config format.exp-rc-dirstate-v2=no dirstate-v2-empty | $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty | ||||
$ cd dirstate-v2-empty | $ cd dirstate-v2-empty | ||||
$ hg debugformat | grep dirstate-v2 | $ hg debugformat | grep dirstate-v2 | ||||
dirstate-v2: no | dirstate-v2: no | ||||
upgrade | upgrade | ||||
$ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=yes | $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: * (glob) | preserved: * (glob) | ||||
added: dirstate-v2 | added: dirstate-v2 | ||||
dirstate-v2 | dirstate-v2 | ||||
"hg status" will be faster | "hg status" will be faster | ||||
upgrading to dirstate-v2 from v1 | upgrading to dirstate-v2 from v1 | ||||
replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) | ||||
removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | ||||
$ hg debugformat | grep dirstate-v2 | $ hg debugformat | grep dirstate-v2 | ||||
dirstate-v2: yes | dirstate-v2: yes | ||||
downgrade | downgrade | ||||
$ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=no | $ hg debugupgraderepo --run --config format.use-dirstate-v2=no | ||||
upgrade will perform the following actions: | upgrade will perform the following actions: | ||||
requirements | requirements | ||||
preserved: * (glob) | preserved: * (glob) | ||||
removed: dirstate-v2 | removed: dirstate-v2 | ||||
processed revlogs: | processed revlogs: | ||||
- all-filelogs | - all-filelogs |