comparison tests/test-sidedata.t @ 47320:a43d256c041a

dirstate-v2: Add `hg debugupgraderepo` command support This command changes changes the file formats used inside an existing repository to what they would be in a new repository with the current config. For example: hg debugupgraderepo --config format.exp-dirstate-v2=1 --run hg debugupgraderepo --config format.exp-dirstate-v2=0 --run If a repository has a dirstate in v1 format, the first command would upgrade it to dirstate-v2. Conversely, if a repository has a dirstate in v2 format, the second command would downgrade it to v1. (Both may also run some unrelated upgrades.) Since `format.exp-dirstate-v2` is currently disabled by default, not specifying it in `--config` or any configuration file would result in the second command. Differential Revision: https://phab.mercurial-scm.org/D10769
author Simon Sapin <simon.sapin@octobus.net>
date Wed, 19 May 2021 18:35:43 +0200
parents 6c84fc9c9a90
children ddd5eecc6d0d
comparison
equal deleted inserted replaced
47319:e985a36c2aa3 47320:a43d256c041a
50 50
51 $ hg init up-no-side-data --config experimental.revlogv2=no 51 $ hg init up-no-side-data --config experimental.revlogv2=no
52 $ hg debugformat -v -R up-no-side-data 52 $ hg debugformat -v -R up-no-side-data
53 format-variant repo config default 53 format-variant repo config default
54 fncache: yes yes yes 54 fncache: yes yes yes
55 dirstate-v2: no no no
55 dotencode: yes yes yes 56 dotencode: yes yes yes
56 generaldelta: yes yes yes 57 generaldelta: yes yes yes
57 share-safe: no no no 58 share-safe: no no no
58 sparserevlog: yes yes yes 59 sparserevlog: yes yes yes
59 persistent-nodemap: no no no (no-rust !) 60 persistent-nodemap: no no no (no-rust !)
66 compression: zstd zstd zstd (zstd !) 67 compression: zstd zstd zstd (zstd !)
67 compression-level: default default default 68 compression-level: default default default
68 $ hg debugformat -v -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data 69 $ hg debugformat -v -R up-no-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
69 format-variant repo config default 70 format-variant repo config default
70 fncache: yes yes yes 71 fncache: yes yes yes
72 dirstate-v2: no no no
71 dotencode: yes yes yes 73 dotencode: yes yes yes
72 generaldelta: yes yes yes 74 generaldelta: yes yes yes
73 share-safe: no no no 75 share-safe: no no no
74 sparserevlog: yes yes yes 76 sparserevlog: yes yes yes
75 persistent-nodemap: no no no (no-rust !) 77 persistent-nodemap: no no no (no-rust !)
88 90
89 $ hg init up-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data 91 $ hg init up-side-data --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data
90 $ hg debugformat -v -R up-side-data 92 $ hg debugformat -v -R up-side-data
91 format-variant repo config default 93 format-variant repo config default
92 fncache: yes yes yes 94 fncache: yes yes yes
95 dirstate-v2: no no no
93 dotencode: yes yes yes 96 dotencode: yes yes yes
94 generaldelta: yes yes yes 97 generaldelta: yes yes yes
95 share-safe: no no no 98 share-safe: no no no
96 sparserevlog: yes yes yes 99 sparserevlog: yes yes yes
97 persistent-nodemap: no no no (no-rust !) 100 persistent-nodemap: no no no (no-rust !)
104 compression: zstd zstd zstd (zstd !) 107 compression: zstd zstd zstd (zstd !)
105 compression-level: default default default 108 compression-level: default default default
106 $ hg debugformat -v -R up-side-data --config experimental.revlogv2=no 109 $ hg debugformat -v -R up-side-data --config experimental.revlogv2=no
107 format-variant repo config default 110 format-variant repo config default
108 fncache: yes yes yes 111 fncache: yes yes yes
112 dirstate-v2: no no no
109 dotencode: yes yes yes 113 dotencode: yes yes yes
110 generaldelta: yes yes yes 114 generaldelta: yes yes yes
111 share-safe: no no no 115 share-safe: no no no
112 sparserevlog: yes yes yes 116 sparserevlog: yes yes yes
113 persistent-nodemap: no no no (no-rust !) 117 persistent-nodemap: no no no (no-rust !)