Show More
@@ -1,1124 +1,1122 b'' | |||||
1 | # upgrade.py - functions for in place upgrade of Mercurial repository |
|
1 | # upgrade.py - functions for in place upgrade of Mercurial repository | |
2 | # |
|
2 | # | |
3 | # Copyright (c) 2016-present, Gregory Szorc |
|
3 | # Copyright (c) 2016-present, Gregory Szorc | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 |
|
8 | |||
9 | from ..i18n import _ |
|
9 | from ..i18n import _ | |
10 | from .. import ( |
|
10 | from .. import ( | |
11 | error, |
|
11 | error, | |
12 | localrepo, |
|
12 | localrepo, | |
13 | pycompat, |
|
13 | pycompat, | |
14 | requirements, |
|
14 | requirements, | |
15 | revlog, |
|
15 | revlog, | |
16 | util, |
|
16 | util, | |
17 | ) |
|
17 | ) | |
18 |
|
18 | |||
19 | from ..utils import compression |
|
19 | from ..utils import compression | |
20 |
|
20 | |||
21 | if pycompat.TYPE_CHECKING: |
|
21 | if pycompat.TYPE_CHECKING: | |
22 | from typing import ( |
|
22 | from typing import ( | |
23 | List, |
|
23 | List, | |
24 | Type, |
|
24 | Type, | |
25 | ) |
|
25 | ) | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | # list of requirements that request a clone of all revlog if added/removed |
|
28 | # list of requirements that request a clone of all revlog if added/removed | |
29 | RECLONES_REQUIREMENTS = { |
|
29 | RECLONES_REQUIREMENTS = { | |
30 | requirements.GENERALDELTA_REQUIREMENT, |
|
30 | requirements.GENERALDELTA_REQUIREMENT, | |
31 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
31 | requirements.SPARSEREVLOG_REQUIREMENT, | |
32 | requirements.REVLOGV2_REQUIREMENT, |
|
32 | requirements.REVLOGV2_REQUIREMENT, | |
33 | requirements.CHANGELOGV2_REQUIREMENT, |
|
33 | requirements.CHANGELOGV2_REQUIREMENT, | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 |
|
36 | |||
37 | def preservedrequirements(repo): |
|
37 | def preservedrequirements(repo): | |
38 | preserved = { |
|
38 | preserved = { | |
39 | requirements.SHARED_REQUIREMENT, |
|
39 | requirements.SHARED_REQUIREMENT, | |
40 | requirements.NARROW_REQUIREMENT, |
|
40 | requirements.NARROW_REQUIREMENT, | |
41 | } |
|
41 | } | |
42 | return preserved & repo.requirements |
|
42 | return preserved & repo.requirements | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | FORMAT_VARIANT = b'deficiency' |
|
45 | FORMAT_VARIANT = b'deficiency' | |
46 | OPTIMISATION = b'optimization' |
|
46 | OPTIMISATION = b'optimization' | |
47 |
|
47 | |||
48 |
|
48 | |||
49 | class improvement: |
|
49 | class improvement: | |
50 | """Represents an improvement that can be made as part of an upgrade.""" |
|
50 | """Represents an improvement that can be made as part of an upgrade.""" | |
51 |
|
51 | |||
52 | ### The following attributes should be defined for each subclass: |
|
52 | ### The following attributes should be defined for each subclass: | |
53 |
|
53 | |||
54 | # Either ``FORMAT_VARIANT`` or ``OPTIMISATION``. |
|
54 | # Either ``FORMAT_VARIANT`` or ``OPTIMISATION``. | |
55 | # A format variant is where we change the storage format. Not all format |
|
55 | # A format variant is where we change the storage format. Not all format | |
56 | # variant changes are an obvious problem. |
|
56 | # variant changes are an obvious problem. | |
57 | # An optimization is an action (sometimes optional) that |
|
57 | # An optimization is an action (sometimes optional) that | |
58 | # can be taken to further improve the state of the repository. |
|
58 | # can be taken to further improve the state of the repository. | |
59 | type = None |
|
59 | type = None | |
60 |
|
60 | |||
61 | # machine-readable string uniquely identifying this improvement. it will be |
|
61 | # machine-readable string uniquely identifying this improvement. it will be | |
62 | # mapped to an action later in the upgrade process. |
|
62 | # mapped to an action later in the upgrade process. | |
63 | name = None |
|
63 | name = None | |
64 |
|
64 | |||
65 | # message intended for humans explaining the improvement in more detail, |
|
65 | # message intended for humans explaining the improvement in more detail, | |
66 | # including the implications of it ``FORMAT_VARIANT`` types, should be |
|
66 | # including the implications of it ``FORMAT_VARIANT`` types, should be | |
67 | # worded |
|
67 | # worded | |
68 | # in the present tense. |
|
68 | # in the present tense. | |
69 | description = None |
|
69 | description = None | |
70 |
|
70 | |||
71 | # message intended for humans explaining what an upgrade addressing this |
|
71 | # message intended for humans explaining what an upgrade addressing this | |
72 | # issue will do. should be worded in the future tense. |
|
72 | # issue will do. should be worded in the future tense. | |
73 | upgrademessage = None |
|
73 | upgrademessage = None | |
74 |
|
74 | |||
75 | # value of current Mercurial default for new repository |
|
75 | # value of current Mercurial default for new repository | |
76 | default = None |
|
76 | default = None | |
77 |
|
77 | |||
78 | # Message intended for humans which will be shown post an upgrade |
|
78 | # Message intended for humans which will be shown post an upgrade | |
79 | # operation when the improvement will be added |
|
79 | # operation when the improvement will be added | |
80 | postupgrademessage = None |
|
80 | postupgrademessage = None | |
81 |
|
81 | |||
82 | # Message intended for humans which will be shown post an upgrade |
|
82 | # Message intended for humans which will be shown post an upgrade | |
83 | # operation in which this improvement was removed |
|
83 | # operation in which this improvement was removed | |
84 | postdowngrademessage = None |
|
84 | postdowngrademessage = None | |
85 |
|
85 | |||
86 | # By default we assume that every improvement touches requirements and all revlogs |
|
86 | # By default we assume that every improvement touches requirements and all revlogs | |
87 |
|
87 | |||
88 | # Whether this improvement touches filelogs |
|
88 | # Whether this improvement touches filelogs | |
89 | touches_filelogs = True |
|
89 | touches_filelogs = True | |
90 |
|
90 | |||
91 | # Whether this improvement touches manifests |
|
91 | # Whether this improvement touches manifests | |
92 | touches_manifests = True |
|
92 | touches_manifests = True | |
93 |
|
93 | |||
94 | # Whether this improvement touches changelog |
|
94 | # Whether this improvement touches changelog | |
95 | touches_changelog = True |
|
95 | touches_changelog = True | |
96 |
|
96 | |||
97 | # Whether this improvement changes repository requirements |
|
97 | # Whether this improvement changes repository requirements | |
98 | touches_requirements = True |
|
98 | touches_requirements = True | |
99 |
|
99 | |||
100 | # Whether this improvement touches the dirstate |
|
100 | # Whether this improvement touches the dirstate | |
101 | touches_dirstate = False |
|
101 | touches_dirstate = False | |
102 |
|
102 | |||
103 | # Can this action be run on a share instead of its mains repository |
|
103 | # Can this action be run on a share instead of its mains repository | |
104 | compatible_with_share = False |
|
104 | compatible_with_share = False | |
105 |
|
105 | |||
106 |
|
106 | |||
107 | allformatvariant = [] # type: List[Type['formatvariant']] |
|
107 | allformatvariant = [] # type: List[Type['formatvariant']] | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | def registerformatvariant(cls): |
|
110 | def registerformatvariant(cls): | |
111 | allformatvariant.append(cls) |
|
111 | allformatvariant.append(cls) | |
112 | return cls |
|
112 | return cls | |
113 |
|
113 | |||
114 |
|
114 | |||
115 | class formatvariant(improvement): |
|
115 | class formatvariant(improvement): | |
116 | """an improvement subclass dedicated to repository format""" |
|
116 | """an improvement subclass dedicated to repository format""" | |
117 |
|
117 | |||
118 | type = FORMAT_VARIANT |
|
118 | type = FORMAT_VARIANT | |
119 |
|
119 | |||
120 | @staticmethod |
|
120 | @staticmethod | |
121 | def fromrepo(repo): |
|
121 | def fromrepo(repo): | |
122 | """current value of the variant in the repository""" |
|
122 | """current value of the variant in the repository""" | |
123 | raise NotImplementedError() |
|
123 | raise NotImplementedError() | |
124 |
|
124 | |||
125 | @staticmethod |
|
125 | @staticmethod | |
126 | def fromconfig(repo): |
|
126 | def fromconfig(repo): | |
127 | """current value of the variant in the configuration""" |
|
127 | """current value of the variant in the configuration""" | |
128 | raise NotImplementedError() |
|
128 | raise NotImplementedError() | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | class requirementformatvariant(formatvariant): |
|
131 | class requirementformatvariant(formatvariant): | |
132 | """formatvariant based on a 'requirement' name. |
|
132 | """formatvariant based on a 'requirement' name. | |
133 |
|
133 | |||
134 | Many format variant are controlled by a 'requirement'. We define a small |
|
134 | Many format variant are controlled by a 'requirement'. We define a small | |
135 | subclass to factor the code. |
|
135 | subclass to factor the code. | |
136 | """ |
|
136 | """ | |
137 |
|
137 | |||
138 | # the requirement that control this format variant |
|
138 | # the requirement that control this format variant | |
139 | _requirement = None |
|
139 | _requirement = None | |
140 |
|
140 | |||
141 | @staticmethod |
|
141 | @staticmethod | |
142 | def _newreporequirements(ui): |
|
142 | def _newreporequirements(ui): | |
143 | return localrepo.newreporequirements( |
|
143 | return localrepo.newreporequirements( | |
144 | ui, localrepo.defaultcreateopts(ui) |
|
144 | ui, localrepo.defaultcreateopts(ui) | |
145 | ) |
|
145 | ) | |
146 |
|
146 | |||
147 | @classmethod |
|
147 | @classmethod | |
148 | def fromrepo(cls, repo): |
|
148 | def fromrepo(cls, repo): | |
149 | assert cls._requirement is not None |
|
149 | assert cls._requirement is not None | |
150 | return cls._requirement in repo.requirements |
|
150 | return cls._requirement in repo.requirements | |
151 |
|
151 | |||
152 | @classmethod |
|
152 | @classmethod | |
153 | def fromconfig(cls, repo): |
|
153 | def fromconfig(cls, repo): | |
154 | assert cls._requirement is not None |
|
154 | assert cls._requirement is not None | |
155 | return cls._requirement in cls._newreporequirements(repo.ui) |
|
155 | return cls._requirement in cls._newreporequirements(repo.ui) | |
156 |
|
156 | |||
157 |
|
157 | |||
158 | @registerformatvariant |
|
158 | @registerformatvariant | |
159 | class fncache(requirementformatvariant): |
|
159 | class fncache(requirementformatvariant): | |
160 | name = b'fncache' |
|
160 | name = b'fncache' | |
161 |
|
161 | |||
162 | _requirement = requirements.FNCACHE_REQUIREMENT |
|
162 | _requirement = requirements.FNCACHE_REQUIREMENT | |
163 |
|
163 | |||
164 | default = True |
|
164 | default = True | |
165 |
|
165 | |||
166 | description = _( |
|
166 | description = _( | |
167 | b'long and reserved filenames may not work correctly; ' |
|
167 | b'long and reserved filenames may not work correctly; ' | |
168 | b'repository performance is sub-optimal' |
|
168 | b'repository performance is sub-optimal' | |
169 | ) |
|
169 | ) | |
170 |
|
170 | |||
171 | upgrademessage = _( |
|
171 | upgrademessage = _( | |
172 | b'repository will be more resilient to storing ' |
|
172 | b'repository will be more resilient to storing ' | |
173 | b'certain paths and performance of certain ' |
|
173 | b'certain paths and performance of certain ' | |
174 | b'operations should be improved' |
|
174 | b'operations should be improved' | |
175 | ) |
|
175 | ) | |
176 |
|
176 | |||
177 |
|
177 | |||
178 | @registerformatvariant |
|
178 | @registerformatvariant | |
179 | class dirstatev2(requirementformatvariant): |
|
179 | class dirstatev2(requirementformatvariant): | |
180 | name = b'dirstate-v2' |
|
180 | name = b'dirstate-v2' | |
181 | _requirement = requirements.DIRSTATE_V2_REQUIREMENT |
|
181 | _requirement = requirements.DIRSTATE_V2_REQUIREMENT | |
182 |
|
182 | |||
183 | default = False |
|
183 | default = False | |
184 |
|
184 | |||
185 | description = _( |
|
185 | description = _( | |
186 | b'version 1 of the dirstate file format requires ' |
|
186 | b'version 1 of the dirstate file format requires ' | |
187 | b'reading and parsing it all at once.\n' |
|
187 | b'reading and parsing it all at once.\n' | |
188 | b'Version 2 has a better structure,' |
|
188 | b'Version 2 has a better structure,' | |
189 | b'better information and lighter update mechanism' |
|
189 | b'better information and lighter update mechanism' | |
190 | ) |
|
190 | ) | |
191 |
|
191 | |||
192 | upgrademessage = _(b'"hg status" will be faster') |
|
192 | upgrademessage = _(b'"hg status" will be faster') | |
193 |
|
193 | |||
194 | touches_filelogs = False |
|
194 | touches_filelogs = False | |
195 | touches_manifests = False |
|
195 | touches_manifests = False | |
196 | touches_changelog = False |
|
196 | touches_changelog = False | |
197 | touches_requirements = True |
|
197 | touches_requirements = True | |
198 | touches_dirstate = True |
|
198 | touches_dirstate = True | |
199 | compatible_with_share = True |
|
199 | compatible_with_share = True | |
200 |
|
200 | |||
201 |
|
201 | |||
202 | @registerformatvariant |
|
202 | @registerformatvariant | |
203 | class dirstatetrackedkey(requirementformatvariant): |
|
203 | class dirstatetrackedkey(requirementformatvariant): | |
204 | name = b'tracked-hint' |
|
204 | name = b'tracked-hint' | |
205 | _requirement = requirements.DIRSTATE_TRACKED_HINT_V1 |
|
205 | _requirement = requirements.DIRSTATE_TRACKED_HINT_V1 | |
206 |
|
206 | |||
207 | default = False |
|
207 | default = False | |
208 |
|
208 | |||
209 | description = _( |
|
209 | description = _( | |
210 | b'Add a small file to help external tooling that watch the tracked set' |
|
210 | b'Add a small file to help external tooling that watch the tracked set' | |
211 | ) |
|
211 | ) | |
212 |
|
212 | |||
213 | upgrademessage = _( |
|
213 | upgrademessage = _( | |
214 | b'external tools will be informated of potential change in the tracked set' |
|
214 | b'external tools will be informated of potential change in the tracked set' | |
215 | ) |
|
215 | ) | |
216 |
|
216 | |||
217 | touches_filelogs = False |
|
217 | touches_filelogs = False | |
218 | touches_manifests = False |
|
218 | touches_manifests = False | |
219 | touches_changelog = False |
|
219 | touches_changelog = False | |
220 | touches_requirements = True |
|
220 | touches_requirements = True | |
221 | touches_dirstate = True |
|
221 | touches_dirstate = True | |
222 | compatible_with_share = True |
|
222 | compatible_with_share = True | |
223 |
|
223 | |||
224 |
|
224 | |||
225 | @registerformatvariant |
|
225 | @registerformatvariant | |
226 | class dotencode(requirementformatvariant): |
|
226 | class dotencode(requirementformatvariant): | |
227 | name = b'dotencode' |
|
227 | name = b'dotencode' | |
228 |
|
228 | |||
229 | _requirement = requirements.DOTENCODE_REQUIREMENT |
|
229 | _requirement = requirements.DOTENCODE_REQUIREMENT | |
230 |
|
230 | |||
231 | default = True |
|
231 | default = True | |
232 |
|
232 | |||
233 | description = _( |
|
233 | description = _( | |
234 | b'storage of filenames beginning with a period or ' |
|
234 | b'storage of filenames beginning with a period or ' | |
235 | b'space may not work correctly' |
|
235 | b'space may not work correctly' | |
236 | ) |
|
236 | ) | |
237 |
|
237 | |||
238 | upgrademessage = _( |
|
238 | upgrademessage = _( | |
239 | b'repository will be better able to store files ' |
|
239 | b'repository will be better able to store files ' | |
240 | b'beginning with a space or period' |
|
240 | b'beginning with a space or period' | |
241 | ) |
|
241 | ) | |
242 |
|
242 | |||
243 |
|
243 | |||
244 | @registerformatvariant |
|
244 | @registerformatvariant | |
245 | class generaldelta(requirementformatvariant): |
|
245 | class generaldelta(requirementformatvariant): | |
246 | name = b'generaldelta' |
|
246 | name = b'generaldelta' | |
247 |
|
247 | |||
248 | _requirement = requirements.GENERALDELTA_REQUIREMENT |
|
248 | _requirement = requirements.GENERALDELTA_REQUIREMENT | |
249 |
|
249 | |||
250 | default = True |
|
250 | default = True | |
251 |
|
251 | |||
252 | description = _( |
|
252 | description = _( | |
253 | b'deltas within internal storage are unable to ' |
|
253 | b'deltas within internal storage are unable to ' | |
254 | b'choose optimal revisions; repository is larger and ' |
|
254 | b'choose optimal revisions; repository is larger and ' | |
255 | b'slower than it could be; interaction with other ' |
|
255 | b'slower than it could be; interaction with other ' | |
256 | b'repositories may require extra network and CPU ' |
|
256 | b'repositories may require extra network and CPU ' | |
257 | b'resources, making "hg push" and "hg pull" slower' |
|
257 | b'resources, making "hg push" and "hg pull" slower' | |
258 | ) |
|
258 | ) | |
259 |
|
259 | |||
260 | upgrademessage = _( |
|
260 | upgrademessage = _( | |
261 | b'repository storage will be able to create ' |
|
261 | b'repository storage will be able to create ' | |
262 | b'optimal deltas; new repository data will be ' |
|
262 | b'optimal deltas; new repository data will be ' | |
263 | b'smaller and read times should decrease; ' |
|
263 | b'smaller and read times should decrease; ' | |
264 | b'interacting with other repositories using this ' |
|
264 | b'interacting with other repositories using this ' | |
265 | b'storage model should require less network and ' |
|
265 | b'storage model should require less network and ' | |
266 | b'CPU resources, making "hg push" and "hg pull" ' |
|
266 | b'CPU resources, making "hg push" and "hg pull" ' | |
267 | b'faster' |
|
267 | b'faster' | |
268 | ) |
|
268 | ) | |
269 |
|
269 | |||
270 |
|
270 | |||
271 | @registerformatvariant |
|
271 | @registerformatvariant | |
272 | class sharesafe(requirementformatvariant): |
|
272 | class sharesafe(requirementformatvariant): | |
273 | name = b'share-safe' |
|
273 | name = b'share-safe' | |
274 | _requirement = requirements.SHARESAFE_REQUIREMENT |
|
274 | _requirement = requirements.SHARESAFE_REQUIREMENT | |
275 |
|
275 | |||
276 | default = True |
|
276 | default = True | |
277 |
|
277 | |||
278 | description = _( |
|
278 | description = _( | |
279 | b'old shared repositories do not share source repository ' |
|
279 | b'old shared repositories do not share source repository ' | |
280 | b'requirements and config. This leads to various problems ' |
|
280 | b'requirements and config. This leads to various problems ' | |
281 | b'when the source repository format is upgraded or some new ' |
|
281 | b'when the source repository format is upgraded or some new ' | |
282 | b'extensions are enabled.' |
|
282 | b'extensions are enabled.' | |
283 | ) |
|
283 | ) | |
284 |
|
284 | |||
285 | upgrademessage = _( |
|
285 | upgrademessage = _( | |
286 | b'Upgrades a repository to share-safe format so that future ' |
|
286 | b'Upgrades a repository to share-safe format so that future ' | |
287 | b'shares of this repository share its requirements and configs.' |
|
287 | b'shares of this repository share its requirements and configs.' | |
288 | ) |
|
288 | ) | |
289 |
|
289 | |||
290 | postdowngrademessage = _( |
|
290 | postdowngrademessage = _( | |
291 | b'repository downgraded to not use share safe mode, ' |
|
291 | b'repository downgraded to not use share safe mode, ' | |
292 | b'existing shares will not work and needs to' |
|
292 | b'existing shares will not work and needs to' | |
293 | b' be reshared.' |
|
293 | b' be reshared.' | |
294 | ) |
|
294 | ) | |
295 |
|
295 | |||
296 | postupgrademessage = _( |
|
296 | postupgrademessage = _( | |
297 | b'repository upgraded to share safe mode, existing' |
|
297 | b'repository upgraded to share safe mode, existing' | |
298 | b' shares will still work in old non-safe mode. ' |
|
298 | b' shares will still work in old non-safe mode. ' | |
299 | b'Re-share existing shares to use them in safe mode' |
|
299 | b'Re-share existing shares to use them in safe mode' | |
300 | b' New shares will be created in safe mode.' |
|
300 | b' New shares will be created in safe mode.' | |
301 | ) |
|
301 | ) | |
302 |
|
302 | |||
303 | # upgrade only needs to change the requirements |
|
303 | # upgrade only needs to change the requirements | |
304 | touches_filelogs = False |
|
304 | touches_filelogs = False | |
305 | touches_manifests = False |
|
305 | touches_manifests = False | |
306 | touches_changelog = False |
|
306 | touches_changelog = False | |
307 | touches_requirements = True |
|
307 | touches_requirements = True | |
308 |
|
308 | |||
309 |
|
309 | |||
310 | @registerformatvariant |
|
310 | @registerformatvariant | |
311 | class sparserevlog(requirementformatvariant): |
|
311 | class sparserevlog(requirementformatvariant): | |
312 | name = b'sparserevlog' |
|
312 | name = b'sparserevlog' | |
313 |
|
313 | |||
314 | _requirement = requirements.SPARSEREVLOG_REQUIREMENT |
|
314 | _requirement = requirements.SPARSEREVLOG_REQUIREMENT | |
315 |
|
315 | |||
316 | default = True |
|
316 | default = True | |
317 |
|
317 | |||
318 | description = _( |
|
318 | description = _( | |
319 | b'in order to limit disk reading and memory usage on older ' |
|
319 | b'in order to limit disk reading and memory usage on older ' | |
320 | b'version, the span of a delta chain from its root to its ' |
|
320 | b'version, the span of a delta chain from its root to its ' | |
321 | b'end is limited, whatever the relevant data in this span. ' |
|
321 | b'end is limited, whatever the relevant data in this span. ' | |
322 | b'This can severly limit Mercurial ability to build good ' |
|
322 | b'This can severly limit Mercurial ability to build good ' | |
323 | b'chain of delta resulting is much more storage space being ' |
|
323 | b'chain of delta resulting is much more storage space being ' | |
324 | b'taken and limit reusability of on disk delta during ' |
|
324 | b'taken and limit reusability of on disk delta during ' | |
325 | b'exchange.' |
|
325 | b'exchange.' | |
326 | ) |
|
326 | ) | |
327 |
|
327 | |||
328 | upgrademessage = _( |
|
328 | upgrademessage = _( | |
329 | b'Revlog supports delta chain with more unused data ' |
|
329 | b'Revlog supports delta chain with more unused data ' | |
330 | b'between payload. These gaps will be skipped at read ' |
|
330 | b'between payload. These gaps will be skipped at read ' | |
331 | b'time. This allows for better delta chains, making a ' |
|
331 | b'time. This allows for better delta chains, making a ' | |
332 | b'better compression and faster exchange with server.' |
|
332 | b'better compression and faster exchange with server.' | |
333 | ) |
|
333 | ) | |
334 |
|
334 | |||
335 |
|
335 | |||
336 | @registerformatvariant |
|
336 | @registerformatvariant | |
337 | class persistentnodemap(requirementformatvariant): |
|
337 | class persistentnodemap(requirementformatvariant): | |
338 | name = b'persistent-nodemap' |
|
338 | name = b'persistent-nodemap' | |
339 |
|
339 | |||
340 | _requirement = requirements.NODEMAP_REQUIREMENT |
|
340 | _requirement = requirements.NODEMAP_REQUIREMENT | |
341 |
|
341 | |||
342 | default = False |
|
342 | default = False | |
343 |
|
343 | |||
344 | description = _( |
|
344 | description = _( | |
345 | b'persist the node -> rev mapping on disk to speedup lookup' |
|
345 | b'persist the node -> rev mapping on disk to speedup lookup' | |
346 | ) |
|
346 | ) | |
347 |
|
347 | |||
348 | upgrademessage = _(b'Speedup revision lookup by node id.') |
|
348 | upgrademessage = _(b'Speedup revision lookup by node id.') | |
349 |
|
349 | |||
350 |
|
350 | |||
351 | @registerformatvariant |
|
351 | @registerformatvariant | |
352 | class copiessdc(requirementformatvariant): |
|
352 | class copiessdc(requirementformatvariant): | |
353 | name = b'copies-sdc' |
|
353 | name = b'copies-sdc' | |
354 |
|
354 | |||
355 | _requirement = requirements.COPIESSDC_REQUIREMENT |
|
355 | _requirement = requirements.COPIESSDC_REQUIREMENT | |
356 |
|
356 | |||
357 | default = False |
|
357 | default = False | |
358 |
|
358 | |||
359 | description = _(b'Stores copies information alongside changesets.') |
|
359 | description = _(b'Stores copies information alongside changesets.') | |
360 |
|
360 | |||
361 | upgrademessage = _( |
|
361 | upgrademessage = _( | |
362 | b'Allows to use more efficient algorithm to deal with ' b'copy tracing.' |
|
362 | b'Allows to use more efficient algorithm to deal with ' b'copy tracing.' | |
363 | ) |
|
363 | ) | |
364 |
|
364 | |||
365 | touches_filelogs = False |
|
365 | touches_filelogs = False | |
366 | touches_manifests = False |
|
366 | touches_manifests = False | |
367 |
|
367 | |||
368 |
|
368 | |||
369 | @registerformatvariant |
|
369 | @registerformatvariant | |
370 | class revlogv2(requirementformatvariant): |
|
370 | class revlogv2(requirementformatvariant): | |
371 | name = b'revlog-v2' |
|
371 | name = b'revlog-v2' | |
372 | _requirement = requirements.REVLOGV2_REQUIREMENT |
|
372 | _requirement = requirements.REVLOGV2_REQUIREMENT | |
373 | default = False |
|
373 | default = False | |
374 | description = _(b'Version 2 of the revlog.') |
|
374 | description = _(b'Version 2 of the revlog.') | |
375 | upgrademessage = _(b'very experimental') |
|
375 | upgrademessage = _(b'very experimental') | |
376 |
|
376 | |||
377 |
|
377 | |||
378 | @registerformatvariant |
|
378 | @registerformatvariant | |
379 | class changelogv2(requirementformatvariant): |
|
379 | class changelogv2(requirementformatvariant): | |
380 | name = b'changelog-v2' |
|
380 | name = b'changelog-v2' | |
381 | _requirement = requirements.CHANGELOGV2_REQUIREMENT |
|
381 | _requirement = requirements.CHANGELOGV2_REQUIREMENT | |
382 | default = False |
|
382 | default = False | |
383 | description = _(b'An iteration of the revlog focussed on changelog needs.') |
|
383 | description = _(b'An iteration of the revlog focussed on changelog needs.') | |
384 | upgrademessage = _(b'quite experimental') |
|
384 | upgrademessage = _(b'quite experimental') | |
385 |
|
385 | |||
386 | touches_filelogs = False |
|
386 | touches_filelogs = False | |
387 | touches_manifests = False |
|
387 | touches_manifests = False | |
388 |
|
388 | |||
389 |
|
389 | |||
390 | @registerformatvariant |
|
390 | @registerformatvariant | |
391 | class removecldeltachain(formatvariant): |
|
391 | class removecldeltachain(formatvariant): | |
392 | name = b'plain-cl-delta' |
|
392 | name = b'plain-cl-delta' | |
393 |
|
393 | |||
394 | default = True |
|
394 | default = True | |
395 |
|
395 | |||
396 | description = _( |
|
396 | description = _( | |
397 | b'changelog storage is using deltas instead of ' |
|
397 | b'changelog storage is using deltas instead of ' | |
398 | b'raw entries; changelog reading and any ' |
|
398 | b'raw entries; changelog reading and any ' | |
399 | b'operation relying on changelog data are slower ' |
|
399 | b'operation relying on changelog data are slower ' | |
400 | b'than they could be' |
|
400 | b'than they could be' | |
401 | ) |
|
401 | ) | |
402 |
|
402 | |||
403 | upgrademessage = _( |
|
403 | upgrademessage = _( | |
404 | b'changelog storage will be reformated to ' |
|
404 | b'changelog storage will be reformated to ' | |
405 | b'store raw entries; changelog reading will be ' |
|
405 | b'store raw entries; changelog reading will be ' | |
406 | b'faster; changelog size may be reduced' |
|
406 | b'faster; changelog size may be reduced' | |
407 | ) |
|
407 | ) | |
408 |
|
408 | |||
409 | @staticmethod |
|
409 | @staticmethod | |
410 | def fromrepo(repo): |
|
410 | def fromrepo(repo): | |
411 | # Mercurial 4.0 changed changelogs to not use delta chains. Search for |
|
411 | # Mercurial 4.0 changed changelogs to not use delta chains. Search for | |
412 | # changelogs with deltas. |
|
412 | # changelogs with deltas. | |
413 | cl = repo.changelog |
|
413 | cl = repo.changelog | |
414 | chainbase = cl.chainbase |
|
414 | chainbase = cl.chainbase | |
415 | return all(rev == chainbase(rev) for rev in cl) |
|
415 | return all(rev == chainbase(rev) for rev in cl) | |
416 |
|
416 | |||
417 | @staticmethod |
|
417 | @staticmethod | |
418 | def fromconfig(repo): |
|
418 | def fromconfig(repo): | |
419 | return True |
|
419 | return True | |
420 |
|
420 | |||
421 |
|
421 | |||
422 | _has_zstd = ( |
|
422 | _has_zstd = ( | |
423 | b'zstd' in util.compengines |
|
423 | b'zstd' in util.compengines | |
424 | and util.compengines[b'zstd'].available() |
|
424 | and util.compengines[b'zstd'].available() | |
425 | and util.compengines[b'zstd'].revlogheader() |
|
425 | and util.compengines[b'zstd'].revlogheader() | |
426 | ) |
|
426 | ) | |
427 |
|
427 | |||
428 |
|
428 | |||
429 | @registerformatvariant |
|
429 | @registerformatvariant | |
430 | class compressionengine(formatvariant): |
|
430 | class compressionengine(formatvariant): | |
431 | name = b'compression' |
|
431 | name = b'compression' | |
432 |
|
432 | |||
433 | if _has_zstd: |
|
433 | if _has_zstd: | |
434 | default = b'zstd' |
|
434 | default = b'zstd' | |
435 | else: |
|
435 | else: | |
436 | default = b'zlib' |
|
436 | default = b'zlib' | |
437 |
|
437 | |||
438 | description = _( |
|
438 | description = _( | |
439 | b'Compresion algorithm used to compress data. ' |
|
439 | b'Compresion algorithm used to compress data. ' | |
440 | b'Some engine are faster than other' |
|
440 | b'Some engine are faster than other' | |
441 | ) |
|
441 | ) | |
442 |
|
442 | |||
443 | upgrademessage = _( |
|
443 | upgrademessage = _( | |
444 | b'revlog content will be recompressed with the new algorithm.' |
|
444 | b'revlog content will be recompressed with the new algorithm.' | |
445 | ) |
|
445 | ) | |
446 |
|
446 | |||
447 | @classmethod |
|
447 | @classmethod | |
448 | def fromrepo(cls, repo): |
|
448 | def fromrepo(cls, repo): | |
449 | # we allow multiple compression engine requirement to co-exist because |
|
449 | # we allow multiple compression engine requirement to co-exist because | |
450 | # strickly speaking, revlog seems to support mixed compression style. |
|
450 | # strickly speaking, revlog seems to support mixed compression style. | |
451 | # |
|
451 | # | |
452 | # The compression used for new entries will be "the last one" |
|
452 | # The compression used for new entries will be "the last one" | |
453 | compression = b'zlib' |
|
453 | compression = b'zlib' | |
454 | for req in repo.requirements: |
|
454 | for req in repo.requirements: | |
455 | prefix = req.startswith |
|
455 | prefix = req.startswith | |
456 | if prefix(b'revlog-compression-') or prefix(b'exp-compression-'): |
|
456 | if prefix(b'revlog-compression-') or prefix(b'exp-compression-'): | |
457 | compression = req.split(b'-', 2)[2] |
|
457 | compression = req.split(b'-', 2)[2] | |
458 | return compression |
|
458 | return compression | |
459 |
|
459 | |||
460 | @classmethod |
|
460 | @classmethod | |
461 | def fromconfig(cls, repo): |
|
461 | def fromconfig(cls, repo): | |
462 | compengines = repo.ui.configlist(b'format', b'revlog-compression') |
|
462 | compengines = repo.ui.configlist(b'format', b'revlog-compression') | |
463 | # return the first valid value as the selection code would do |
|
463 | # return the first valid value as the selection code would do | |
464 | for comp in compengines: |
|
464 | for comp in compengines: | |
465 | if comp in util.compengines: |
|
465 | if comp in util.compengines: | |
466 | e = util.compengines[comp] |
|
466 | e = util.compengines[comp] | |
467 | if e.available() and e.revlogheader(): |
|
467 | if e.available() and e.revlogheader(): | |
468 | return comp |
|
468 | return comp | |
469 |
|
469 | |||
470 | # no valide compression found lets display it all for clarity |
|
470 | # no valide compression found lets display it all for clarity | |
471 | return b','.join(compengines) |
|
471 | return b','.join(compengines) | |
472 |
|
472 | |||
473 |
|
473 | |||
474 | @registerformatvariant |
|
474 | @registerformatvariant | |
475 | class compressionlevel(formatvariant): |
|
475 | class compressionlevel(formatvariant): | |
476 | name = b'compression-level' |
|
476 | name = b'compression-level' | |
477 | default = b'default' |
|
477 | default = b'default' | |
478 |
|
478 | |||
479 | description = _(b'compression level') |
|
479 | description = _(b'compression level') | |
480 |
|
480 | |||
481 | upgrademessage = _(b'revlog content will be recompressed') |
|
481 | upgrademessage = _(b'revlog content will be recompressed') | |
482 |
|
482 | |||
483 | @classmethod |
|
483 | @classmethod | |
484 | def fromrepo(cls, repo): |
|
484 | def fromrepo(cls, repo): | |
485 | comp = compressionengine.fromrepo(repo) |
|
485 | comp = compressionengine.fromrepo(repo) | |
486 | level = None |
|
486 | level = None | |
487 | if comp == b'zlib': |
|
487 | if comp == b'zlib': | |
488 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') |
|
488 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') | |
489 | elif comp == b'zstd': |
|
489 | elif comp == b'zstd': | |
490 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') |
|
490 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') | |
491 | if level is None: |
|
491 | if level is None: | |
492 | return b'default' |
|
492 | return b'default' | |
493 | return bytes(level) |
|
493 | return bytes(level) | |
494 |
|
494 | |||
495 | @classmethod |
|
495 | @classmethod | |
496 | def fromconfig(cls, repo): |
|
496 | def fromconfig(cls, repo): | |
497 | comp = compressionengine.fromconfig(repo) |
|
497 | comp = compressionengine.fromconfig(repo) | |
498 | level = None |
|
498 | level = None | |
499 | if comp == b'zlib': |
|
499 | if comp == b'zlib': | |
500 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') |
|
500 | level = repo.ui.configint(b'storage', b'revlog.zlib.level') | |
501 | elif comp == b'zstd': |
|
501 | elif comp == b'zstd': | |
502 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') |
|
502 | level = repo.ui.configint(b'storage', b'revlog.zstd.level') | |
503 | if level is None: |
|
503 | if level is None: | |
504 | return b'default' |
|
504 | return b'default' | |
505 | return bytes(level) |
|
505 | return bytes(level) | |
506 |
|
506 | |||
507 |
|
507 | |||
508 | def find_format_upgrades(repo): |
|
508 | def find_format_upgrades(repo): | |
509 | """returns a list of format upgrades which can be perform on the repo""" |
|
509 | """returns a list of format upgrades which can be perform on the repo""" | |
510 | upgrades = [] |
|
510 | upgrades = [] | |
511 |
|
511 | |||
512 | # We could detect lack of revlogv1 and store here, but they were added |
|
512 | # We could detect lack of revlogv1 and store here, but they were added | |
513 | # in 0.9.2 and we don't support upgrading repos without these |
|
513 | # in 0.9.2 and we don't support upgrading repos without these | |
514 | # requirements, so let's not bother. |
|
514 | # requirements, so let's not bother. | |
515 |
|
515 | |||
516 | for fv in allformatvariant: |
|
516 | for fv in allformatvariant: | |
517 | if not fv.fromrepo(repo): |
|
517 | if not fv.fromrepo(repo): | |
518 | upgrades.append(fv) |
|
518 | upgrades.append(fv) | |
519 |
|
519 | |||
520 | return upgrades |
|
520 | return upgrades | |
521 |
|
521 | |||
522 |
|
522 | |||
523 | def find_format_downgrades(repo): |
|
523 | def find_format_downgrades(repo): | |
524 | """returns a list of format downgrades which will be performed on the repo |
|
524 | """returns a list of format downgrades which will be performed on the repo | |
525 | because of disabled config option for them""" |
|
525 | because of disabled config option for them""" | |
526 |
|
526 | |||
527 | downgrades = [] |
|
527 | downgrades = [] | |
528 |
|
528 | |||
529 | for fv in allformatvariant: |
|
529 | for fv in allformatvariant: | |
530 | if fv.name == b'compression': |
|
530 | if fv.name == b'compression': | |
531 | # If there is a compression change between repository |
|
531 | # If there is a compression change between repository | |
532 | # and config, destination repository compression will change |
|
532 | # and config, destination repository compression will change | |
533 | # and current compression will be removed. |
|
533 | # and current compression will be removed. | |
534 | if fv.fromrepo(repo) != fv.fromconfig(repo): |
|
534 | if fv.fromrepo(repo) != fv.fromconfig(repo): | |
535 | downgrades.append(fv) |
|
535 | downgrades.append(fv) | |
536 | continue |
|
536 | continue | |
537 | # format variant exist in repo but does not exist in new repository |
|
537 | # format variant exist in repo but does not exist in new repository | |
538 | # config |
|
538 | # config | |
539 | if fv.fromrepo(repo) and not fv.fromconfig(repo): |
|
539 | if fv.fromrepo(repo) and not fv.fromconfig(repo): | |
540 | downgrades.append(fv) |
|
540 | downgrades.append(fv) | |
541 |
|
541 | |||
542 | return downgrades |
|
542 | return downgrades | |
543 |
|
543 | |||
544 |
|
544 | |||
545 | ALL_OPTIMISATIONS = [] |
|
545 | ALL_OPTIMISATIONS = [] | |
546 |
|
546 | |||
547 |
|
547 | |||
548 | def register_optimization(obj): |
|
548 | def register_optimization(obj): | |
549 | ALL_OPTIMISATIONS.append(obj) |
|
549 | ALL_OPTIMISATIONS.append(obj) | |
550 | return obj |
|
550 | return obj | |
551 |
|
551 | |||
552 |
|
552 | |||
553 | class optimization(improvement): |
|
553 | class optimization(improvement): | |
554 | """an improvement subclass dedicated to optimizations""" |
|
554 | """an improvement subclass dedicated to optimizations""" | |
555 |
|
555 | |||
556 | type = OPTIMISATION |
|
556 | type = OPTIMISATION | |
557 |
|
557 | |||
558 |
|
558 | |||
559 | @register_optimization |
|
559 | @register_optimization | |
560 | class redeltaparents(optimization): |
|
560 | class redeltaparents(optimization): | |
561 | name = b're-delta-parent' |
|
561 | name = b're-delta-parent' | |
562 |
|
562 | |||
563 | type = OPTIMISATION |
|
563 | type = OPTIMISATION | |
564 |
|
564 | |||
565 | description = _( |
|
565 | description = _( | |
566 | b'deltas within internal storage will be recalculated to ' |
|
566 | b'deltas within internal storage will be recalculated to ' | |
567 | b'choose an optimal base revision where this was not ' |
|
567 | b'choose an optimal base revision where this was not ' | |
568 | b'already done; the size of the repository may shrink and ' |
|
568 | b'already done; the size of the repository may shrink and ' | |
569 | b'various operations may become faster; the first time ' |
|
569 | b'various operations may become faster; the first time ' | |
570 | b'this optimization is performed could slow down upgrade ' |
|
570 | b'this optimization is performed could slow down upgrade ' | |
571 | b'execution considerably; subsequent invocations should ' |
|
571 | b'execution considerably; subsequent invocations should ' | |
572 | b'not run noticeably slower' |
|
572 | b'not run noticeably slower' | |
573 | ) |
|
573 | ) | |
574 |
|
574 | |||
575 | upgrademessage = _( |
|
575 | upgrademessage = _( | |
576 | b'deltas within internal storage will choose a new ' |
|
576 | b'deltas within internal storage will choose a new ' | |
577 | b'base revision if needed' |
|
577 | b'base revision if needed' | |
578 | ) |
|
578 | ) | |
579 |
|
579 | |||
580 |
|
580 | |||
581 | @register_optimization |
|
581 | @register_optimization | |
582 | class redeltamultibase(optimization): |
|
582 | class redeltamultibase(optimization): | |
583 | name = b're-delta-multibase' |
|
583 | name = b're-delta-multibase' | |
584 |
|
584 | |||
585 | type = OPTIMISATION |
|
585 | type = OPTIMISATION | |
586 |
|
586 | |||
587 | description = _( |
|
587 | description = _( | |
588 | b'deltas within internal storage will be recalculated ' |
|
588 | b'deltas within internal storage will be recalculated ' | |
589 | b'against multiple base revision and the smallest ' |
|
589 | b'against multiple base revision and the smallest ' | |
590 | b'difference will be used; the size of the repository may ' |
|
590 | b'difference will be used; the size of the repository may ' | |
591 | b'shrink significantly when there are many merges; this ' |
|
591 | b'shrink significantly when there are many merges; this ' | |
592 | b'optimization will slow down execution in proportion to ' |
|
592 | b'optimization will slow down execution in proportion to ' | |
593 | b'the number of merges in the repository and the amount ' |
|
593 | b'the number of merges in the repository and the amount ' | |
594 | b'of files in the repository; this slow down should not ' |
|
594 | b'of files in the repository; this slow down should not ' | |
595 | b'be significant unless there are tens of thousands of ' |
|
595 | b'be significant unless there are tens of thousands of ' | |
596 | b'files and thousands of merges' |
|
596 | b'files and thousands of merges' | |
597 | ) |
|
597 | ) | |
598 |
|
598 | |||
599 | upgrademessage = _( |
|
599 | upgrademessage = _( | |
600 | b'deltas within internal storage will choose an ' |
|
600 | b'deltas within internal storage will choose an ' | |
601 | b'optimal delta by computing deltas against multiple ' |
|
601 | b'optimal delta by computing deltas against multiple ' | |
602 | b'parents; may slow down execution time ' |
|
602 | b'parents; may slow down execution time ' | |
603 | b'significantly' |
|
603 | b'significantly' | |
604 | ) |
|
604 | ) | |
605 |
|
605 | |||
606 |
|
606 | |||
607 | @register_optimization |
|
607 | @register_optimization | |
608 | class redeltaall(optimization): |
|
608 | class redeltaall(optimization): | |
609 | name = b're-delta-all' |
|
609 | name = b're-delta-all' | |
610 |
|
610 | |||
611 | type = OPTIMISATION |
|
611 | type = OPTIMISATION | |
612 |
|
612 | |||
613 | description = _( |
|
613 | description = _( | |
614 | b'deltas within internal storage will always be ' |
|
614 | b'deltas within internal storage will always be ' | |
615 | b'recalculated without reusing prior deltas; this will ' |
|
615 | b'recalculated without reusing prior deltas; this will ' | |
616 | b'likely make execution run several times slower; this ' |
|
616 | b'likely make execution run several times slower; this ' | |
617 | b'optimization is typically not needed' |
|
617 | b'optimization is typically not needed' | |
618 | ) |
|
618 | ) | |
619 |
|
619 | |||
620 | upgrademessage = _( |
|
620 | upgrademessage = _( | |
621 | b'deltas within internal storage will be fully ' |
|
621 | b'deltas within internal storage will be fully ' | |
622 | b'recomputed; this will likely drastically slow down ' |
|
622 | b'recomputed; this will likely drastically slow down ' | |
623 | b'execution time' |
|
623 | b'execution time' | |
624 | ) |
|
624 | ) | |
625 |
|
625 | |||
626 |
|
626 | |||
627 | @register_optimization |
|
627 | @register_optimization | |
628 | class redeltafulladd(optimization): |
|
628 | class redeltafulladd(optimization): | |
629 | name = b're-delta-fulladd' |
|
629 | name = b're-delta-fulladd' | |
630 |
|
630 | |||
631 | type = OPTIMISATION |
|
631 | type = OPTIMISATION | |
632 |
|
632 | |||
633 | description = _( |
|
633 | description = _( | |
634 | b'every revision will be re-added as if it was new ' |
|
634 | b'every revision will be re-added as if it was new ' | |
635 | b'content. It will go through the full storage ' |
|
635 | b'content. It will go through the full storage ' | |
636 | b'mechanism giving extensions a chance to process it ' |
|
636 | b'mechanism giving extensions a chance to process it ' | |
637 | b'(eg. lfs). This is similar to "re-delta-all" but even ' |
|
637 | b'(eg. lfs). This is similar to "re-delta-all" but even ' | |
638 | b'slower since more logic is involved.' |
|
638 | b'slower since more logic is involved.' | |
639 | ) |
|
639 | ) | |
640 |
|
640 | |||
641 | upgrademessage = _( |
|
641 | upgrademessage = _( | |
642 | b'each revision will be added as new content to the ' |
|
642 | b'each revision will be added as new content to the ' | |
643 | b'internal storage; this will likely drastically slow ' |
|
643 | b'internal storage; this will likely drastically slow ' | |
644 | b'down execution time, but some extensions might need ' |
|
644 | b'down execution time, but some extensions might need ' | |
645 | b'it' |
|
645 | b'it' | |
646 | ) |
|
646 | ) | |
647 |
|
647 | |||
648 |
|
648 | |||
649 | def findoptimizations(repo): |
|
649 | def findoptimizations(repo): | |
650 | """Determine optimisation that could be used during upgrade""" |
|
650 | """Determine optimisation that could be used during upgrade""" | |
651 | # These are unconditionally added. There is logic later that figures out |
|
651 | # These are unconditionally added. There is logic later that figures out | |
652 | # which ones to apply. |
|
652 | # which ones to apply. | |
653 | return list(ALL_OPTIMISATIONS) |
|
653 | return list(ALL_OPTIMISATIONS) | |
654 |
|
654 | |||
655 |
|
655 | |||
656 | def determine_upgrade_actions( |
|
656 | def determine_upgrade_actions( | |
657 | repo, format_upgrades, optimizations, sourcereqs, destreqs |
|
657 | repo, format_upgrades, optimizations, sourcereqs, destreqs | |
658 | ): |
|
658 | ): | |
659 | """Determine upgrade actions that will be performed. |
|
659 | """Determine upgrade actions that will be performed. | |
660 |
|
660 | |||
661 | Given a list of improvements as returned by ``find_format_upgrades`` and |
|
661 | Given a list of improvements as returned by ``find_format_upgrades`` and | |
662 | ``findoptimizations``, determine the list of upgrade actions that |
|
662 | ``findoptimizations``, determine the list of upgrade actions that | |
663 | will be performed. |
|
663 | will be performed. | |
664 |
|
664 | |||
665 | The role of this function is to filter improvements if needed, apply |
|
665 | The role of this function is to filter improvements if needed, apply | |
666 | recommended optimizations from the improvements list that make sense, |
|
666 | recommended optimizations from the improvements list that make sense, | |
667 | etc. |
|
667 | etc. | |
668 |
|
668 | |||
669 | Returns a list of action names. |
|
669 | Returns a list of action names. | |
670 | """ |
|
670 | """ | |
671 | newactions = [] |
|
671 | newactions = [] | |
672 |
|
672 | |||
673 | for d in format_upgrades: |
|
673 | for d in format_upgrades: | |
674 | if util.safehasattr(d, '_requirement'): |
|
674 | if util.safehasattr(d, '_requirement'): | |
675 | name = d._requirement |
|
675 | name = d._requirement | |
676 | else: |
|
676 | else: | |
677 | name = None |
|
677 | name = None | |
678 |
|
678 | |||
679 | # If the action is a requirement that doesn't show up in the |
|
679 | # If the action is a requirement that doesn't show up in the | |
680 | # destination requirements, prune the action. |
|
680 | # destination requirements, prune the action. | |
681 | if name is not None and name not in destreqs: |
|
681 | if name is not None and name not in destreqs: | |
682 | continue |
|
682 | continue | |
683 |
|
683 | |||
684 | newactions.append(d) |
|
684 | newactions.append(d) | |
685 |
|
685 | |||
686 | newactions.extend( |
|
686 | newactions.extend( | |
687 | o |
|
687 | o | |
688 | for o in sorted(optimizations, key=(lambda x: x.name)) |
|
688 | for o in sorted(optimizations, key=(lambda x: x.name)) | |
689 | if o not in newactions |
|
689 | if o not in newactions | |
690 | ) |
|
690 | ) | |
691 |
|
691 | |||
692 | # FUTURE consider adding some optimizations here for certain transitions. |
|
692 | # FUTURE consider adding some optimizations here for certain transitions. | |
693 | # e.g. adding generaldelta could schedule parent redeltas. |
|
693 | # e.g. adding generaldelta could schedule parent redeltas. | |
694 |
|
694 | |||
695 | return newactions |
|
695 | return newactions | |
696 |
|
696 | |||
697 |
|
697 | |||
698 | class BaseOperation: |
|
698 | class BaseOperation: | |
699 | """base class that contains the minimum for an upgrade to work |
|
699 | """base class that contains the minimum for an upgrade to work | |
700 |
|
700 | |||
701 | (this might need to be extended as the usage for subclass alternative to |
|
701 | (this might need to be extended as the usage for subclass alternative to | |
702 | UpgradeOperation extends) |
|
702 | UpgradeOperation extends) | |
703 | """ |
|
703 | """ | |
704 |
|
704 | |||
705 | def __init__( |
|
705 | def __init__( | |
706 | self, |
|
706 | self, | |
707 | new_requirements, |
|
707 | new_requirements, | |
708 | backup_store, |
|
708 | backup_store, | |
709 | ): |
|
709 | ): | |
710 | self.new_requirements = new_requirements |
|
710 | self.new_requirements = new_requirements | |
711 | # should this operation create a backup of the store |
|
711 | # should this operation create a backup of the store | |
712 | self.backup_store = backup_store |
|
712 | self.backup_store = backup_store | |
713 |
|
713 | |||
714 |
|
714 | |||
715 | class UpgradeOperation(BaseOperation): |
|
715 | class UpgradeOperation(BaseOperation): | |
716 | """represent the work to be done during an upgrade""" |
|
716 | """represent the work to be done during an upgrade""" | |
717 |
|
717 | |||
718 | def __init__( |
|
718 | def __init__( | |
719 | self, |
|
719 | self, | |
720 | ui, |
|
720 | ui, | |
721 | new_requirements, |
|
721 | new_requirements, | |
722 | current_requirements, |
|
722 | current_requirements, | |
723 | upgrade_actions, |
|
723 | upgrade_actions, | |
724 | removed_actions, |
|
724 | removed_actions, | |
725 | revlogs_to_process, |
|
725 | revlogs_to_process, | |
726 | backup_store, |
|
726 | backup_store, | |
727 | ): |
|
727 | ): | |
728 | super().__init__( |
|
728 | super().__init__( | |
729 | new_requirements, |
|
729 | new_requirements, | |
730 | backup_store, |
|
730 | backup_store, | |
731 | ) |
|
731 | ) | |
732 | self.ui = ui |
|
732 | self.ui = ui | |
733 | self.current_requirements = current_requirements |
|
733 | self.current_requirements = current_requirements | |
734 | # list of upgrade actions the operation will perform |
|
734 | # list of upgrade actions the operation will perform | |
735 | self.upgrade_actions = upgrade_actions |
|
735 | self.upgrade_actions = upgrade_actions | |
736 | self.removed_actions = removed_actions |
|
736 | self.removed_actions = removed_actions | |
737 | self.revlogs_to_process = revlogs_to_process |
|
737 | self.revlogs_to_process = revlogs_to_process | |
738 | # requirements which will be added by the operation |
|
738 | # requirements which will be added by the operation | |
739 | self._added_requirements = ( |
|
739 | self._added_requirements = ( | |
740 | self.new_requirements - self.current_requirements |
|
740 | self.new_requirements - self.current_requirements | |
741 | ) |
|
741 | ) | |
742 | # requirements which will be removed by the operation |
|
742 | # requirements which will be removed by the operation | |
743 | self._removed_requirements = ( |
|
743 | self._removed_requirements = ( | |
744 | self.current_requirements - self.new_requirements |
|
744 | self.current_requirements - self.new_requirements | |
745 | ) |
|
745 | ) | |
746 | # requirements which will be preserved by the operation |
|
746 | # requirements which will be preserved by the operation | |
747 | self._preserved_requirements = ( |
|
747 | self._preserved_requirements = ( | |
748 | self.current_requirements & self.new_requirements |
|
748 | self.current_requirements & self.new_requirements | |
749 | ) |
|
749 | ) | |
750 | # optimizations which are not used and it's recommended that they |
|
750 | # optimizations which are not used and it's recommended that they | |
751 | # should use them |
|
751 | # should use them | |
752 | all_optimizations = findoptimizations(None) |
|
752 | all_optimizations = findoptimizations(None) | |
753 | self.unused_optimizations = [ |
|
753 | self.unused_optimizations = [ | |
754 | i for i in all_optimizations if i not in self.upgrade_actions |
|
754 | i for i in all_optimizations if i not in self.upgrade_actions | |
755 | ] |
|
755 | ] | |
756 |
|
756 | |||
757 | # delta reuse mode of this upgrade operation |
|
757 | # delta reuse mode of this upgrade operation | |
758 | upgrade_actions_names = self.upgrade_actions_names |
|
758 | upgrade_actions_names = self.upgrade_actions_names | |
759 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEALWAYS |
|
759 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEALWAYS | |
760 | if b're-delta-all' in upgrade_actions_names: |
|
760 | if b're-delta-all' in upgrade_actions_names: | |
761 | self.delta_reuse_mode = revlog.revlog.DELTAREUSENEVER |
|
761 | self.delta_reuse_mode = revlog.revlog.DELTAREUSENEVER | |
762 | elif b're-delta-parent' in upgrade_actions_names: |
|
762 | elif b're-delta-parent' in upgrade_actions_names: | |
763 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS |
|
763 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS | |
764 | elif b're-delta-multibase' in upgrade_actions_names: |
|
764 | elif b're-delta-multibase' in upgrade_actions_names: | |
765 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS |
|
765 | self.delta_reuse_mode = revlog.revlog.DELTAREUSESAMEREVS | |
766 | elif b're-delta-fulladd' in upgrade_actions_names: |
|
766 | elif b're-delta-fulladd' in upgrade_actions_names: | |
767 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEFULLADD |
|
767 | self.delta_reuse_mode = revlog.revlog.DELTAREUSEFULLADD | |
768 |
|
768 | |||
769 | # should this operation force re-delta of both parents |
|
769 | # should this operation force re-delta of both parents | |
770 | self.force_re_delta_both_parents = ( |
|
770 | self.force_re_delta_both_parents = ( | |
771 | b're-delta-multibase' in upgrade_actions_names |
|
771 | b're-delta-multibase' in upgrade_actions_names | |
772 | ) |
|
772 | ) | |
773 |
|
773 | |||
774 | @property |
|
774 | @property | |
775 | def upgrade_actions_names(self): |
|
775 | def upgrade_actions_names(self): | |
776 | return set([a.name for a in self.upgrade_actions]) |
|
776 | return set([a.name for a in self.upgrade_actions]) | |
777 |
|
777 | |||
778 | @property |
|
778 | @property | |
779 | def requirements_only(self): |
|
779 | def requirements_only(self): | |
780 | # does the operation only touches repository requirement |
|
780 | # does the operation only touches repository requirement | |
781 | return ( |
|
781 | return ( | |
782 | self.touches_requirements |
|
782 | self.touches_requirements | |
783 | and not self.touches_filelogs |
|
783 | and not self.touches_filelogs | |
784 | and not self.touches_manifests |
|
784 | and not self.touches_manifests | |
785 | and not self.touches_changelog |
|
785 | and not self.touches_changelog | |
786 | and not self.touches_dirstate |
|
786 | and not self.touches_dirstate | |
787 | ) |
|
787 | ) | |
788 |
|
788 | |||
789 | @property |
|
789 | @property | |
790 | def touches_filelogs(self): |
|
790 | def touches_filelogs(self): | |
791 | for a in self.upgrade_actions: |
|
791 | for a in self.upgrade_actions: | |
792 | # in optimisations, we re-process the revlogs again |
|
792 | # in optimisations, we re-process the revlogs again | |
793 | if a.type == OPTIMISATION: |
|
793 | if a.type == OPTIMISATION: | |
794 | return True |
|
794 | return True | |
795 | elif a.touches_filelogs: |
|
795 | elif a.touches_filelogs: | |
796 | return True |
|
796 | return True | |
797 | for a in self.removed_actions: |
|
797 | for a in self.removed_actions: | |
798 | if a.touches_filelogs: |
|
798 | if a.touches_filelogs: | |
799 | return True |
|
799 | return True | |
800 | return False |
|
800 | return False | |
801 |
|
801 | |||
802 | @property |
|
802 | @property | |
803 | def touches_manifests(self): |
|
803 | def touches_manifests(self): | |
804 | for a in self.upgrade_actions: |
|
804 | for a in self.upgrade_actions: | |
805 | # in optimisations, we re-process the revlogs again |
|
805 | # in optimisations, we re-process the revlogs again | |
806 | if a.type == OPTIMISATION: |
|
806 | if a.type == OPTIMISATION: | |
807 | return True |
|
807 | return True | |
808 | elif a.touches_manifests: |
|
808 | elif a.touches_manifests: | |
809 | return True |
|
809 | return True | |
810 | for a in self.removed_actions: |
|
810 | for a in self.removed_actions: | |
811 | if a.touches_manifests: |
|
811 | if a.touches_manifests: | |
812 | return True |
|
812 | return True | |
813 | return False |
|
813 | return False | |
814 |
|
814 | |||
815 | @property |
|
815 | @property | |
816 | def touches_changelog(self): |
|
816 | def touches_changelog(self): | |
817 | for a in self.upgrade_actions: |
|
817 | for a in self.upgrade_actions: | |
818 | # in optimisations, we re-process the revlogs again |
|
818 | # in optimisations, we re-process the revlogs again | |
819 | if a.type == OPTIMISATION: |
|
819 | if a.type == OPTIMISATION: | |
820 | return True |
|
820 | return True | |
821 | elif a.touches_changelog: |
|
821 | elif a.touches_changelog: | |
822 | return True |
|
822 | return True | |
823 | for a in self.removed_actions: |
|
823 | for a in self.removed_actions: | |
824 | if a.touches_changelog: |
|
824 | if a.touches_changelog: | |
825 | return True |
|
825 | return True | |
826 | return False |
|
826 | return False | |
827 |
|
827 | |||
828 | @property |
|
828 | @property | |
829 | def touches_requirements(self): |
|
829 | def touches_requirements(self): | |
830 | for a in self.upgrade_actions: |
|
830 | for a in self.upgrade_actions: | |
831 | # optimisations are used to re-process revlogs and does not result |
|
831 | # optimisations are used to re-process revlogs and does not result | |
832 | # in a requirement being added or removed |
|
832 | # in a requirement being added or removed | |
833 | if a.type == OPTIMISATION: |
|
833 | if a.type == OPTIMISATION: | |
834 | pass |
|
834 | pass | |
835 | elif a.touches_requirements: |
|
835 | elif a.touches_requirements: | |
836 | return True |
|
836 | return True | |
837 | for a in self.removed_actions: |
|
837 | for a in self.removed_actions: | |
838 | if a.touches_requirements: |
|
838 | if a.touches_requirements: | |
839 | return True |
|
839 | return True | |
840 |
|
840 | |||
841 | @property |
|
841 | @property | |
842 | def touches_dirstate(self): |
|
842 | def touches_dirstate(self): | |
843 | for a in self.upgrade_actions: |
|
843 | for a in self.upgrade_actions: | |
844 | # revlog optimisations do not affect the dirstate |
|
844 | # revlog optimisations do not affect the dirstate | |
845 | if a.type == OPTIMISATION: |
|
845 | if a.type == OPTIMISATION: | |
846 | pass |
|
846 | pass | |
847 | elif a.touches_dirstate: |
|
847 | elif a.touches_dirstate: | |
848 | return True |
|
848 | return True | |
849 | for a in self.removed_actions: |
|
849 | for a in self.removed_actions: | |
850 | if a.touches_dirstate: |
|
850 | if a.touches_dirstate: | |
851 | return True |
|
851 | return True | |
852 |
|
852 | |||
853 | return False |
|
853 | return False | |
854 |
|
854 | |||
855 | def _write_labeled(self, l, label: bytes): |
|
855 | def _write_labeled(self, l, label: bytes): | |
856 | """ |
|
856 | """ | |
857 | Utility function to aid writing of a list under one label |
|
857 | Utility function to aid writing of a list under one label | |
858 | """ |
|
858 | """ | |
859 | first = True |
|
859 | first = True | |
860 | for r in sorted(l): |
|
860 | for r in sorted(l): | |
861 | if not first: |
|
861 | if not first: | |
862 | self.ui.write(b', ') |
|
862 | self.ui.write(b', ') | |
863 | self.ui.write(r, label=label) |
|
863 | self.ui.write(r, label=label) | |
864 | first = False |
|
864 | first = False | |
865 |
|
865 | |||
866 | def print_requirements(self): |
|
866 | def print_requirements(self): | |
867 | self.ui.write(_(b'requirements\n')) |
|
867 | self.ui.write(_(b'requirements\n')) | |
868 | self.ui.write(_(b' preserved: ')) |
|
868 | self.ui.write(_(b' preserved: ')) | |
869 | self._write_labeled( |
|
869 | self._write_labeled( | |
870 | self._preserved_requirements, b"upgrade-repo.requirement.preserved" |
|
870 | self._preserved_requirements, b"upgrade-repo.requirement.preserved" | |
871 | ) |
|
871 | ) | |
872 | self.ui.write((b'\n')) |
|
872 | self.ui.write((b'\n')) | |
873 | if self._removed_requirements: |
|
873 | if self._removed_requirements: | |
874 | self.ui.write(_(b' removed: ')) |
|
874 | self.ui.write(_(b' removed: ')) | |
875 | self._write_labeled( |
|
875 | self._write_labeled( | |
876 | self._removed_requirements, b"upgrade-repo.requirement.removed" |
|
876 | self._removed_requirements, b"upgrade-repo.requirement.removed" | |
877 | ) |
|
877 | ) | |
878 | self.ui.write((b'\n')) |
|
878 | self.ui.write((b'\n')) | |
879 | if self._added_requirements: |
|
879 | if self._added_requirements: | |
880 | self.ui.write(_(b' added: ')) |
|
880 | self.ui.write(_(b' added: ')) | |
881 | self._write_labeled( |
|
881 | self._write_labeled( | |
882 | self._added_requirements, b"upgrade-repo.requirement.added" |
|
882 | self._added_requirements, b"upgrade-repo.requirement.added" | |
883 | ) |
|
883 | ) | |
884 | self.ui.write((b'\n')) |
|
884 | self.ui.write((b'\n')) | |
885 | self.ui.write(b'\n') |
|
885 | self.ui.write(b'\n') | |
886 |
|
886 | |||
887 | def print_optimisations(self): |
|
887 | def print_optimisations(self): | |
888 | optimisations = [ |
|
888 | optimisations = [ | |
889 | a for a in self.upgrade_actions if a.type == OPTIMISATION |
|
889 | a for a in self.upgrade_actions if a.type == OPTIMISATION | |
890 | ] |
|
890 | ] | |
891 | optimisations.sort(key=lambda a: a.name) |
|
891 | optimisations.sort(key=lambda a: a.name) | |
892 | if optimisations: |
|
892 | if optimisations: | |
893 | self.ui.write(_(b'optimisations: ')) |
|
893 | self.ui.write(_(b'optimisations: ')) | |
894 | self._write_labeled( |
|
894 | self._write_labeled( | |
895 | [a.name for a in optimisations], |
|
895 | [a.name for a in optimisations], | |
896 | b"upgrade-repo.optimisation.performed", |
|
896 | b"upgrade-repo.optimisation.performed", | |
897 | ) |
|
897 | ) | |
898 | self.ui.write(b'\n\n') |
|
898 | self.ui.write(b'\n\n') | |
899 |
|
899 | |||
900 | def print_upgrade_actions(self): |
|
900 | def print_upgrade_actions(self): | |
901 | for a in self.upgrade_actions: |
|
901 | for a in self.upgrade_actions: | |
902 | self.ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) |
|
902 | self.ui.status(b'%s\n %s\n\n' % (a.name, a.upgrademessage)) | |
903 |
|
903 | |||
904 | def print_affected_revlogs(self): |
|
904 | def print_affected_revlogs(self): | |
905 | if not self.revlogs_to_process: |
|
905 | if not self.revlogs_to_process: | |
906 | self.ui.write((b'no revlogs to process\n')) |
|
906 | self.ui.write((b'no revlogs to process\n')) | |
907 | else: |
|
907 | else: | |
908 | self.ui.write((b'processed revlogs:\n')) |
|
908 | self.ui.write((b'processed revlogs:\n')) | |
909 | for r in sorted(self.revlogs_to_process): |
|
909 | for r in sorted(self.revlogs_to_process): | |
910 | self.ui.write((b' - %s\n' % r)) |
|
910 | self.ui.write((b' - %s\n' % r)) | |
911 | self.ui.write((b'\n')) |
|
911 | self.ui.write((b'\n')) | |
912 |
|
912 | |||
913 | def print_unused_optimizations(self): |
|
913 | def print_unused_optimizations(self): | |
914 | for i in self.unused_optimizations: |
|
914 | for i in self.unused_optimizations: | |
915 | self.ui.status(_(b'%s\n %s\n\n') % (i.name, i.description)) |
|
915 | self.ui.status(_(b'%s\n %s\n\n') % (i.name, i.description)) | |
916 |
|
916 | |||
917 | def has_upgrade_action(self, name): |
|
917 | def has_upgrade_action(self, name): | |
918 | """Check whether the upgrade operation will perform this action""" |
|
918 | """Check whether the upgrade operation will perform this action""" | |
919 | return name in self._upgrade_actions_names |
|
919 | return name in self._upgrade_actions_names | |
920 |
|
920 | |||
921 | def print_post_op_messages(self): |
|
921 | def print_post_op_messages(self): | |
922 | """print post upgrade operation warning messages""" |
|
922 | """print post upgrade operation warning messages""" | |
923 | for a in self.upgrade_actions: |
|
923 | for a in self.upgrade_actions: | |
924 | if a.postupgrademessage is not None: |
|
924 | if a.postupgrademessage is not None: | |
925 | self.ui.warn(b'%s\n' % a.postupgrademessage) |
|
925 | self.ui.warn(b'%s\n' % a.postupgrademessage) | |
926 | for a in self.removed_actions: |
|
926 | for a in self.removed_actions: | |
927 | if a.postdowngrademessage is not None: |
|
927 | if a.postdowngrademessage is not None: | |
928 | self.ui.warn(b'%s\n' % a.postdowngrademessage) |
|
928 | self.ui.warn(b'%s\n' % a.postdowngrademessage) | |
929 |
|
929 | |||
930 |
|
930 | |||
931 | ### Code checking if a repository can got through the upgrade process at all. # |
|
931 | ### Code checking if a repository can got through the upgrade process at all. # | |
932 |
|
932 | |||
933 |
|
933 | |||
934 | def requiredsourcerequirements(repo): |
|
934 | def requiredsourcerequirements(repo): | |
935 | """Obtain requirements required to be present to upgrade a repo. |
|
935 | """Obtain requirements required to be present to upgrade a repo. | |
936 |
|
936 | |||
937 | An upgrade will not be allowed if the repository doesn't have the |
|
937 | An upgrade will not be allowed if the repository doesn't have the | |
938 | requirements returned by this function. |
|
938 | requirements returned by this function. | |
939 | """ |
|
939 | """ | |
940 | return { |
|
940 | return { | |
941 | # Introduced in Mercurial 0.9.2. |
|
941 | # Introduced in Mercurial 0.9.2. | |
942 | requirements.STORE_REQUIREMENT, |
|
942 | requirements.STORE_REQUIREMENT, | |
943 | } |
|
943 | } | |
944 |
|
944 | |||
945 |
|
945 | |||
946 | def blocksourcerequirements(repo): |
|
946 | def blocksourcerequirements(repo): | |
947 | """Obtain requirements that will prevent an upgrade from occurring. |
|
947 | """Obtain requirements that will prevent an upgrade from occurring. | |
948 |
|
948 | |||
949 | An upgrade cannot be performed if the source repository contains a |
|
949 | An upgrade cannot be performed if the source repository contains a | |
950 | requirements in the returned set. |
|
950 | requirements in the returned set. | |
951 | """ |
|
951 | """ | |
952 | return { |
|
952 | return { | |
953 | # The upgrade code does not yet support these experimental features. |
|
|||
954 | # This is an artificial limitation. |
|
|||
955 | requirements.TREEMANIFEST_REQUIREMENT, |
|
|||
956 | # This was a precursor to generaldelta and was never enabled by default. |
|
953 | # This was a precursor to generaldelta and was never enabled by default. | |
957 | # It should (hopefully) not exist in the wild. |
|
954 | # It should (hopefully) not exist in the wild. | |
958 | b'parentdelta', |
|
955 | b'parentdelta', | |
959 | } |
|
956 | } | |
960 |
|
957 | |||
961 |
|
958 | |||
962 | def check_revlog_version(reqs): |
|
959 | def check_revlog_version(reqs): | |
963 | """Check that the requirements contain at least one Revlog version""" |
|
960 | """Check that the requirements contain at least one Revlog version""" | |
964 | all_revlogs = { |
|
961 | all_revlogs = { | |
965 | requirements.REVLOGV1_REQUIREMENT, |
|
962 | requirements.REVLOGV1_REQUIREMENT, | |
966 | requirements.REVLOGV2_REQUIREMENT, |
|
963 | requirements.REVLOGV2_REQUIREMENT, | |
967 | } |
|
964 | } | |
968 | if not all_revlogs.intersection(reqs): |
|
965 | if not all_revlogs.intersection(reqs): | |
969 | msg = _(b'cannot upgrade repository; missing a revlog version') |
|
966 | msg = _(b'cannot upgrade repository; missing a revlog version') | |
970 | raise error.Abort(msg) |
|
967 | raise error.Abort(msg) | |
971 |
|
968 | |||
972 |
|
969 | |||
973 | def check_source_requirements(repo): |
|
970 | def check_source_requirements(repo): | |
974 | """Ensure that no existing requirements prevent the repository upgrade""" |
|
971 | """Ensure that no existing requirements prevent the repository upgrade""" | |
975 |
|
972 | |||
976 | check_revlog_version(repo.requirements) |
|
973 | check_revlog_version(repo.requirements) | |
977 | required = requiredsourcerequirements(repo) |
|
974 | required = requiredsourcerequirements(repo) | |
978 | missingreqs = required - repo.requirements |
|
975 | missingreqs = required - repo.requirements | |
979 | if missingreqs: |
|
976 | if missingreqs: | |
980 | msg = _(b'cannot upgrade repository; requirement missing: %s') |
|
977 | msg = _(b'cannot upgrade repository; requirement missing: %s') | |
981 | missingreqs = b', '.join(sorted(missingreqs)) |
|
978 | missingreqs = b', '.join(sorted(missingreqs)) | |
982 | raise error.Abort(msg % missingreqs) |
|
979 | raise error.Abort(msg % missingreqs) | |
983 |
|
980 | |||
984 | blocking = blocksourcerequirements(repo) |
|
981 | blocking = blocksourcerequirements(repo) | |
985 | blockingreqs = blocking & repo.requirements |
|
982 | blockingreqs = blocking & repo.requirements | |
986 | if blockingreqs: |
|
983 | if blockingreqs: | |
987 | m = _(b'cannot upgrade repository; unsupported source requirement: %s') |
|
984 | m = _(b'cannot upgrade repository; unsupported source requirement: %s') | |
988 | blockingreqs = b', '.join(sorted(blockingreqs)) |
|
985 | blockingreqs = b', '.join(sorted(blockingreqs)) | |
989 | raise error.Abort(m % blockingreqs) |
|
986 | raise error.Abort(m % blockingreqs) | |
990 | # Upgrade should operate on the actual store, not the shared link. |
|
987 | # Upgrade should operate on the actual store, not the shared link. | |
991 |
|
988 | |||
992 | bad_share = ( |
|
989 | bad_share = ( | |
993 | requirements.SHARED_REQUIREMENT in repo.requirements |
|
990 | requirements.SHARED_REQUIREMENT in repo.requirements | |
994 | and requirements.SHARESAFE_REQUIREMENT not in repo.requirements |
|
991 | and requirements.SHARESAFE_REQUIREMENT not in repo.requirements | |
995 | ) |
|
992 | ) | |
996 | if bad_share: |
|
993 | if bad_share: | |
997 | m = _(b'cannot upgrade repository; share repository without share-safe') |
|
994 | m = _(b'cannot upgrade repository; share repository without share-safe') | |
998 | h = _(b'check :hg:`help config.format.use-share-safe`') |
|
995 | h = _(b'check :hg:`help config.format.use-share-safe`') | |
999 | raise error.Abort(m, hint=h) |
|
996 | raise error.Abort(m, hint=h) | |
1000 |
|
997 | |||
1001 |
|
998 | |||
1002 | ### Verify the validity of the planned requirement changes #################### |
|
999 | ### Verify the validity of the planned requirement changes #################### | |
1003 |
|
1000 | |||
1004 |
|
1001 | |||
1005 | def supportremovedrequirements(repo): |
|
1002 | def supportremovedrequirements(repo): | |
1006 | """Obtain requirements that can be removed during an upgrade. |
|
1003 | """Obtain requirements that can be removed during an upgrade. | |
1007 |
|
1004 | |||
1008 | If an upgrade were to create a repository that dropped a requirement, |
|
1005 | If an upgrade were to create a repository that dropped a requirement, | |
1009 | the dropped requirement must appear in the returned set for the upgrade |
|
1006 | the dropped requirement must appear in the returned set for the upgrade | |
1010 | to be allowed. |
|
1007 | to be allowed. | |
1011 | """ |
|
1008 | """ | |
1012 | supported = { |
|
1009 | supported = { | |
1013 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
1010 | requirements.SPARSEREVLOG_REQUIREMENT, | |
1014 | requirements.COPIESSDC_REQUIREMENT, |
|
1011 | requirements.COPIESSDC_REQUIREMENT, | |
1015 | requirements.NODEMAP_REQUIREMENT, |
|
1012 | requirements.NODEMAP_REQUIREMENT, | |
1016 | requirements.SHARESAFE_REQUIREMENT, |
|
1013 | requirements.SHARESAFE_REQUIREMENT, | |
1017 | requirements.REVLOGV2_REQUIREMENT, |
|
1014 | requirements.REVLOGV2_REQUIREMENT, | |
1018 | requirements.CHANGELOGV2_REQUIREMENT, |
|
1015 | requirements.CHANGELOGV2_REQUIREMENT, | |
1019 | requirements.REVLOGV1_REQUIREMENT, |
|
1016 | requirements.REVLOGV1_REQUIREMENT, | |
1020 | requirements.DIRSTATE_TRACKED_HINT_V1, |
|
1017 | requirements.DIRSTATE_TRACKED_HINT_V1, | |
1021 | requirements.DIRSTATE_V2_REQUIREMENT, |
|
1018 | requirements.DIRSTATE_V2_REQUIREMENT, | |
1022 | } |
|
1019 | } | |
1023 | for name in compression.compengines: |
|
1020 | for name in compression.compengines: | |
1024 | engine = compression.compengines[name] |
|
1021 | engine = compression.compengines[name] | |
1025 | if engine.available() and engine.revlogheader(): |
|
1022 | if engine.available() and engine.revlogheader(): | |
1026 | supported.add(b'exp-compression-%s' % name) |
|
1023 | supported.add(b'exp-compression-%s' % name) | |
1027 | if engine.name() == b'zstd': |
|
1024 | if engine.name() == b'zstd': | |
1028 | supported.add(b'revlog-compression-zstd') |
|
1025 | supported.add(b'revlog-compression-zstd') | |
1029 | return supported |
|
1026 | return supported | |
1030 |
|
1027 | |||
1031 |
|
1028 | |||
1032 | def supporteddestrequirements(repo): |
|
1029 | def supporteddestrequirements(repo): | |
1033 | """Obtain requirements that upgrade supports in the destination. |
|
1030 | """Obtain requirements that upgrade supports in the destination. | |
1034 |
|
1031 | |||
1035 | If the result of the upgrade would have requirements not in this set, |
|
1032 | If the result of the upgrade would have requirements not in this set, | |
1036 | the upgrade is disallowed. |
|
1033 | the upgrade is disallowed. | |
1037 |
|
1034 | |||
1038 | Extensions should monkeypatch this to add their custom requirements. |
|
1035 | Extensions should monkeypatch this to add their custom requirements. | |
1039 | """ |
|
1036 | """ | |
1040 | supported = { |
|
1037 | supported = { | |
1041 | requirements.CHANGELOGV2_REQUIREMENT, |
|
1038 | requirements.CHANGELOGV2_REQUIREMENT, | |
1042 | requirements.COPIESSDC_REQUIREMENT, |
|
1039 | requirements.COPIESSDC_REQUIREMENT, | |
1043 | requirements.DIRSTATE_TRACKED_HINT_V1, |
|
1040 | requirements.DIRSTATE_TRACKED_HINT_V1, | |
1044 | requirements.DIRSTATE_V2_REQUIREMENT, |
|
1041 | requirements.DIRSTATE_V2_REQUIREMENT, | |
1045 | requirements.DOTENCODE_REQUIREMENT, |
|
1042 | requirements.DOTENCODE_REQUIREMENT, | |
1046 | requirements.FNCACHE_REQUIREMENT, |
|
1043 | requirements.FNCACHE_REQUIREMENT, | |
1047 | requirements.GENERALDELTA_REQUIREMENT, |
|
1044 | requirements.GENERALDELTA_REQUIREMENT, | |
1048 | requirements.NODEMAP_REQUIREMENT, |
|
1045 | requirements.NODEMAP_REQUIREMENT, | |
1049 | requirements.REVLOGV1_REQUIREMENT, # allowed in case of downgrade |
|
1046 | requirements.REVLOGV1_REQUIREMENT, # allowed in case of downgrade | |
1050 | requirements.REVLOGV2_REQUIREMENT, |
|
1047 | requirements.REVLOGV2_REQUIREMENT, | |
1051 | requirements.SHARED_REQUIREMENT, |
|
1048 | requirements.SHARED_REQUIREMENT, | |
1052 | requirements.SHARESAFE_REQUIREMENT, |
|
1049 | requirements.SHARESAFE_REQUIREMENT, | |
1053 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
1050 | requirements.SPARSEREVLOG_REQUIREMENT, | |
1054 | requirements.STORE_REQUIREMENT, |
|
1051 | requirements.STORE_REQUIREMENT, | |
|
1052 | requirements.TREEMANIFEST_REQUIREMENT, | |||
1055 | requirements.NARROW_REQUIREMENT, |
|
1053 | requirements.NARROW_REQUIREMENT, | |
1056 | } |
|
1054 | } | |
1057 | for name in compression.compengines: |
|
1055 | for name in compression.compengines: | |
1058 | engine = compression.compengines[name] |
|
1056 | engine = compression.compengines[name] | |
1059 | if engine.available() and engine.revlogheader(): |
|
1057 | if engine.available() and engine.revlogheader(): | |
1060 | supported.add(b'exp-compression-%s' % name) |
|
1058 | supported.add(b'exp-compression-%s' % name) | |
1061 | if engine.name() == b'zstd': |
|
1059 | if engine.name() == b'zstd': | |
1062 | supported.add(b'revlog-compression-zstd') |
|
1060 | supported.add(b'revlog-compression-zstd') | |
1063 | return supported |
|
1061 | return supported | |
1064 |
|
1062 | |||
1065 |
|
1063 | |||
1066 | def allowednewrequirements(repo): |
|
1064 | def allowednewrequirements(repo): | |
1067 | """Obtain requirements that can be added to a repository during upgrade. |
|
1065 | """Obtain requirements that can be added to a repository during upgrade. | |
1068 |
|
1066 | |||
1069 | This is used to disallow proposed requirements from being added when |
|
1067 | This is used to disallow proposed requirements from being added when | |
1070 | they weren't present before. |
|
1068 | they weren't present before. | |
1071 |
|
1069 | |||
1072 | We use a list of allowed requirement additions instead of a list of known |
|
1070 | We use a list of allowed requirement additions instead of a list of known | |
1073 | bad additions because the whitelist approach is safer and will prevent |
|
1071 | bad additions because the whitelist approach is safer and will prevent | |
1074 | future, unknown requirements from accidentally being added. |
|
1072 | future, unknown requirements from accidentally being added. | |
1075 | """ |
|
1073 | """ | |
1076 | supported = { |
|
1074 | supported = { | |
1077 | requirements.DOTENCODE_REQUIREMENT, |
|
1075 | requirements.DOTENCODE_REQUIREMENT, | |
1078 | requirements.FNCACHE_REQUIREMENT, |
|
1076 | requirements.FNCACHE_REQUIREMENT, | |
1079 | requirements.GENERALDELTA_REQUIREMENT, |
|
1077 | requirements.GENERALDELTA_REQUIREMENT, | |
1080 | requirements.SPARSEREVLOG_REQUIREMENT, |
|
1078 | requirements.SPARSEREVLOG_REQUIREMENT, | |
1081 | requirements.COPIESSDC_REQUIREMENT, |
|
1079 | requirements.COPIESSDC_REQUIREMENT, | |
1082 | requirements.NODEMAP_REQUIREMENT, |
|
1080 | requirements.NODEMAP_REQUIREMENT, | |
1083 | requirements.SHARESAFE_REQUIREMENT, |
|
1081 | requirements.SHARESAFE_REQUIREMENT, | |
1084 | requirements.REVLOGV1_REQUIREMENT, |
|
1082 | requirements.REVLOGV1_REQUIREMENT, | |
1085 | requirements.REVLOGV2_REQUIREMENT, |
|
1083 | requirements.REVLOGV2_REQUIREMENT, | |
1086 | requirements.CHANGELOGV2_REQUIREMENT, |
|
1084 | requirements.CHANGELOGV2_REQUIREMENT, | |
1087 | requirements.DIRSTATE_TRACKED_HINT_V1, |
|
1085 | requirements.DIRSTATE_TRACKED_HINT_V1, | |
1088 | requirements.DIRSTATE_V2_REQUIREMENT, |
|
1086 | requirements.DIRSTATE_V2_REQUIREMENT, | |
1089 | } |
|
1087 | } | |
1090 | for name in compression.compengines: |
|
1088 | for name in compression.compengines: | |
1091 | engine = compression.compengines[name] |
|
1089 | engine = compression.compengines[name] | |
1092 | if engine.available() and engine.revlogheader(): |
|
1090 | if engine.available() and engine.revlogheader(): | |
1093 | supported.add(b'exp-compression-%s' % name) |
|
1091 | supported.add(b'exp-compression-%s' % name) | |
1094 | if engine.name() == b'zstd': |
|
1092 | if engine.name() == b'zstd': | |
1095 | supported.add(b'revlog-compression-zstd') |
|
1093 | supported.add(b'revlog-compression-zstd') | |
1096 | return supported |
|
1094 | return supported | |
1097 |
|
1095 | |||
1098 |
|
1096 | |||
1099 | def check_requirements_changes(repo, new_reqs): |
|
1097 | def check_requirements_changes(repo, new_reqs): | |
1100 | old_reqs = repo.requirements |
|
1098 | old_reqs = repo.requirements | |
1101 | check_revlog_version(repo.requirements) |
|
1099 | check_revlog_version(repo.requirements) | |
1102 | support_removal = supportremovedrequirements(repo) |
|
1100 | support_removal = supportremovedrequirements(repo) | |
1103 | no_remove_reqs = old_reqs - new_reqs - support_removal |
|
1101 | no_remove_reqs = old_reqs - new_reqs - support_removal | |
1104 | if no_remove_reqs: |
|
1102 | if no_remove_reqs: | |
1105 | msg = _(b'cannot upgrade repository; requirement would be removed: %s') |
|
1103 | msg = _(b'cannot upgrade repository; requirement would be removed: %s') | |
1106 | no_remove_reqs = b', '.join(sorted(no_remove_reqs)) |
|
1104 | no_remove_reqs = b', '.join(sorted(no_remove_reqs)) | |
1107 | raise error.Abort(msg % no_remove_reqs) |
|
1105 | raise error.Abort(msg % no_remove_reqs) | |
1108 |
|
1106 | |||
1109 | support_addition = allowednewrequirements(repo) |
|
1107 | support_addition = allowednewrequirements(repo) | |
1110 | no_add_reqs = new_reqs - old_reqs - support_addition |
|
1108 | no_add_reqs = new_reqs - old_reqs - support_addition | |
1111 | if no_add_reqs: |
|
1109 | if no_add_reqs: | |
1112 | m = _(b'cannot upgrade repository; do not support adding requirement: ') |
|
1110 | m = _(b'cannot upgrade repository; do not support adding requirement: ') | |
1113 | no_add_reqs = b', '.join(sorted(no_add_reqs)) |
|
1111 | no_add_reqs = b', '.join(sorted(no_add_reqs)) | |
1114 | raise error.Abort(m + no_add_reqs) |
|
1112 | raise error.Abort(m + no_add_reqs) | |
1115 |
|
1113 | |||
1116 | supported = supporteddestrequirements(repo) |
|
1114 | supported = supporteddestrequirements(repo) | |
1117 | unsupported_reqs = new_reqs - supported |
|
1115 | unsupported_reqs = new_reqs - supported | |
1118 | if unsupported_reqs: |
|
1116 | if unsupported_reqs: | |
1119 | msg = _( |
|
1117 | msg = _( | |
1120 | b'cannot upgrade repository; do not support destination ' |
|
1118 | b'cannot upgrade repository; do not support destination ' | |
1121 | b'requirement: %s' |
|
1119 | b'requirement: %s' | |
1122 | ) |
|
1120 | ) | |
1123 | unsupported_reqs = b', '.join(sorted(unsupported_reqs)) |
|
1121 | unsupported_reqs = b', '.join(sorted(unsupported_reqs)) | |
1124 | raise error.Abort(msg % unsupported_reqs) |
|
1122 | raise error.Abort(msg % unsupported_reqs) |
@@ -1,552 +1,546 b'' | |||||
1 | #testcases flat tree |
|
1 | #testcases flat tree | |
2 | #testcases lfs-on lfs-off |
|
2 | #testcases lfs-on lfs-off | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > evolution=createmarkers |
|
6 | > evolution=createmarkers | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | #if lfs-on |
|
9 | #if lfs-on | |
10 | $ cat >> $HGRCPATH <<EOF |
|
10 | $ cat >> $HGRCPATH <<EOF | |
11 | > [extensions] |
|
11 | > [extensions] | |
12 | > lfs = |
|
12 | > lfs = | |
13 | > EOF |
|
13 | > EOF | |
14 | #endif |
|
14 | #endif | |
15 |
|
15 | |||
16 | $ . "$TESTDIR/narrow-library.sh" |
|
16 | $ . "$TESTDIR/narrow-library.sh" | |
17 |
|
17 | |||
18 | #if tree |
|
18 | #if tree | |
19 | $ cat << EOF >> $HGRCPATH |
|
19 | $ cat << EOF >> $HGRCPATH | |
20 | > [experimental] |
|
20 | > [experimental] | |
21 | > treemanifest = 1 |
|
21 | > treemanifest = 1 | |
22 | > EOF |
|
22 | > EOF | |
23 | #endif |
|
23 | #endif | |
24 |
|
24 | |||
25 | $ hg init master |
|
25 | $ hg init master | |
26 | $ cd master |
|
26 | $ cd master | |
27 | $ cat >> .hg/hgrc <<EOF |
|
27 | $ cat >> .hg/hgrc <<EOF | |
28 | > [narrow] |
|
28 | > [narrow] | |
29 | > serveellipses=True |
|
29 | > serveellipses=True | |
30 | > EOF |
|
30 | > EOF | |
31 | $ for x in `$TESTDIR/seq.py 0 10` |
|
31 | $ for x in `$TESTDIR/seq.py 0 10` | |
32 | > do |
|
32 | > do | |
33 | > mkdir d$x |
|
33 | > mkdir d$x | |
34 | > echo $x > d$x/f |
|
34 | > echo $x > d$x/f | |
35 | > hg add d$x/f |
|
35 | > hg add d$x/f | |
36 | > hg commit -m "add d$x/f" |
|
36 | > hg commit -m "add d$x/f" | |
37 | > done |
|
37 | > done | |
38 | $ hg log -T "{rev}: {desc}\n" |
|
38 | $ hg log -T "{rev}: {desc}\n" | |
39 | 10: add d10/f |
|
39 | 10: add d10/f | |
40 | 9: add d9/f |
|
40 | 9: add d9/f | |
41 | 8: add d8/f |
|
41 | 8: add d8/f | |
42 | 7: add d7/f |
|
42 | 7: add d7/f | |
43 | 6: add d6/f |
|
43 | 6: add d6/f | |
44 | 5: add d5/f |
|
44 | 5: add d5/f | |
45 | 4: add d4/f |
|
45 | 4: add d4/f | |
46 | 3: add d3/f |
|
46 | 3: add d3/f | |
47 | 2: add d2/f |
|
47 | 2: add d2/f | |
48 | 1: add d1/f |
|
48 | 1: add d1/f | |
49 | 0: add d0/f |
|
49 | 0: add d0/f | |
50 | $ cd .. |
|
50 | $ cd .. | |
51 |
|
51 | |||
52 | Error if '.' or '..' are in the directory to track. |
|
52 | Error if '.' or '..' are in the directory to track. | |
53 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf |
|
53 | $ hg clone --narrow ssh://user@dummy/master foo --include ./asdf | |
54 | abort: "." and ".." are not allowed in narrowspec paths |
|
54 | abort: "." and ".." are not allowed in narrowspec paths | |
55 | [255] |
|
55 | [255] | |
56 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. |
|
56 | $ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. | |
57 | abort: "." and ".." are not allowed in narrowspec paths |
|
57 | abort: "." and ".." are not allowed in narrowspec paths | |
58 | [255] |
|
58 | [255] | |
59 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c |
|
59 | $ hg clone --narrow ssh://user@dummy/master foo --include a/./c | |
60 | abort: "." and ".." are not allowed in narrowspec paths |
|
60 | abort: "." and ".." are not allowed in narrowspec paths | |
61 | [255] |
|
61 | [255] | |
62 |
|
62 | |||
63 | Names with '.' in them are OK. |
|
63 | Names with '.' in them are OK. | |
64 | $ hg clone --narrow ./master should-work --include a/.b/c |
|
64 | $ hg clone --narrow ./master should-work --include a/.b/c | |
65 | requesting all changes |
|
65 | requesting all changes | |
66 | adding changesets |
|
66 | adding changesets | |
67 | adding manifests |
|
67 | adding manifests | |
68 | adding file changes |
|
68 | adding file changes | |
69 | added 1 changesets with 0 changes to 0 files |
|
69 | added 1 changesets with 0 changes to 0 files | |
70 | new changesets * (glob) |
|
70 | new changesets * (glob) | |
71 | updating to branch default |
|
71 | updating to branch default | |
72 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 |
|
73 | |||
74 | The "narrow" repo requirement is ignored by [debugupgraderepo] |
|
74 | The "narrow" repo requirement is ignored by [debugupgraderepo] | |
75 |
|
75 | |||
76 | #if tree |
|
|||
77 | $ (cd should-work; hg debugupgraderepo) |
|
|||
78 | abort: cannot upgrade repository; unsupported source requirement: treemanifest |
|
|||
79 | [255] |
|
|||
80 | #else |
|
|||
81 |
$ |
|
76 | $ (cd should-work; hg debugupgraderepo | grep 'no format upgrades found in existing repository') | |
82 | (no format upgrades found in existing repository) |
|
77 | (no format upgrades found in existing repository) | |
83 | #endif |
|
|||
84 |
|
|
78 | ||
85 | Test repo with local changes |
|
79 | Test repo with local changes | |
86 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 |
|
80 | $ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 | |
87 | requesting all changes |
|
81 | requesting all changes | |
88 | adding changesets |
|
82 | adding changesets | |
89 | adding manifests |
|
83 | adding manifests | |
90 | adding file changes |
|
84 | adding file changes | |
91 | added 6 changesets with 3 changes to 3 files |
|
85 | added 6 changesets with 3 changes to 3 files | |
92 | new changesets *:* (glob) |
|
86 | new changesets *:* (glob) | |
93 | updating to branch default |
|
87 | updating to branch default | |
94 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
95 | $ cd narrow-local-changes |
|
89 | $ cd narrow-local-changes | |
96 | $ echo local change >> d0/f |
|
90 | $ echo local change >> d0/f | |
97 | $ hg ci -m 'local change to d0' |
|
91 | $ hg ci -m 'local change to d0' | |
98 | $ hg co '.^' |
|
92 | $ hg co '.^' | |
99 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
93 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
100 | $ echo local change >> d3/f |
|
94 | $ echo local change >> d3/f | |
101 | $ hg ci -m 'local hidden change to d3' |
|
95 | $ hg ci -m 'local hidden change to d3' | |
102 | created new head |
|
96 | created new head | |
103 | $ hg ci --amend -m 'local change to d3' |
|
97 | $ hg ci --amend -m 'local change to d3' | |
104 | $ hg tracked --removeinclude d0 |
|
98 | $ hg tracked --removeinclude d0 | |
105 | comparing with ssh://user@dummy/master |
|
99 | comparing with ssh://user@dummy/master | |
106 | searching for changes |
|
100 | searching for changes | |
107 | looking for local changes to affected paths |
|
101 | looking for local changes to affected paths | |
108 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
102 | The following changeset(s) or their ancestors have local changes not on the remote: | |
109 | * (glob) |
|
103 | * (glob) | |
110 | abort: local changes found |
|
104 | abort: local changes found | |
111 | (use --force-delete-local-changes to ignore) |
|
105 | (use --force-delete-local-changes to ignore) | |
112 | [20] |
|
106 | [20] | |
113 | Check that nothing was removed by the failed attempts |
|
107 | Check that nothing was removed by the failed attempts | |
114 | $ hg tracked |
|
108 | $ hg tracked | |
115 | I path:d0 |
|
109 | I path:d0 | |
116 | I path:d3 |
|
110 | I path:d3 | |
117 | I path:d6 |
|
111 | I path:d6 | |
118 | $ hg files |
|
112 | $ hg files | |
119 | d0/f |
|
113 | d0/f | |
120 | d3/f |
|
114 | d3/f | |
121 | d6/f |
|
115 | d6/f | |
122 | $ find * |
|
116 | $ find * | |
123 | d0 |
|
117 | d0 | |
124 | d0/f |
|
118 | d0/f | |
125 | d3 |
|
119 | d3 | |
126 | d3/f |
|
120 | d3/f | |
127 | d6 |
|
121 | d6 | |
128 | d6/f |
|
122 | d6/f | |
129 | $ hg verify -q |
|
123 | $ hg verify -q | |
130 | Force deletion of local changes |
|
124 | Force deletion of local changes | |
131 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
|
125 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
132 | 8: local change to d3 |
|
126 | 8: local change to d3 | |
133 | 6: local change to d0 |
|
127 | 6: local change to d0 | |
134 | 5: add d10/f outsidenarrow |
|
128 | 5: add d10/f outsidenarrow | |
135 | 4: add d6/f |
|
129 | 4: add d6/f | |
136 | 3: add d5/f outsidenarrow |
|
130 | 3: add d5/f outsidenarrow | |
137 | 2: add d3/f |
|
131 | 2: add d3/f | |
138 | 1: add d2/f outsidenarrow |
|
132 | 1: add d2/f outsidenarrow | |
139 | 0: add d0/f |
|
133 | 0: add d0/f | |
140 | $ hg tracked --removeinclude d0 --force-delete-local-changes |
|
134 | $ hg tracked --removeinclude d0 --force-delete-local-changes | |
141 | comparing with ssh://user@dummy/master |
|
135 | comparing with ssh://user@dummy/master | |
142 | searching for changes |
|
136 | searching for changes | |
143 | looking for local changes to affected paths |
|
137 | looking for local changes to affected paths | |
144 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
138 | The following changeset(s) or their ancestors have local changes not on the remote: | |
145 | * (glob) |
|
139 | * (glob) | |
146 | moving unwanted changesets to backup |
|
140 | moving unwanted changesets to backup | |
147 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
141 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
148 | deleting data/d0/f.i (reporevlogstore !) |
|
142 | deleting data/d0/f.i (reporevlogstore !) | |
149 | deleting meta/d0/00manifest.i (tree !) |
|
143 | deleting meta/d0/00manifest.i (tree !) | |
150 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
144 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
151 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) |
|
145 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |
152 | deleting data/d0/f/index (reposimplestore !) |
|
146 | deleting data/d0/f/index (reposimplestore !) | |
153 | deleting unwanted files from working copy |
|
147 | deleting unwanted files from working copy | |
154 |
|
148 | |||
155 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
|
149 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
156 | 7: local change to d3 |
|
150 | 7: local change to d3 | |
157 | 5: add d10/f outsidenarrow |
|
151 | 5: add d10/f outsidenarrow | |
158 | 4: add d6/f |
|
152 | 4: add d6/f | |
159 | 3: add d5/f outsidenarrow |
|
153 | 3: add d5/f outsidenarrow | |
160 | 2: add d3/f |
|
154 | 2: add d3/f | |
161 | 1: add d2/f outsidenarrow |
|
155 | 1: add d2/f outsidenarrow | |
162 | 0: add d0/f outsidenarrow |
|
156 | 0: add d0/f outsidenarrow | |
163 | Can restore stripped local changes after widening |
|
157 | Can restore stripped local changes after widening | |
164 | $ hg tracked --addinclude d0 -q |
|
158 | $ hg tracked --addinclude d0 -q | |
165 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q |
|
159 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q | |
166 | $ hg --hidden co -r 'desc("local change to d0")' -q |
|
160 | $ hg --hidden co -r 'desc("local change to d0")' -q | |
167 | $ cat d0/f |
|
161 | $ cat d0/f | |
168 | 0 |
|
162 | 0 | |
169 | local change |
|
163 | local change | |
170 | Pruned commits affecting removed paths should not prevent narrowing |
|
164 | Pruned commits affecting removed paths should not prevent narrowing | |
171 | $ hg co '.^' |
|
165 | $ hg co '.^' | |
172 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
166 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
173 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` |
|
167 | $ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` | |
174 | 1 new obsolescence markers |
|
168 | 1 new obsolescence markers | |
175 | obsoleted 1 changesets |
|
169 | obsoleted 1 changesets | |
176 | $ hg tracked --removeinclude d0 |
|
170 | $ hg tracked --removeinclude d0 | |
177 | comparing with ssh://user@dummy/master |
|
171 | comparing with ssh://user@dummy/master | |
178 | searching for changes |
|
172 | searching for changes | |
179 | looking for local changes to affected paths |
|
173 | looking for local changes to affected paths | |
180 | moving unwanted changesets to backup |
|
174 | moving unwanted changesets to backup | |
181 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
175 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
182 | deleting data/d0/f.i (reporevlogstore !) |
|
176 | deleting data/d0/f.i (reporevlogstore !) | |
183 | deleting meta/d0/00manifest.i (tree !) |
|
177 | deleting meta/d0/00manifest.i (tree !) | |
184 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
178 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
185 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) |
|
179 | deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !) | |
186 | deleting data/d0/f/index (reposimplestore !) |
|
180 | deleting data/d0/f/index (reposimplestore !) | |
187 | deleting unwanted files from working copy |
|
181 | deleting unwanted files from working copy | |
188 |
|
182 | |||
189 | Updates off of stripped commit if necessary |
|
183 | Updates off of stripped commit if necessary | |
190 | $ hg co -r 'desc("local change to d3")' -q |
|
184 | $ hg co -r 'desc("local change to d3")' -q | |
191 | $ echo local change >> d6/f |
|
185 | $ echo local change >> d6/f | |
192 | $ hg ci -m 'local change to d6' |
|
186 | $ hg ci -m 'local change to d6' | |
193 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
187 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
194 | comparing with ssh://user@dummy/master |
|
188 | comparing with ssh://user@dummy/master | |
195 | searching for changes |
|
189 | searching for changes | |
196 | looking for local changes to affected paths |
|
190 | looking for local changes to affected paths | |
197 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
191 | The following changeset(s) or their ancestors have local changes not on the remote: | |
198 | * (glob) |
|
192 | * (glob) | |
199 | * (glob) |
|
193 | * (glob) | |
200 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
194 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
201 | moving unwanted changesets to backup |
|
195 | moving unwanted changesets to backup | |
202 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
196 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
203 | deleting data/d3/f.i (reporevlogstore !) |
|
197 | deleting data/d3/f.i (reporevlogstore !) | |
204 | deleting meta/d3/00manifest.i (tree !) |
|
198 | deleting meta/d3/00manifest.i (tree !) | |
205 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
199 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
206 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) |
|
200 | deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !) | |
207 | deleting data/d3/f/index (reposimplestore !) |
|
201 | deleting data/d3/f/index (reposimplestore !) | |
208 | deleting unwanted files from working copy |
|
202 | deleting unwanted files from working copy | |
209 | $ hg log -T '{desc}\n' -r . |
|
203 | $ hg log -T '{desc}\n' -r . | |
210 | add d10/f |
|
204 | add d10/f | |
211 | Updates to nullid if necessary |
|
205 | Updates to nullid if necessary | |
212 | $ hg tracked --addinclude d3 -q |
|
206 | $ hg tracked --addinclude d3 -q | |
213 | $ hg co null -q |
|
207 | $ hg co null -q | |
214 | $ mkdir d3 |
|
208 | $ mkdir d3 | |
215 | $ echo local change > d3/f |
|
209 | $ echo local change > d3/f | |
216 | $ hg add d3/f |
|
210 | $ hg add d3/f | |
217 | $ hg ci -m 'local change to d3' |
|
211 | $ hg ci -m 'local change to d3' | |
218 | created new head |
|
212 | created new head | |
219 | $ hg tracked --removeinclude d3 --force-delete-local-changes |
|
213 | $ hg tracked --removeinclude d3 --force-delete-local-changes | |
220 | comparing with ssh://user@dummy/master |
|
214 | comparing with ssh://user@dummy/master | |
221 | searching for changes |
|
215 | searching for changes | |
222 | looking for local changes to affected paths |
|
216 | looking for local changes to affected paths | |
223 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
217 | The following changeset(s) or their ancestors have local changes not on the remote: | |
224 | * (glob) |
|
218 | * (glob) | |
225 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
219 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
226 | moving unwanted changesets to backup |
|
220 | moving unwanted changesets to backup | |
227 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
|
221 | saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) | |
228 | deleting data/d3/f.i (reporevlogstore !) |
|
222 | deleting data/d3/f.i (reporevlogstore !) | |
229 | deleting meta/d3/00manifest.i (tree !) |
|
223 | deleting meta/d3/00manifest.i (tree !) | |
230 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
224 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
231 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) |
|
225 | deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !) | |
232 | deleting data/d3/f/index (reposimplestore !) |
|
226 | deleting data/d3/f/index (reposimplestore !) | |
233 | deleting unwanted files from working copy |
|
227 | deleting unwanted files from working copy | |
234 | $ hg id |
|
228 | $ hg id | |
235 | 000000000000 |
|
229 | 000000000000 | |
236 | $ cd .. |
|
230 | $ cd .. | |
237 |
|
231 | |||
238 | Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does) |
|
232 | Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does) | |
239 | $ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q |
|
233 | $ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q | |
240 | $ cd narrow-obsmarkers |
|
234 | $ cd narrow-obsmarkers | |
241 | $ echo a >> d0/f2 |
|
235 | $ echo a >> d0/f2 | |
242 | $ hg add d0/f2 |
|
236 | $ hg add d0/f2 | |
243 | $ hg ci -m 'modify d0/' |
|
237 | $ hg ci -m 'modify d0/' | |
244 | $ echo a >> d3/f2 |
|
238 | $ echo a >> d3/f2 | |
245 | $ hg add d3/f2 |
|
239 | $ hg add d3/f2 | |
246 | $ hg commit --amend -m 'modify d0/ and d3/' |
|
240 | $ hg commit --amend -m 'modify d0/ and d3/' | |
247 | $ hg log -T "{rev}: {desc}\n" |
|
241 | $ hg log -T "{rev}: {desc}\n" | |
248 | 5: modify d0/ and d3/ |
|
242 | 5: modify d0/ and d3/ | |
249 | 3: add d10/f |
|
243 | 3: add d10/f | |
250 | 2: add d3/f |
|
244 | 2: add d3/f | |
251 | 1: add d2/f |
|
245 | 1: add d2/f | |
252 | 0: add d0/f |
|
246 | 0: add d0/f | |
253 | $ hg tracked --removeinclude d3 --force-delete-local-changes -q |
|
247 | $ hg tracked --removeinclude d3 --force-delete-local-changes -q | |
254 | $ hg log -T "{rev}: {desc}\n" |
|
248 | $ hg log -T "{rev}: {desc}\n" | |
255 | 3: add d10/f |
|
249 | 3: add d10/f | |
256 | 2: add d3/f |
|
250 | 2: add d3/f | |
257 | 1: add d2/f |
|
251 | 1: add d2/f | |
258 | 0: add d0/f |
|
252 | 0: add d0/f | |
259 | $ cd .. |
|
253 | $ cd .. | |
260 |
|
254 | |||
261 | Widening doesn't lose bookmarks |
|
255 | Widening doesn't lose bookmarks | |
262 | $ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q |
|
256 | $ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q | |
263 | $ cd widen-bookmarks |
|
257 | $ cd widen-bookmarks | |
264 | $ hg bookmark my-bookmark |
|
258 | $ hg bookmark my-bookmark | |
265 | $ hg log -T "{rev}: {desc} {bookmarks}\n" |
|
259 | $ hg log -T "{rev}: {desc} {bookmarks}\n" | |
266 | 1: add d10/f my-bookmark |
|
260 | 1: add d10/f my-bookmark | |
267 | 0: add d0/f |
|
261 | 0: add d0/f | |
268 | $ hg tracked --addinclude d3 -q |
|
262 | $ hg tracked --addinclude d3 -q | |
269 | $ hg log -T "{rev}: {desc} {bookmarks}\n" |
|
263 | $ hg log -T "{rev}: {desc} {bookmarks}\n" | |
270 | 3: add d10/f my-bookmark |
|
264 | 3: add d10/f my-bookmark | |
271 | 2: add d3/f |
|
265 | 2: add d3/f | |
272 | 1: add d2/f |
|
266 | 1: add d2/f | |
273 | 0: add d0/f |
|
267 | 0: add d0/f | |
274 | $ cd .. |
|
268 | $ cd .. | |
275 |
|
269 | |||
276 | Can remove last include, making repo empty |
|
270 | Can remove last include, making repo empty | |
277 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 |
|
271 | $ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 | |
278 | adding changesets |
|
272 | adding changesets | |
279 | adding manifests |
|
273 | adding manifests | |
280 | adding file changes |
|
274 | adding file changes | |
281 | added 2 changesets with 1 changes to 1 files |
|
275 | added 2 changesets with 1 changes to 1 files | |
282 | new changesets *:* (glob) |
|
276 | new changesets *:* (glob) | |
283 | updating to branch default |
|
277 | updating to branch default | |
284 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
278 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
285 | $ cd narrow-empty |
|
279 | $ cd narrow-empty | |
286 | $ hg tracked --removeinclude d0 |
|
280 | $ hg tracked --removeinclude d0 | |
287 | comparing with ssh://user@dummy/master |
|
281 | comparing with ssh://user@dummy/master | |
288 | searching for changes |
|
282 | searching for changes | |
289 | looking for local changes to affected paths |
|
283 | looking for local changes to affected paths | |
290 | deleting data/d0/f.i (reporevlogstore !) |
|
284 | deleting data/d0/f.i (reporevlogstore !) | |
291 | deleting meta/d0/00manifest.i (tree !) |
|
285 | deleting meta/d0/00manifest.i (tree !) | |
292 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
286 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
293 | deleting data/d0/f/index (reposimplestore !) |
|
287 | deleting data/d0/f/index (reposimplestore !) | |
294 | deleting unwanted files from working copy |
|
288 | deleting unwanted files from working copy | |
295 | $ hg tracked |
|
289 | $ hg tracked | |
296 | $ hg files |
|
290 | $ hg files | |
297 | [1] |
|
291 | [1] | |
298 | $ test -d d0 |
|
292 | $ test -d d0 | |
299 | [1] |
|
293 | [1] | |
300 | Do some work in the empty clone |
|
294 | Do some work in the empty clone | |
301 | $ hg diff --change . |
|
295 | $ hg diff --change . | |
302 | $ hg branch foo |
|
296 | $ hg branch foo | |
303 | marked working directory as branch foo |
|
297 | marked working directory as branch foo | |
304 | (branches are permanent and global, did you want a bookmark?) |
|
298 | (branches are permanent and global, did you want a bookmark?) | |
305 | $ hg ci -m empty |
|
299 | $ hg ci -m empty | |
306 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
|
300 | $ hg log -T "{rev}: {desc} {outsidenarrow}\n" | |
307 | 2: empty |
|
301 | 2: empty | |
308 | 1: add d5/f outsidenarrow |
|
302 | 1: add d5/f outsidenarrow | |
309 | 0: add d0/f outsidenarrow |
|
303 | 0: add d0/f outsidenarrow | |
310 | $ hg pull -q |
|
304 | $ hg pull -q | |
311 | Can widen the empty clone |
|
305 | Can widen the empty clone | |
312 | $ hg tracked --addinclude d0 |
|
306 | $ hg tracked --addinclude d0 | |
313 | comparing with ssh://user@dummy/master |
|
307 | comparing with ssh://user@dummy/master | |
314 | searching for changes |
|
308 | searching for changes | |
315 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) |
|
309 | saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) | |
316 | adding changesets |
|
310 | adding changesets | |
317 | adding manifests |
|
311 | adding manifests | |
318 | adding file changes |
|
312 | adding file changes | |
319 | added 4 changesets with 1 changes to 1 files (+1 heads) |
|
313 | added 4 changesets with 1 changes to 1 files (+1 heads) | |
320 | $ hg tracked |
|
314 | $ hg tracked | |
321 | I path:d0 |
|
315 | I path:d0 | |
322 | $ hg files |
|
316 | $ hg files | |
323 | d0/f |
|
317 | d0/f | |
324 | $ find * |
|
318 | $ find * | |
325 | d0 |
|
319 | d0 | |
326 | d0/f |
|
320 | d0/f | |
327 | $ cd .. |
|
321 | $ cd .. | |
328 |
|
322 | |||
329 | TODO(martinvonz): test including e.g. d3/g and then removing it once |
|
323 | TODO(martinvonz): test including e.g. d3/g and then removing it once | |
330 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed |
|
324 | https://bitbucket.org/Google/narrowhg/issues/6 is fixed | |
331 |
|
325 | |||
332 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 |
|
326 | $ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 | |
333 | requesting all changes |
|
327 | requesting all changes | |
334 | adding changesets |
|
328 | adding changesets | |
335 | adding manifests |
|
329 | adding manifests | |
336 | adding file changes |
|
330 | adding file changes | |
337 | added 8 changesets with 4 changes to 4 files |
|
331 | added 8 changesets with 4 changes to 4 files | |
338 | new changesets *:* (glob) |
|
332 | new changesets *:* (glob) | |
339 | updating to branch default |
|
333 | updating to branch default | |
340 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
334 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
341 | $ cd narrow |
|
335 | $ cd narrow | |
342 | $ hg tracked |
|
336 | $ hg tracked | |
343 | I path:d0 |
|
337 | I path:d0 | |
344 | I path:d3 |
|
338 | I path:d3 | |
345 | I path:d6 |
|
339 | I path:d6 | |
346 | I path:d9 |
|
340 | I path:d9 | |
347 | $ hg tracked --removeinclude d6 |
|
341 | $ hg tracked --removeinclude d6 | |
348 | comparing with ssh://user@dummy/master |
|
342 | comparing with ssh://user@dummy/master | |
349 | searching for changes |
|
343 | searching for changes | |
350 | looking for local changes to affected paths |
|
344 | looking for local changes to affected paths | |
351 | deleting data/d6/f.i (reporevlogstore !) |
|
345 | deleting data/d6/f.i (reporevlogstore !) | |
352 | deleting meta/d6/00manifest.i (tree !) |
|
346 | deleting meta/d6/00manifest.i (tree !) | |
353 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) |
|
347 | deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !) | |
354 | deleting data/d6/f/index (reposimplestore !) |
|
348 | deleting data/d6/f/index (reposimplestore !) | |
355 | deleting unwanted files from working copy |
|
349 | deleting unwanted files from working copy | |
356 | $ hg tracked |
|
350 | $ hg tracked | |
357 | I path:d0 |
|
351 | I path:d0 | |
358 | I path:d3 |
|
352 | I path:d3 | |
359 | I path:d9 |
|
353 | I path:d9 | |
360 | #if repofncache |
|
354 | #if repofncache | |
361 | $ hg debugrebuildfncache |
|
355 | $ hg debugrebuildfncache | |
362 | fncache already up to date |
|
356 | fncache already up to date | |
363 | #endif |
|
357 | #endif | |
364 | $ find * |
|
358 | $ find * | |
365 | d0 |
|
359 | d0 | |
366 | d0/f |
|
360 | d0/f | |
367 | d3 |
|
361 | d3 | |
368 | d3/f |
|
362 | d3/f | |
369 | d9 |
|
363 | d9 | |
370 | d9/f |
|
364 | d9/f | |
371 | $ hg verify -q |
|
365 | $ hg verify -q | |
372 | $ hg tracked --addexclude d3/f |
|
366 | $ hg tracked --addexclude d3/f | |
373 | comparing with ssh://user@dummy/master |
|
367 | comparing with ssh://user@dummy/master | |
374 | searching for changes |
|
368 | searching for changes | |
375 | looking for local changes to affected paths |
|
369 | looking for local changes to affected paths | |
376 | deleting data/d3/f.i (reporevlogstore !) |
|
370 | deleting data/d3/f.i (reporevlogstore !) | |
377 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) |
|
371 | deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !) | |
378 | deleting data/d3/f/index (reposimplestore !) |
|
372 | deleting data/d3/f/index (reposimplestore !) | |
379 | deleting unwanted files from working copy |
|
373 | deleting unwanted files from working copy | |
380 | $ hg tracked |
|
374 | $ hg tracked | |
381 | I path:d0 |
|
375 | I path:d0 | |
382 | I path:d3 |
|
376 | I path:d3 | |
383 | I path:d9 |
|
377 | I path:d9 | |
384 | X path:d3/f |
|
378 | X path:d3/f | |
385 | #if repofncache |
|
379 | #if repofncache | |
386 | $ hg debugrebuildfncache |
|
380 | $ hg debugrebuildfncache | |
387 | fncache already up to date |
|
381 | fncache already up to date | |
388 | #endif |
|
382 | #endif | |
389 | $ find * |
|
383 | $ find * | |
390 | d0 |
|
384 | d0 | |
391 | d0/f |
|
385 | d0/f | |
392 | d9 |
|
386 | d9 | |
393 | d9/f |
|
387 | d9/f | |
394 | $ hg verify -q |
|
388 | $ hg verify -q | |
395 | $ hg tracked --addexclude d0 |
|
389 | $ hg tracked --addexclude d0 | |
396 | comparing with ssh://user@dummy/master |
|
390 | comparing with ssh://user@dummy/master | |
397 | searching for changes |
|
391 | searching for changes | |
398 | looking for local changes to affected paths |
|
392 | looking for local changes to affected paths | |
399 | deleting data/d0/f.i (reporevlogstore !) |
|
393 | deleting data/d0/f.i (reporevlogstore !) | |
400 | deleting meta/d0/00manifest.i (tree !) |
|
394 | deleting meta/d0/00manifest.i (tree !) | |
401 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) |
|
395 | deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !) | |
402 | deleting data/d0/f/index (reposimplestore !) |
|
396 | deleting data/d0/f/index (reposimplestore !) | |
403 | deleting unwanted files from working copy |
|
397 | deleting unwanted files from working copy | |
404 | $ hg tracked |
|
398 | $ hg tracked | |
405 | I path:d3 |
|
399 | I path:d3 | |
406 | I path:d9 |
|
400 | I path:d9 | |
407 | X path:d0 |
|
401 | X path:d0 | |
408 | X path:d3/f |
|
402 | X path:d3/f | |
409 | #if repofncache |
|
403 | #if repofncache | |
410 | $ hg debugrebuildfncache |
|
404 | $ hg debugrebuildfncache | |
411 | fncache already up to date |
|
405 | fncache already up to date | |
412 | #endif |
|
406 | #endif | |
413 | $ find * |
|
407 | $ find * | |
414 | d9 |
|
408 | d9 | |
415 | d9/f |
|
409 | d9/f | |
416 |
|
410 | |||
417 | Make a 15 of changes to d9 to test the path without --verbose |
|
411 | Make a 15 of changes to d9 to test the path without --verbose | |
418 | (Note: using regexes instead of "* (glob)" because if the test fails, it |
|
412 | (Note: using regexes instead of "* (glob)" because if the test fails, it | |
419 | produces more sensible diffs) |
|
413 | produces more sensible diffs) | |
420 | $ hg tracked |
|
414 | $ hg tracked | |
421 | I path:d3 |
|
415 | I path:d3 | |
422 | I path:d9 |
|
416 | I path:d9 | |
423 | X path:d0 |
|
417 | X path:d0 | |
424 | X path:d3/f |
|
418 | X path:d3/f | |
425 | $ for x in `$TESTDIR/seq.py 1 15` |
|
419 | $ for x in `$TESTDIR/seq.py 1 15` | |
426 | > do |
|
420 | > do | |
427 | > echo local change >> d9/f |
|
421 | > echo local change >> d9/f | |
428 | > hg commit -m "change $x to d9/f" |
|
422 | > hg commit -m "change $x to d9/f" | |
429 | > done |
|
423 | > done | |
430 | $ hg tracked --removeinclude d9 |
|
424 | $ hg tracked --removeinclude d9 | |
431 | comparing with ssh://user@dummy/master |
|
425 | comparing with ssh://user@dummy/master | |
432 | searching for changes |
|
426 | searching for changes | |
433 | looking for local changes to affected paths |
|
427 | looking for local changes to affected paths | |
434 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
428 | The following changeset(s) or their ancestors have local changes not on the remote: | |
435 | ^[0-9a-f]{12}$ (re) |
|
429 | ^[0-9a-f]{12}$ (re) | |
436 | ^[0-9a-f]{12}$ (re) |
|
430 | ^[0-9a-f]{12}$ (re) | |
437 | ^[0-9a-f]{12}$ (re) |
|
431 | ^[0-9a-f]{12}$ (re) | |
438 | ^[0-9a-f]{12}$ (re) |
|
432 | ^[0-9a-f]{12}$ (re) | |
439 | ^[0-9a-f]{12}$ (re) |
|
433 | ^[0-9a-f]{12}$ (re) | |
440 | ^[0-9a-f]{12}$ (re) |
|
434 | ^[0-9a-f]{12}$ (re) | |
441 | ^[0-9a-f]{12}$ (re) |
|
435 | ^[0-9a-f]{12}$ (re) | |
442 | ^[0-9a-f]{12}$ (re) |
|
436 | ^[0-9a-f]{12}$ (re) | |
443 | ^[0-9a-f]{12}$ (re) |
|
437 | ^[0-9a-f]{12}$ (re) | |
444 | ^[0-9a-f]{12}$ (re) |
|
438 | ^[0-9a-f]{12}$ (re) | |
445 | ...and 5 more, use --verbose to list all |
|
439 | ...and 5 more, use --verbose to list all | |
446 | abort: local changes found |
|
440 | abort: local changes found | |
447 | (use --force-delete-local-changes to ignore) |
|
441 | (use --force-delete-local-changes to ignore) | |
448 | [20] |
|
442 | [20] | |
449 | Now test it *with* verbose. |
|
443 | Now test it *with* verbose. | |
450 | $ hg tracked --removeinclude d9 --verbose |
|
444 | $ hg tracked --removeinclude d9 --verbose | |
451 | comparing with ssh://user@dummy/master |
|
445 | comparing with ssh://user@dummy/master | |
452 | searching for changes |
|
446 | searching for changes | |
453 | looking for local changes to affected paths |
|
447 | looking for local changes to affected paths | |
454 | The following changeset(s) or their ancestors have local changes not on the remote: |
|
448 | The following changeset(s) or their ancestors have local changes not on the remote: | |
455 | ^[0-9a-f]{12}$ (re) |
|
449 | ^[0-9a-f]{12}$ (re) | |
456 | ^[0-9a-f]{12}$ (re) |
|
450 | ^[0-9a-f]{12}$ (re) | |
457 | ^[0-9a-f]{12}$ (re) |
|
451 | ^[0-9a-f]{12}$ (re) | |
458 | ^[0-9a-f]{12}$ (re) |
|
452 | ^[0-9a-f]{12}$ (re) | |
459 | ^[0-9a-f]{12}$ (re) |
|
453 | ^[0-9a-f]{12}$ (re) | |
460 | ^[0-9a-f]{12}$ (re) |
|
454 | ^[0-9a-f]{12}$ (re) | |
461 | ^[0-9a-f]{12}$ (re) |
|
455 | ^[0-9a-f]{12}$ (re) | |
462 | ^[0-9a-f]{12}$ (re) |
|
456 | ^[0-9a-f]{12}$ (re) | |
463 | ^[0-9a-f]{12}$ (re) |
|
457 | ^[0-9a-f]{12}$ (re) | |
464 | ^[0-9a-f]{12}$ (re) |
|
458 | ^[0-9a-f]{12}$ (re) | |
465 | ^[0-9a-f]{12}$ (re) |
|
459 | ^[0-9a-f]{12}$ (re) | |
466 | ^[0-9a-f]{12}$ (re) |
|
460 | ^[0-9a-f]{12}$ (re) | |
467 | ^[0-9a-f]{12}$ (re) |
|
461 | ^[0-9a-f]{12}$ (re) | |
468 | ^[0-9a-f]{12}$ (re) |
|
462 | ^[0-9a-f]{12}$ (re) | |
469 | ^[0-9a-f]{12}$ (re) |
|
463 | ^[0-9a-f]{12}$ (re) | |
470 | abort: local changes found |
|
464 | abort: local changes found | |
471 | (use --force-delete-local-changes to ignore) |
|
465 | (use --force-delete-local-changes to ignore) | |
472 | [20] |
|
466 | [20] | |
473 | $ cd .. |
|
467 | $ cd .. | |
474 |
|
468 | |||
475 | Test --auto-remove-includes |
|
469 | Test --auto-remove-includes | |
476 | $ hg clone --narrow ssh://user@dummy/master narrow-auto-remove -q \ |
|
470 | $ hg clone --narrow ssh://user@dummy/master narrow-auto-remove -q \ | |
477 | > --include d0 --include d1 --include d2 |
|
471 | > --include d0 --include d1 --include d2 | |
478 | $ cd narrow-auto-remove |
|
472 | $ cd narrow-auto-remove | |
479 | $ echo a >> d0/f |
|
473 | $ echo a >> d0/f | |
480 | $ hg ci -m 'local change to d0' |
|
474 | $ hg ci -m 'local change to d0' | |
481 | $ hg co '.^' |
|
475 | $ hg co '.^' | |
482 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
476 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
483 | $ echo a >> d1/f |
|
477 | $ echo a >> d1/f | |
484 | $ hg ci -m 'local change to d1' |
|
478 | $ hg ci -m 'local change to d1' | |
485 | created new head |
|
479 | created new head | |
486 | $ hg debugobsolete $(hg log -T '{node}' -r 'desc("local change to d0")') |
|
480 | $ hg debugobsolete $(hg log -T '{node}' -r 'desc("local change to d0")') | |
487 | 1 new obsolescence markers |
|
481 | 1 new obsolescence markers | |
488 | obsoleted 1 changesets |
|
482 | obsoleted 1 changesets | |
489 | $ echo n | hg tracked --auto-remove-includes --config ui.interactive=yes |
|
483 | $ echo n | hg tracked --auto-remove-includes --config ui.interactive=yes | |
490 | comparing with ssh://user@dummy/master |
|
484 | comparing with ssh://user@dummy/master | |
491 | searching for changes |
|
485 | searching for changes | |
492 | looking for unused includes to remove |
|
486 | looking for unused includes to remove | |
493 | path:d0 |
|
487 | path:d0 | |
494 | path:d2 |
|
488 | path:d2 | |
495 | remove these unused includes (yn)? n |
|
489 | remove these unused includes (yn)? n | |
496 | $ hg tracked --auto-remove-includes |
|
490 | $ hg tracked --auto-remove-includes | |
497 | comparing with ssh://user@dummy/master |
|
491 | comparing with ssh://user@dummy/master | |
498 | searching for changes |
|
492 | searching for changes | |
499 | looking for unused includes to remove |
|
493 | looking for unused includes to remove | |
500 | path:d0 |
|
494 | path:d0 | |
501 | path:d2 |
|
495 | path:d2 | |
502 | remove these unused includes (yn)? y |
|
496 | remove these unused includes (yn)? y | |
503 | looking for local changes to affected paths |
|
497 | looking for local changes to affected paths | |
504 | moving unwanted changesets to backup |
|
498 | moving unwanted changesets to backup | |
505 | saved backup bundle to $TESTTMP/narrow-auto-remove/.hg/strip-backup/*-narrow.hg (glob) |
|
499 | saved backup bundle to $TESTTMP/narrow-auto-remove/.hg/strip-backup/*-narrow.hg (glob) | |
506 | deleting data/d0/f.i |
|
500 | deleting data/d0/f.i | |
507 | deleting data/d2/f.i |
|
501 | deleting data/d2/f.i | |
508 | deleting meta/d0/00manifest.i (tree !) |
|
502 | deleting meta/d0/00manifest.i (tree !) | |
509 | deleting meta/d2/00manifest.i (tree !) |
|
503 | deleting meta/d2/00manifest.i (tree !) | |
510 | deleting unwanted files from working copy |
|
504 | deleting unwanted files from working copy | |
511 | $ hg tracked |
|
505 | $ hg tracked | |
512 | I path:d1 |
|
506 | I path:d1 | |
513 | $ hg files |
|
507 | $ hg files | |
514 | d1/f |
|
508 | d1/f | |
515 | $ hg tracked --auto-remove-includes |
|
509 | $ hg tracked --auto-remove-includes | |
516 | comparing with ssh://user@dummy/master |
|
510 | comparing with ssh://user@dummy/master | |
517 | searching for changes |
|
511 | searching for changes | |
518 | looking for unused includes to remove |
|
512 | looking for unused includes to remove | |
519 | found no unused includes |
|
513 | found no unused includes | |
520 | Test --no-backup |
|
514 | Test --no-backup | |
521 | $ hg tracked --addinclude d0 --addinclude d2 -q |
|
515 | $ hg tracked --addinclude d0 --addinclude d2 -q | |
522 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q |
|
516 | $ hg unbundle .hg/strip-backup/*-narrow.hg -q | |
523 | $ rm .hg/strip-backup/* |
|
517 | $ rm .hg/strip-backup/* | |
524 | $ hg tracked --auto-remove-includes --no-backup |
|
518 | $ hg tracked --auto-remove-includes --no-backup | |
525 | comparing with ssh://user@dummy/master |
|
519 | comparing with ssh://user@dummy/master | |
526 | searching for changes |
|
520 | searching for changes | |
527 | looking for unused includes to remove |
|
521 | looking for unused includes to remove | |
528 | path:d0 |
|
522 | path:d0 | |
529 | path:d2 |
|
523 | path:d2 | |
530 | remove these unused includes (yn)? y |
|
524 | remove these unused includes (yn)? y | |
531 | looking for local changes to affected paths |
|
525 | looking for local changes to affected paths | |
532 | deleting unwanted changesets |
|
526 | deleting unwanted changesets | |
533 | deleting data/d0/f.i |
|
527 | deleting data/d0/f.i | |
534 | deleting data/d2/f.i |
|
528 | deleting data/d2/f.i | |
535 | deleting meta/d0/00manifest.i (tree !) |
|
529 | deleting meta/d0/00manifest.i (tree !) | |
536 | deleting meta/d2/00manifest.i (tree !) |
|
530 | deleting meta/d2/00manifest.i (tree !) | |
537 | deleting unwanted files from working copy |
|
531 | deleting unwanted files from working copy | |
538 | $ ls .hg/strip-backup/ |
|
532 | $ ls .hg/strip-backup/ | |
539 |
|
533 | |||
540 |
|
534 | |||
541 | Test removing include while concurrently modifying file in that path |
|
535 | Test removing include while concurrently modifying file in that path | |
542 | $ hg clone --narrow ssh://user@dummy/master narrow-concurrent-modify -q \ |
|
536 | $ hg clone --narrow ssh://user@dummy/master narrow-concurrent-modify -q \ | |
543 | > --include d0 --include d1 |
|
537 | > --include d0 --include d1 | |
544 | $ cd narrow-concurrent-modify |
|
538 | $ cd narrow-concurrent-modify | |
545 | $ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude d0 |
|
539 | $ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude d0 | |
546 | comparing with ssh://user@dummy/master |
|
540 | comparing with ssh://user@dummy/master | |
547 | searching for changes |
|
541 | searching for changes | |
548 | looking for local changes to affected paths |
|
542 | looking for local changes to affected paths | |
549 | deleting data/d0/f.i |
|
543 | deleting data/d0/f.i | |
550 | deleting meta/d0/00manifest.i (tree !) |
|
544 | deleting meta/d0/00manifest.i (tree !) | |
551 | deleting unwanted files from working copy |
|
545 | deleting unwanted files from working copy | |
552 | not deleting possibly dirty file d0/f |
|
546 | not deleting possibly dirty file d0/f |
@@ -1,855 +1,899 b'' | |||||
1 | Set up repo |
|
1 | Set up repo | |
2 |
|
2 | |||
3 | $ hg --config experimental.treemanifest=True init repo |
|
3 | $ hg --config experimental.treemanifest=True init repo | |
4 | $ cd repo |
|
4 | $ cd repo | |
5 |
|
5 | |||
6 | Requirements get set on init |
|
6 | Requirements get set on init | |
7 |
|
7 | |||
8 | $ hg debugrequires | grep treemanifest |
|
8 | $ hg debugrequires | grep treemanifest | |
9 | treemanifest |
|
9 | treemanifest | |
10 |
|
10 | |||
11 | Without directories, looks like any other repo |
|
11 | Without directories, looks like any other repo | |
12 |
|
12 | |||
13 | $ echo 0 > a |
|
13 | $ echo 0 > a | |
14 | $ echo 0 > b |
|
14 | $ echo 0 > b | |
15 | $ hg ci -Aqm initial |
|
15 | $ hg ci -Aqm initial | |
16 | $ hg debugdata -m 0 |
|
16 | $ hg debugdata -m 0 | |
17 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
17 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) | |
18 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
18 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) | |
19 |
|
19 | |||
20 | Submanifest is stored in separate revlog |
|
20 | Submanifest is stored in separate revlog | |
21 |
|
21 | |||
22 | $ mkdir dir1 |
|
22 | $ mkdir dir1 | |
23 | $ echo 1 > dir1/a |
|
23 | $ echo 1 > dir1/a | |
24 | $ echo 1 > dir1/b |
|
24 | $ echo 1 > dir1/b | |
25 | $ echo 1 > e |
|
25 | $ echo 1 > e | |
26 | $ hg ci -Aqm 'add dir1' |
|
26 | $ hg ci -Aqm 'add dir1' | |
27 | $ hg debugdata -m 1 |
|
27 | $ hg debugdata -m 1 | |
28 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
28 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) | |
29 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
29 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) | |
30 | dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc) |
|
30 | dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc) | |
31 | e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
31 | e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | |
32 | $ hg debugdata --dir dir1 0 |
|
32 | $ hg debugdata --dir dir1 0 | |
33 | a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
33 | a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | |
34 | b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
34 | b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | |
35 |
|
35 | |||
36 | Can add nested directories |
|
36 | Can add nested directories | |
37 |
|
37 | |||
38 | $ mkdir dir1/dir1 |
|
38 | $ mkdir dir1/dir1 | |
39 | $ echo 2 > dir1/dir1/a |
|
39 | $ echo 2 > dir1/dir1/a | |
40 | $ echo 2 > dir1/dir1/b |
|
40 | $ echo 2 > dir1/dir1/b | |
41 | $ mkdir dir1/dir2 |
|
41 | $ mkdir dir1/dir2 | |
42 | $ echo 2 > dir1/dir2/a |
|
42 | $ echo 2 > dir1/dir2/a | |
43 | $ echo 2 > dir1/dir2/b |
|
43 | $ echo 2 > dir1/dir2/b | |
44 | $ hg ci -Aqm 'add dir1/dir1' |
|
44 | $ hg ci -Aqm 'add dir1/dir1' | |
45 | $ hg files -r . |
|
45 | $ hg files -r . | |
46 | a |
|
46 | a | |
47 | b |
|
47 | b | |
48 | dir1/a |
|
48 | dir1/a | |
49 | dir1/b |
|
49 | dir1/b | |
50 | dir1/dir1/a |
|
50 | dir1/dir1/a | |
51 | dir1/dir1/b |
|
51 | dir1/dir1/b | |
52 | dir1/dir2/a |
|
52 | dir1/dir2/a | |
53 | dir1/dir2/b |
|
53 | dir1/dir2/b | |
54 | e |
|
54 | e | |
55 |
|
55 | |||
56 | The manifest command works |
|
56 | The manifest command works | |
57 |
|
57 | |||
58 | $ hg manifest |
|
58 | $ hg manifest | |
59 | a |
|
59 | a | |
60 | b |
|
60 | b | |
61 | dir1/a |
|
61 | dir1/a | |
62 | dir1/b |
|
62 | dir1/b | |
63 | dir1/dir1/a |
|
63 | dir1/dir1/a | |
64 | dir1/dir1/b |
|
64 | dir1/dir1/b | |
65 | dir1/dir2/a |
|
65 | dir1/dir2/a | |
66 | dir1/dir2/b |
|
66 | dir1/dir2/b | |
67 | e |
|
67 | e | |
68 |
|
68 | |||
69 | Revision is not created for unchanged directory |
|
69 | Revision is not created for unchanged directory | |
70 |
|
70 | |||
71 | $ mkdir dir2 |
|
71 | $ mkdir dir2 | |
72 | $ echo 3 > dir2/a |
|
72 | $ echo 3 > dir2/a | |
73 | $ hg add dir2 |
|
73 | $ hg add dir2 | |
74 | adding dir2/a |
|
74 | adding dir2/a | |
75 | $ hg debugindex --dir dir1 > before |
|
75 | $ hg debugindex --dir dir1 > before | |
76 | $ hg ci -qm 'add dir2' |
|
76 | $ hg ci -qm 'add dir2' | |
77 | $ hg debugindex --dir dir1 > after |
|
77 | $ hg debugindex --dir dir1 > after | |
78 | $ diff before after |
|
78 | $ diff before after | |
79 | $ rm before after |
|
79 | $ rm before after | |
80 |
|
80 | |||
81 | Removing directory does not create an revlog entry |
|
81 | Removing directory does not create an revlog entry | |
82 |
|
82 | |||
83 | $ hg rm dir1/dir1 |
|
83 | $ hg rm dir1/dir1 | |
84 | removing dir1/dir1/a |
|
84 | removing dir1/dir1/a | |
85 | removing dir1/dir1/b |
|
85 | removing dir1/dir1/b | |
86 | $ hg debugindex --dir dir1/dir1 > before |
|
86 | $ hg debugindex --dir dir1/dir1 > before | |
87 | $ hg ci -qm 'remove dir1/dir1' |
|
87 | $ hg ci -qm 'remove dir1/dir1' | |
88 | $ hg debugindex --dir dir1/dir1 > after |
|
88 | $ hg debugindex --dir dir1/dir1 > after | |
89 | $ diff before after |
|
89 | $ diff before after | |
90 | $ rm before after |
|
90 | $ rm before after | |
91 |
|
91 | |||
92 | Check that hg files (calls treemanifest.walk()) works |
|
92 | Check that hg files (calls treemanifest.walk()) works | |
93 | without loading all directory revlogs |
|
93 | without loading all directory revlogs | |
94 |
|
94 | |||
95 | $ hg co 'desc("add dir2")' |
|
95 | $ hg co 'desc("add dir2")' | |
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 | $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup |
|
97 | $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup | |
98 | $ hg files -r . dir1 |
|
98 | $ hg files -r . dir1 | |
99 | dir1/a |
|
99 | dir1/a | |
100 | dir1/b |
|
100 | dir1/b | |
101 | dir1/dir1/a |
|
101 | dir1/dir1/a | |
102 | dir1/dir1/b |
|
102 | dir1/dir1/b | |
103 | dir1/dir2/a |
|
103 | dir1/dir2/a | |
104 | dir1/dir2/b |
|
104 | dir1/dir2/b | |
105 |
|
105 | |||
106 | Check that status between revisions works (calls treemanifest.matches()) |
|
106 | Check that status between revisions works (calls treemanifest.matches()) | |
107 | without loading all directory revlogs |
|
107 | without loading all directory revlogs | |
108 |
|
108 | |||
109 | $ hg status --rev 'desc("add dir1")' --rev . dir1 |
|
109 | $ hg status --rev 'desc("add dir1")' --rev . dir1 | |
110 | A dir1/dir1/a |
|
110 | A dir1/dir1/a | |
111 | A dir1/dir1/b |
|
111 | A dir1/dir1/b | |
112 | A dir1/dir2/a |
|
112 | A dir1/dir2/a | |
113 | A dir1/dir2/b |
|
113 | A dir1/dir2/b | |
114 | $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2 |
|
114 | $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2 | |
115 |
|
115 | |||
116 | Merge creates 2-parent revision of directory revlog |
|
116 | Merge creates 2-parent revision of directory revlog | |
117 |
|
117 | |||
118 | $ echo 5 > dir1/a |
|
118 | $ echo 5 > dir1/a | |
119 | $ hg ci -Aqm 'modify dir1/a' |
|
119 | $ hg ci -Aqm 'modify dir1/a' | |
120 | $ hg co '.^' |
|
120 | $ hg co '.^' | |
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
122 | $ echo 6 > dir1/b |
|
122 | $ echo 6 > dir1/b | |
123 | $ hg ci -Aqm 'modify dir1/b' |
|
123 | $ hg ci -Aqm 'modify dir1/b' | |
124 | $ hg merge 'desc("modify dir1/a")' |
|
124 | $ hg merge 'desc("modify dir1/a")' | |
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
126 | (branch merge, don't forget to commit) |
|
126 | (branch merge, don't forget to commit) | |
127 | $ hg ci -m 'conflict-free merge involving dir1/' |
|
127 | $ hg ci -m 'conflict-free merge involving dir1/' | |
128 | $ cat dir1/a |
|
128 | $ cat dir1/a | |
129 | 5 |
|
129 | 5 | |
130 | $ cat dir1/b |
|
130 | $ cat dir1/b | |
131 | 6 |
|
131 | 6 | |
132 | $ hg debugindex --dir dir1 |
|
132 | $ hg debugindex --dir dir1 | |
133 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
133 | rev linkrev nodeid p1-nodeid p2-nodeid | |
134 | 0 1 8b3ffd73f901 000000000000 000000000000 |
|
134 | 0 1 8b3ffd73f901 000000000000 000000000000 | |
135 | 1 2 68e9d057c5a8 8b3ffd73f901 000000000000 |
|
135 | 1 2 68e9d057c5a8 8b3ffd73f901 000000000000 | |
136 | 2 4 4698198d2624 68e9d057c5a8 000000000000 |
|
136 | 2 4 4698198d2624 68e9d057c5a8 000000000000 | |
137 | 3 5 44844058ccce 68e9d057c5a8 000000000000 |
|
137 | 3 5 44844058ccce 68e9d057c5a8 000000000000 | |
138 | 4 6 bf3d9b744927 68e9d057c5a8 000000000000 |
|
138 | 4 6 bf3d9b744927 68e9d057c5a8 000000000000 | |
139 | 5 7 dde7c0af2a03 bf3d9b744927 44844058ccce |
|
139 | 5 7 dde7c0af2a03 bf3d9b744927 44844058ccce | |
140 |
|
140 | |||
141 | Merge keeping directory from parent 1 does not create revlog entry. (Note that |
|
141 | Merge keeping directory from parent 1 does not create revlog entry. (Note that | |
142 | dir1's manifest does change, but only because dir1/a's filelog changes.) |
|
142 | dir1's manifest does change, but only because dir1/a's filelog changes.) | |
143 |
|
143 | |||
144 | $ hg co 'desc("add dir2")' |
|
144 | $ hg co 'desc("add dir2")' | |
145 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
146 | $ echo 8 > dir2/a |
|
146 | $ echo 8 > dir2/a | |
147 | $ hg ci -m 'modify dir2/a' |
|
147 | $ hg ci -m 'modify dir2/a' | |
148 | created new head |
|
148 | created new head | |
149 |
|
149 | |||
150 | $ hg debugindex --dir dir2 > before |
|
150 | $ hg debugindex --dir dir2 > before | |
151 | $ hg merge 'desc("modify dir1/a")' |
|
151 | $ hg merge 'desc("modify dir1/a")' | |
152 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
152 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
153 | (branch merge, don't forget to commit) |
|
153 | (branch merge, don't forget to commit) | |
154 | $ hg revert -r 'desc("modify dir2/a")' . |
|
154 | $ hg revert -r 'desc("modify dir2/a")' . | |
155 | reverting dir1/a |
|
155 | reverting dir1/a | |
156 | $ hg ci -m 'merge, keeping parent 1' |
|
156 | $ hg ci -m 'merge, keeping parent 1' | |
157 | $ hg debugindex --dir dir2 > after |
|
157 | $ hg debugindex --dir dir2 > after | |
158 | $ diff before after |
|
158 | $ diff before after | |
159 | $ rm before after |
|
159 | $ rm before after | |
160 |
|
160 | |||
161 | Merge keeping directory from parent 2 does not create revlog entry. (Note that |
|
161 | Merge keeping directory from parent 2 does not create revlog entry. (Note that | |
162 | dir2's manifest does change, but only because dir2/a's filelog changes.) |
|
162 | dir2's manifest does change, but only because dir2/a's filelog changes.) | |
163 |
|
163 | |||
164 | $ hg co 'desc("modify dir2/a")' |
|
164 | $ hg co 'desc("modify dir2/a")' | |
165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
166 | $ hg debugindex --dir dir1 > before |
|
166 | $ hg debugindex --dir dir1 > before | |
167 | $ hg merge 'desc("modify dir1/a")' |
|
167 | $ hg merge 'desc("modify dir1/a")' | |
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
169 | (branch merge, don't forget to commit) |
|
169 | (branch merge, don't forget to commit) | |
170 | $ hg revert -r 'desc("modify dir1/a")' . |
|
170 | $ hg revert -r 'desc("modify dir1/a")' . | |
171 | reverting dir2/a |
|
171 | reverting dir2/a | |
172 | $ hg ci -m 'merge, keeping parent 2' |
|
172 | $ hg ci -m 'merge, keeping parent 2' | |
173 | created new head |
|
173 | created new head | |
174 | $ hg debugindex --dir dir1 > after |
|
174 | $ hg debugindex --dir dir1 > after | |
175 | $ diff before after |
|
175 | $ diff before after | |
176 | $ rm before after |
|
176 | $ rm before after | |
177 |
|
177 | |||
178 | Create flat source repo for tests with mixed flat/tree manifests |
|
178 | Create flat source repo for tests with mixed flat/tree manifests | |
179 |
|
179 | |||
180 | $ cd .. |
|
180 | $ cd .. | |
181 | $ hg init repo-flat |
|
181 | $ hg init repo-flat | |
182 | $ cd repo-flat |
|
182 | $ cd repo-flat | |
183 |
|
183 | |||
184 | Create a few commits with flat manifest |
|
184 | Create a few commits with flat manifest | |
185 |
|
185 | |||
186 | $ echo 0 > a |
|
186 | $ echo 0 > a | |
187 | $ echo 0 > b |
|
187 | $ echo 0 > b | |
188 | $ echo 0 > e |
|
188 | $ echo 0 > e | |
189 | $ for d in dir1 dir1/dir1 dir1/dir2 dir2 |
|
189 | $ for d in dir1 dir1/dir1 dir1/dir2 dir2 | |
190 | > do |
|
190 | > do | |
191 | > mkdir $d |
|
191 | > mkdir $d | |
192 | > echo 0 > $d/a |
|
192 | > echo 0 > $d/a | |
193 | > echo 0 > $d/b |
|
193 | > echo 0 > $d/b | |
194 | > done |
|
194 | > done | |
195 | $ hg ci -Aqm initial |
|
195 | $ hg ci -Aqm initial | |
196 |
|
196 | |||
197 | $ echo 1 > a |
|
197 | $ echo 1 > a | |
198 | $ echo 1 > dir1/a |
|
198 | $ echo 1 > dir1/a | |
199 | $ echo 1 > dir1/dir1/a |
|
199 | $ echo 1 > dir1/dir1/a | |
200 | $ hg ci -Aqm 'modify on branch 1' |
|
200 | $ hg ci -Aqm 'modify on branch 1' | |
201 |
|
201 | |||
202 | $ hg co 0 |
|
202 | $ hg co 0 | |
203 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
203 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
204 | $ echo 2 > b |
|
204 | $ echo 2 > b | |
205 | $ echo 2 > dir1/b |
|
205 | $ echo 2 > dir1/b | |
206 | $ echo 2 > dir1/dir1/b |
|
206 | $ echo 2 > dir1/dir1/b | |
207 | $ hg ci -Aqm 'modify on branch 2' |
|
207 | $ hg ci -Aqm 'modify on branch 2' | |
208 |
|
208 | |||
209 | $ hg merge 1 |
|
209 | $ hg merge 1 | |
210 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
210 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
211 | (branch merge, don't forget to commit) |
|
211 | (branch merge, don't forget to commit) | |
212 | $ hg ci -m 'merge of flat manifests to new flat manifest' |
|
212 | $ hg ci -m 'merge of flat manifests to new flat manifest' | |
213 |
|
213 | |||
214 | $ cd .. |
|
214 | $ cd .. | |
215 | $ hg -R repo-flat serve -p $HGPORT -d \ |
|
215 | $ hg -R repo-flat serve -p $HGPORT -d \ | |
216 | > --pid-file=port-0-hg.pid \ |
|
216 | > --pid-file=port-0-hg.pid \ | |
217 | > --errorlog=port-0-errors.log |
|
217 | > --errorlog=port-0-errors.log | |
218 | $ cat port-0-hg.pid >> $DAEMON_PIDS |
|
218 | $ cat port-0-hg.pid >> $DAEMON_PIDS | |
219 |
|
219 | |||
220 | Create clone with tree manifests enabled |
|
220 | Create clone with tree manifests enabled | |
221 |
|
221 | |||
222 | $ hg clone --config experimental.treemanifest=1 \ |
|
222 | $ hg clone --config experimental.treemanifest=1 \ | |
223 | > http://localhost:$HGPORT repo-mixed -r 1 |
|
223 | > http://localhost:$HGPORT repo-mixed -r 1 | |
224 | adding changesets |
|
224 | adding changesets | |
225 | adding manifests |
|
225 | adding manifests | |
226 | adding file changes |
|
226 | adding file changes | |
227 | added 2 changesets with 14 changes to 11 files |
|
227 | added 2 changesets with 14 changes to 11 files | |
228 | new changesets 5b02a3e8db7e:581ef6037d8b |
|
228 | new changesets 5b02a3e8db7e:581ef6037d8b | |
229 | updating to branch default |
|
229 | updating to branch default | |
230 | 11 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
230 | 11 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
231 | $ cat port-0-errors.log |
|
231 | $ cat port-0-errors.log | |
232 | $ cd repo-mixed |
|
232 | $ cd repo-mixed | |
233 | $ test -d .hg/store/meta |
|
233 | $ test -d .hg/store/meta | |
234 | [1] |
|
234 | [1] | |
235 | $ hg debugrequires | grep treemanifest |
|
235 | $ hg debugrequires | grep treemanifest | |
236 | treemanifest |
|
236 | treemanifest | |
237 |
|
237 | |||
238 | Should be possible to push updates from flat to tree manifest repo |
|
238 | Should be possible to push updates from flat to tree manifest repo | |
239 |
|
239 | |||
240 | $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed |
|
240 | $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed | |
241 | pushing to ssh://user@dummy/repo-mixed |
|
241 | pushing to ssh://user@dummy/repo-mixed | |
242 | searching for changes |
|
242 | searching for changes | |
243 | remote: adding changesets |
|
243 | remote: adding changesets | |
244 | remote: adding manifests |
|
244 | remote: adding manifests | |
245 | remote: adding file changes |
|
245 | remote: adding file changes | |
246 | remote: added 2 changesets with 3 changes to 3 files |
|
246 | remote: added 2 changesets with 3 changes to 3 files | |
247 |
|
247 | |||
248 | Commit should store revlog per directory |
|
248 | Commit should store revlog per directory | |
249 |
|
249 | |||
250 | $ hg co 1 |
|
250 | $ hg co 1 | |
251 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
251 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
252 | $ echo 3 > a |
|
252 | $ echo 3 > a | |
253 | $ echo 3 > dir1/a |
|
253 | $ echo 3 > dir1/a | |
254 | $ echo 3 > dir1/dir1/a |
|
254 | $ echo 3 > dir1/dir1/a | |
255 | $ hg ci -m 'first tree' |
|
255 | $ hg ci -m 'first tree' | |
256 | created new head |
|
256 | created new head | |
257 | $ find .hg/store/meta | sort |
|
257 | $ find .hg/store/meta | sort | |
258 | .hg/store/meta |
|
258 | .hg/store/meta | |
259 | .hg/store/meta/dir1 |
|
259 | .hg/store/meta/dir1 | |
260 | .hg/store/meta/dir1/00manifest.i |
|
260 | .hg/store/meta/dir1/00manifest.i | |
261 | .hg/store/meta/dir1/dir1 |
|
261 | .hg/store/meta/dir1/dir1 | |
262 | .hg/store/meta/dir1/dir1/00manifest.i |
|
262 | .hg/store/meta/dir1/dir1/00manifest.i | |
263 | .hg/store/meta/dir1/dir2 |
|
263 | .hg/store/meta/dir1/dir2 | |
264 | .hg/store/meta/dir1/dir2/00manifest.i |
|
264 | .hg/store/meta/dir1/dir2/00manifest.i | |
265 | .hg/store/meta/dir2 |
|
265 | .hg/store/meta/dir2 | |
266 | .hg/store/meta/dir2/00manifest.i |
|
266 | .hg/store/meta/dir2/00manifest.i | |
267 |
|
267 | |||
268 | Merge of two trees |
|
268 | Merge of two trees | |
269 |
|
269 | |||
270 | $ hg co 2 |
|
270 | $ hg co 2 | |
271 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
272 | $ hg merge 1 |
|
272 | $ hg merge 1 | |
273 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
273 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
274 | (branch merge, don't forget to commit) |
|
274 | (branch merge, don't forget to commit) | |
275 | $ hg ci -m 'merge of flat manifests to new tree manifest' |
|
275 | $ hg ci -m 'merge of flat manifests to new tree manifest' | |
276 | created new head |
|
276 | created new head | |
277 | $ hg diff -r 3 |
|
277 | $ hg diff -r 3 | |
278 |
|
278 | |||
279 | Parent of tree root manifest should be flat manifest, and two for merge |
|
279 | Parent of tree root manifest should be flat manifest, and two for merge | |
280 |
|
280 | |||
281 | $ hg debugindex -m |
|
281 | $ hg debugindex -m | |
282 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
282 | rev linkrev nodeid p1-nodeid p2-nodeid | |
283 | 0 0 40536115ed9e 000000000000 000000000000 |
|
283 | 0 0 40536115ed9e 000000000000 000000000000 | |
284 | 1 1 f3376063c255 40536115ed9e 000000000000 |
|
284 | 1 1 f3376063c255 40536115ed9e 000000000000 | |
285 | 2 2 5d9b9da231a2 40536115ed9e 000000000000 |
|
285 | 2 2 5d9b9da231a2 40536115ed9e 000000000000 | |
286 | 3 3 d17d663cbd8a 5d9b9da231a2 f3376063c255 |
|
286 | 3 3 d17d663cbd8a 5d9b9da231a2 f3376063c255 | |
287 | 4 4 51e32a8c60ee f3376063c255 000000000000 |
|
287 | 4 4 51e32a8c60ee f3376063c255 000000000000 | |
288 | 5 5 cc5baa78b230 5d9b9da231a2 f3376063c255 |
|
288 | 5 5 cc5baa78b230 5d9b9da231a2 f3376063c255 | |
289 |
|
289 | |||
290 |
|
290 | |||
291 | Status across flat/tree boundary should work |
|
291 | Status across flat/tree boundary should work | |
292 |
|
292 | |||
293 | $ hg status --rev '.^' --rev . |
|
293 | $ hg status --rev '.^' --rev . | |
294 | M a |
|
294 | M a | |
295 | M dir1/a |
|
295 | M dir1/a | |
296 | M dir1/dir1/a |
|
296 | M dir1/dir1/a | |
297 |
|
297 | |||
298 |
|
298 | |||
299 | Turning off treemanifest config has no effect |
|
299 | Turning off treemanifest config has no effect | |
300 |
|
300 | |||
301 | $ hg debugindex --dir dir1 |
|
301 | $ hg debugindex --dir dir1 | |
302 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
302 | rev linkrev nodeid p1-nodeid p2-nodeid | |
303 | 0 4 064927a0648a 000000000000 000000000000 |
|
303 | 0 4 064927a0648a 000000000000 000000000000 | |
304 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
304 | 1 5 25ecb8cb8618 000000000000 000000000000 | |
305 | $ echo 2 > dir1/a |
|
305 | $ echo 2 > dir1/a | |
306 | $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a' |
|
306 | $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a' | |
307 | $ hg debugindex --dir dir1 |
|
307 | $ hg debugindex --dir dir1 | |
308 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
308 | rev linkrev nodeid p1-nodeid p2-nodeid | |
309 | 0 4 064927a0648a 000000000000 000000000000 |
|
309 | 0 4 064927a0648a 000000000000 000000000000 | |
310 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
310 | 1 5 25ecb8cb8618 000000000000 000000000000 | |
311 | 2 6 5b16163a30c6 25ecb8cb8618 000000000000 |
|
311 | 2 6 5b16163a30c6 25ecb8cb8618 000000000000 | |
312 |
|
312 | |||
313 | Stripping and recovering changes should work |
|
313 | Stripping and recovering changes should work | |
314 |
|
314 | |||
315 | $ hg st --change tip |
|
315 | $ hg st --change tip | |
316 | M dir1/a |
|
316 | M dir1/a | |
317 | $ hg --config extensions.strip= strip tip |
|
317 | $ hg --config extensions.strip= strip tip | |
318 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
318 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
319 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg |
|
319 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg | |
320 | $ hg debugindex --dir dir1 |
|
320 | $ hg debugindex --dir dir1 | |
321 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
321 | rev linkrev nodeid p1-nodeid p2-nodeid | |
322 | 0 4 064927a0648a 000000000000 000000000000 |
|
322 | 0 4 064927a0648a 000000000000 000000000000 | |
323 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
323 | 1 5 25ecb8cb8618 000000000000 000000000000 | |
324 |
|
324 | |||
325 | #if repobundlerepo |
|
325 | #if repobundlerepo | |
326 | $ hg incoming .hg/strip-backup/* |
|
326 | $ hg incoming .hg/strip-backup/* | |
327 | comparing with .hg/strip-backup/*-backup.hg (glob) |
|
327 | comparing with .hg/strip-backup/*-backup.hg (glob) | |
328 | searching for changes |
|
328 | searching for changes | |
329 | changeset: 6:51cfd7b1e13b |
|
329 | changeset: 6:51cfd7b1e13b | |
330 | tag: tip |
|
330 | tag: tip | |
331 | user: test |
|
331 | user: test | |
332 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
332 | date: Thu Jan 01 00:00:00 1970 +0000 | |
333 | summary: modify dir1/a |
|
333 | summary: modify dir1/a | |
334 |
|
334 | |||
335 | #endif |
|
335 | #endif | |
336 |
|
336 | |||
337 | $ hg unbundle .hg/strip-backup/* |
|
337 | $ hg unbundle .hg/strip-backup/* | |
338 | adding changesets |
|
338 | adding changesets | |
339 | adding manifests |
|
339 | adding manifests | |
340 | adding file changes |
|
340 | adding file changes | |
341 | added 1 changesets with 1 changes to 1 files |
|
341 | added 1 changesets with 1 changes to 1 files | |
342 | new changesets 51cfd7b1e13b (1 drafts) |
|
342 | new changesets 51cfd7b1e13b (1 drafts) | |
343 | (run 'hg update' to get a working copy) |
|
343 | (run 'hg update' to get a working copy) | |
344 | $ hg --config extensions.strip= strip tip |
|
344 | $ hg --config extensions.strip= strip tip | |
345 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob) |
|
345 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob) | |
346 | $ hg unbundle -q .hg/strip-backup/* |
|
346 | $ hg unbundle -q .hg/strip-backup/* | |
347 | $ hg debugindex --dir dir1 |
|
347 | $ hg debugindex --dir dir1 | |
348 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
348 | rev linkrev nodeid p1-nodeid p2-nodeid | |
349 | 0 4 064927a0648a 000000000000 000000000000 |
|
349 | 0 4 064927a0648a 000000000000 000000000000 | |
350 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
350 | 1 5 25ecb8cb8618 000000000000 000000000000 | |
351 | 2 6 5b16163a30c6 25ecb8cb8618 000000000000 |
|
351 | 2 6 5b16163a30c6 25ecb8cb8618 000000000000 | |
352 | $ hg st --change tip |
|
352 | $ hg st --change tip | |
353 | M dir1/a |
|
353 | M dir1/a | |
354 |
|
354 | |||
355 | Shelving and unshelving should work |
|
355 | Shelving and unshelving should work | |
356 |
|
356 | |||
357 | $ echo foo >> dir1/a |
|
357 | $ echo foo >> dir1/a | |
358 | $ hg shelve |
|
358 | $ hg shelve | |
359 | shelved as default |
|
359 | shelved as default | |
360 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
360 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
361 | $ hg unshelve |
|
361 | $ hg unshelve | |
362 | unshelving change 'default' |
|
362 | unshelving change 'default' | |
363 | $ hg diff --nodates |
|
363 | $ hg diff --nodates | |
364 | diff -r 708a273da119 dir1/a |
|
364 | diff -r 708a273da119 dir1/a | |
365 | --- a/dir1/a |
|
365 | --- a/dir1/a | |
366 | +++ b/dir1/a |
|
366 | +++ b/dir1/a | |
367 | @@ -1,1 +1,2 @@ |
|
367 | @@ -1,1 +1,2 @@ | |
368 | 1 |
|
368 | 1 | |
369 | +foo |
|
369 | +foo | |
370 |
|
370 | |||
371 | Pushing from treemanifest repo to an empty repo makes that a treemanifest repo |
|
371 | Pushing from treemanifest repo to an empty repo makes that a treemanifest repo | |
372 |
|
372 | |||
373 | $ cd .. |
|
373 | $ cd .. | |
374 | $ hg init empty-repo |
|
374 | $ hg init empty-repo | |
375 | $ cat << EOF >> empty-repo/.hg/hgrc |
|
375 | $ cat << EOF >> empty-repo/.hg/hgrc | |
376 | > [experimental] |
|
376 | > [experimental] | |
377 | > changegroup3=yes |
|
377 | > changegroup3=yes | |
378 | > EOF |
|
378 | > EOF | |
379 | $ hg debugrequires -R empty-repo | grep treemanifest |
|
379 | $ hg debugrequires -R empty-repo | grep treemanifest | |
380 | [1] |
|
380 | [1] | |
381 | $ hg push -R repo -r 0 empty-repo |
|
381 | $ hg push -R repo -r 0 empty-repo | |
382 | pushing to empty-repo |
|
382 | pushing to empty-repo | |
383 | searching for changes |
|
383 | searching for changes | |
384 | adding changesets |
|
384 | adding changesets | |
385 | adding manifests |
|
385 | adding manifests | |
386 | adding file changes |
|
386 | adding file changes | |
387 | added 1 changesets with 2 changes to 2 files |
|
387 | added 1 changesets with 2 changes to 2 files | |
388 | $ hg debugrequires -R empty-repo | grep treemanifest |
|
388 | $ hg debugrequires -R empty-repo | grep treemanifest | |
389 | treemanifest |
|
389 | treemanifest | |
390 |
|
390 | |||
391 | Pushing to an empty repo works |
|
391 | Pushing to an empty repo works | |
392 |
|
392 | |||
393 | $ hg --config experimental.treemanifest=1 init clone |
|
393 | $ hg --config experimental.treemanifest=1 init clone | |
394 | $ hg debugrequires -R clone | grep treemanifest |
|
394 | $ hg debugrequires -R clone | grep treemanifest | |
395 | treemanifest |
|
395 | treemanifest | |
396 | $ hg push -R repo clone |
|
396 | $ hg push -R repo clone | |
397 | pushing to clone |
|
397 | pushing to clone | |
398 | searching for changes |
|
398 | searching for changes | |
399 | adding changesets |
|
399 | adding changesets | |
400 | adding manifests |
|
400 | adding manifests | |
401 | adding file changes |
|
401 | adding file changes | |
402 | added 11 changesets with 15 changes to 10 files (+3 heads) |
|
402 | added 11 changesets with 15 changes to 10 files (+3 heads) | |
403 | $ hg debugrequires -R clone | grep treemanifest |
|
403 | $ hg debugrequires -R clone | grep treemanifest | |
404 | treemanifest |
|
404 | treemanifest | |
405 | $ hg -R clone verify -q |
|
405 | $ hg -R clone verify -q | |
406 |
|
406 | |||
407 | Create deeper repo with tree manifests. |
|
407 | Create deeper repo with tree manifests. | |
408 |
|
408 | |||
409 | $ hg --config experimental.treemanifest=True init deeprepo |
|
409 | $ hg --config experimental.treemanifest=True init deeprepo | |
410 | $ cd deeprepo |
|
410 | $ cd deeprepo | |
411 |
|
411 | |||
412 | $ mkdir .A |
|
412 | $ mkdir .A | |
413 | $ mkdir b |
|
413 | $ mkdir b | |
414 | $ mkdir b/bar |
|
414 | $ mkdir b/bar | |
415 | $ mkdir b/bar/orange |
|
415 | $ mkdir b/bar/orange | |
416 | $ mkdir b/bar/orange/fly |
|
416 | $ mkdir b/bar/orange/fly | |
417 | $ mkdir b/foo |
|
417 | $ mkdir b/foo | |
418 | $ mkdir b/foo/apple |
|
418 | $ mkdir b/foo/apple | |
419 | $ mkdir b/foo/apple/bees |
|
419 | $ mkdir b/foo/apple/bees | |
420 |
|
420 | |||
421 | $ touch .A/one.txt |
|
421 | $ touch .A/one.txt | |
422 | $ touch .A/two.txt |
|
422 | $ touch .A/two.txt | |
423 | $ touch b/bar/fruits.txt |
|
423 | $ touch b/bar/fruits.txt | |
424 | $ touch b/bar/orange/fly/gnat.py |
|
424 | $ touch b/bar/orange/fly/gnat.py | |
425 | $ touch b/bar/orange/fly/housefly.txt |
|
425 | $ touch b/bar/orange/fly/housefly.txt | |
426 | $ touch b/foo/apple/bees/flower.py |
|
426 | $ touch b/foo/apple/bees/flower.py | |
427 | $ touch c.txt |
|
427 | $ touch c.txt | |
428 | $ touch d.py |
|
428 | $ touch d.py | |
429 |
|
429 | |||
430 | $ hg ci -Aqm 'initial' |
|
430 | $ hg ci -Aqm 'initial' | |
431 |
|
431 | |||
432 | $ echo >> .A/one.txt |
|
432 | $ echo >> .A/one.txt | |
433 | $ echo >> .A/two.txt |
|
433 | $ echo >> .A/two.txt | |
434 | $ echo >> b/bar/fruits.txt |
|
434 | $ echo >> b/bar/fruits.txt | |
435 | $ echo >> b/bar/orange/fly/gnat.py |
|
435 | $ echo >> b/bar/orange/fly/gnat.py | |
436 | $ echo >> b/bar/orange/fly/housefly.txt |
|
436 | $ echo >> b/bar/orange/fly/housefly.txt | |
437 | $ echo >> b/foo/apple/bees/flower.py |
|
437 | $ echo >> b/foo/apple/bees/flower.py | |
438 | $ echo >> c.txt |
|
438 | $ echo >> c.txt | |
439 | $ echo >> d.py |
|
439 | $ echo >> d.py | |
440 | $ hg ci -Aqm 'second' |
|
440 | $ hg ci -Aqm 'second' | |
441 |
|
441 | |||
442 | We'll see that visitdir works by removing some treemanifest revlogs and running |
|
442 | We'll see that visitdir works by removing some treemanifest revlogs and running | |
443 | the files command with various parameters. |
|
443 | the files command with various parameters. | |
444 |
|
444 | |||
445 | Test files from the root. |
|
445 | Test files from the root. | |
446 |
|
446 | |||
447 | $ hg files -r . |
|
447 | $ hg files -r . | |
448 | .A/one.txt |
|
448 | .A/one.txt | |
449 | .A/two.txt |
|
449 | .A/two.txt | |
450 | b/bar/fruits.txt |
|
450 | b/bar/fruits.txt | |
451 | b/bar/orange/fly/gnat.py |
|
451 | b/bar/orange/fly/gnat.py | |
452 | b/bar/orange/fly/housefly.txt |
|
452 | b/bar/orange/fly/housefly.txt | |
453 | b/foo/apple/bees/flower.py |
|
453 | b/foo/apple/bees/flower.py | |
454 | c.txt |
|
454 | c.txt | |
455 | d.py |
|
455 | d.py | |
456 |
|
456 | |||
457 | Excludes with a glob should not exclude everything from the glob's root |
|
457 | Excludes with a glob should not exclude everything from the glob's root | |
458 |
|
458 | |||
459 | $ hg files -r . -X 'b/fo?' b |
|
459 | $ hg files -r . -X 'b/fo?' b | |
460 | b/bar/fruits.txt |
|
460 | b/bar/fruits.txt | |
461 | b/bar/orange/fly/gnat.py |
|
461 | b/bar/orange/fly/gnat.py | |
462 | b/bar/orange/fly/housefly.txt |
|
462 | b/bar/orange/fly/housefly.txt | |
463 | $ cp -R .hg/store .hg/store-copy |
|
463 | $ cp -R .hg/store .hg/store-copy | |
464 |
|
464 | |||
465 | Test files for a subdirectory. |
|
465 | Test files for a subdirectory. | |
466 |
|
466 | |||
467 | #if reporevlogstore |
|
467 | #if reporevlogstore | |
468 | $ rm -r .hg/store/meta/~2e_a |
|
468 | $ rm -r .hg/store/meta/~2e_a | |
469 | #endif |
|
469 | #endif | |
470 | #if reposimplestore |
|
470 | #if reposimplestore | |
471 | $ rm -r .hg/store/meta/._a |
|
471 | $ rm -r .hg/store/meta/._a | |
472 | #endif |
|
472 | #endif | |
473 | $ hg files -r . b |
|
473 | $ hg files -r . b | |
474 | b/bar/fruits.txt |
|
474 | b/bar/fruits.txt | |
475 | b/bar/orange/fly/gnat.py |
|
475 | b/bar/orange/fly/gnat.py | |
476 | b/bar/orange/fly/housefly.txt |
|
476 | b/bar/orange/fly/housefly.txt | |
477 | b/foo/apple/bees/flower.py |
|
477 | b/foo/apple/bees/flower.py | |
478 | $ hg diff -r '.^' -r . --stat b |
|
478 | $ hg diff -r '.^' -r . --stat b | |
479 | b/bar/fruits.txt | 1 + |
|
479 | b/bar/fruits.txt | 1 + | |
480 | b/bar/orange/fly/gnat.py | 1 + |
|
480 | b/bar/orange/fly/gnat.py | 1 + | |
481 | b/bar/orange/fly/housefly.txt | 1 + |
|
481 | b/bar/orange/fly/housefly.txt | 1 + | |
482 | b/foo/apple/bees/flower.py | 1 + |
|
482 | b/foo/apple/bees/flower.py | 1 + | |
483 | 4 files changed, 4 insertions(+), 0 deletions(-) |
|
483 | 4 files changed, 4 insertions(+), 0 deletions(-) | |
484 | $ cp -R .hg/store-copy/. .hg/store |
|
484 | $ cp -R .hg/store-copy/. .hg/store | |
485 |
|
485 | |||
486 | Test files with just includes and excludes. |
|
486 | Test files with just includes and excludes. | |
487 |
|
487 | |||
488 | #if reporevlogstore |
|
488 | #if reporevlogstore | |
489 | $ rm -r .hg/store/meta/~2e_a |
|
489 | $ rm -r .hg/store/meta/~2e_a | |
490 | #endif |
|
490 | #endif | |
491 | #if reposimplestore |
|
491 | #if reposimplestore | |
492 | $ rm -r .hg/store/meta/._a |
|
492 | $ rm -r .hg/store/meta/._a | |
493 | #endif |
|
493 | #endif | |
494 | $ rm -r .hg/store/meta/b/bar/orange/fly |
|
494 | $ rm -r .hg/store/meta/b/bar/orange/fly | |
495 | $ rm -r .hg/store/meta/b/foo/apple/bees |
|
495 | $ rm -r .hg/store/meta/b/foo/apple/bees | |
496 | $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees |
|
496 | $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees | |
497 | b/bar/fruits.txt |
|
497 | b/bar/fruits.txt | |
498 | $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees |
|
498 | $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees | |
499 | b/bar/fruits.txt | 1 + |
|
499 | b/bar/fruits.txt | 1 + | |
500 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
500 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
501 | $ cp -R .hg/store-copy/. .hg/store |
|
501 | $ cp -R .hg/store-copy/. .hg/store | |
502 |
|
502 | |||
503 | Test files for a subdirectory, excluding a directory within it. |
|
503 | Test files for a subdirectory, excluding a directory within it. | |
504 |
|
504 | |||
505 | #if reporevlogstore |
|
505 | #if reporevlogstore | |
506 | $ rm -r .hg/store/meta/~2e_a |
|
506 | $ rm -r .hg/store/meta/~2e_a | |
507 | #endif |
|
507 | #endif | |
508 | #if reposimplestore |
|
508 | #if reposimplestore | |
509 | $ rm -r .hg/store/meta/._a |
|
509 | $ rm -r .hg/store/meta/._a | |
510 | #endif |
|
510 | #endif | |
511 | $ rm -r .hg/store/meta/b/foo |
|
511 | $ rm -r .hg/store/meta/b/foo | |
512 | $ hg files -r . -X path:b/foo b |
|
512 | $ hg files -r . -X path:b/foo b | |
513 | b/bar/fruits.txt |
|
513 | b/bar/fruits.txt | |
514 | b/bar/orange/fly/gnat.py |
|
514 | b/bar/orange/fly/gnat.py | |
515 | b/bar/orange/fly/housefly.txt |
|
515 | b/bar/orange/fly/housefly.txt | |
516 | $ hg diff -r '.^' -r . --stat -X path:b/foo b |
|
516 | $ hg diff -r '.^' -r . --stat -X path:b/foo b | |
517 | b/bar/fruits.txt | 1 + |
|
517 | b/bar/fruits.txt | 1 + | |
518 | b/bar/orange/fly/gnat.py | 1 + |
|
518 | b/bar/orange/fly/gnat.py | 1 + | |
519 | b/bar/orange/fly/housefly.txt | 1 + |
|
519 | b/bar/orange/fly/housefly.txt | 1 + | |
520 | 3 files changed, 3 insertions(+), 0 deletions(-) |
|
520 | 3 files changed, 3 insertions(+), 0 deletions(-) | |
521 | $ cp -R .hg/store-copy/. .hg/store |
|
521 | $ cp -R .hg/store-copy/. .hg/store | |
522 |
|
522 | |||
523 | Test files for a sub directory, including only a directory within it, and |
|
523 | Test files for a sub directory, including only a directory within it, and | |
524 | including an unrelated directory. |
|
524 | including an unrelated directory. | |
525 |
|
525 | |||
526 | #if reporevlogstore |
|
526 | #if reporevlogstore | |
527 | $ rm -r .hg/store/meta/~2e_a |
|
527 | $ rm -r .hg/store/meta/~2e_a | |
528 | #endif |
|
528 | #endif | |
529 | #if reposimplestore |
|
529 | #if reposimplestore | |
530 | $ rm -r .hg/store/meta/._a |
|
530 | $ rm -r .hg/store/meta/._a | |
531 | #endif |
|
531 | #endif | |
532 | $ rm -r .hg/store/meta/b/foo |
|
532 | $ rm -r .hg/store/meta/b/foo | |
533 | $ hg files -r . -I path:b/bar/orange -I path:a b |
|
533 | $ hg files -r . -I path:b/bar/orange -I path:a b | |
534 | b/bar/orange/fly/gnat.py |
|
534 | b/bar/orange/fly/gnat.py | |
535 | b/bar/orange/fly/housefly.txt |
|
535 | b/bar/orange/fly/housefly.txt | |
536 | $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b |
|
536 | $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b | |
537 | b/bar/orange/fly/gnat.py | 1 + |
|
537 | b/bar/orange/fly/gnat.py | 1 + | |
538 | b/bar/orange/fly/housefly.txt | 1 + |
|
538 | b/bar/orange/fly/housefly.txt | 1 + | |
539 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
539 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
540 | $ cp -R .hg/store-copy/. .hg/store |
|
540 | $ cp -R .hg/store-copy/. .hg/store | |
541 |
|
541 | |||
542 | Test files for a pattern, including a directory, and excluding a directory |
|
542 | Test files for a pattern, including a directory, and excluding a directory | |
543 | within that. |
|
543 | within that. | |
544 |
|
544 | |||
545 | #if reporevlogstore |
|
545 | #if reporevlogstore | |
546 | $ rm -r .hg/store/meta/~2e_a |
|
546 | $ rm -r .hg/store/meta/~2e_a | |
547 | #endif |
|
547 | #endif | |
548 | #if reposimplestore |
|
548 | #if reposimplestore | |
549 | $ rm -r .hg/store/meta/._a |
|
549 | $ rm -r .hg/store/meta/._a | |
550 | #endif |
|
550 | #endif | |
551 | $ rm -r .hg/store/meta/b/foo |
|
551 | $ rm -r .hg/store/meta/b/foo | |
552 | $ rm -r .hg/store/meta/b/bar/orange |
|
552 | $ rm -r .hg/store/meta/b/bar/orange | |
553 | $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange |
|
553 | $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange | |
554 | b/bar/fruits.txt |
|
554 | b/bar/fruits.txt | |
555 | $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange |
|
555 | $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange | |
556 | b/bar/fruits.txt | 1 + |
|
556 | b/bar/fruits.txt | 1 + | |
557 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
557 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
558 | $ cp -R .hg/store-copy/. .hg/store |
|
558 | $ cp -R .hg/store-copy/. .hg/store | |
559 |
|
559 | |||
560 | Add some more changes to the deep repo |
|
560 | Add some more changes to the deep repo | |
561 | $ echo narf >> b/bar/fruits.txt |
|
561 | $ echo narf >> b/bar/fruits.txt | |
562 | $ hg ci -m narf |
|
562 | $ hg ci -m narf | |
563 | $ echo troz >> b/bar/orange/fly/gnat.py |
|
563 | $ echo troz >> b/bar/orange/fly/gnat.py | |
564 | $ hg ci -m troz |
|
564 | $ hg ci -m troz | |
565 |
|
565 | |||
566 | Verify works |
|
566 | Verify works | |
567 | $ hg verify -q |
|
567 | $ hg verify -q | |
568 |
|
568 | |||
569 | #if repofncache |
|
569 | #if repofncache | |
570 | Dirlogs are included in fncache |
|
570 | Dirlogs are included in fncache | |
571 | $ grep meta/.A/00manifest.i .hg/store/fncache |
|
571 | $ grep meta/.A/00manifest.i .hg/store/fncache | |
572 | meta/.A/00manifest.i |
|
572 | meta/.A/00manifest.i | |
573 |
|
573 | |||
574 | Rebuilt fncache includes dirlogs |
|
574 | Rebuilt fncache includes dirlogs | |
575 | $ rm .hg/store/fncache |
|
575 | $ rm .hg/store/fncache | |
576 | $ hg debugrebuildfncache |
|
576 | $ hg debugrebuildfncache | |
577 | adding data/.A/one.txt.i |
|
577 | adding data/.A/one.txt.i | |
578 | adding data/.A/two.txt.i |
|
578 | adding data/.A/two.txt.i | |
579 | adding data/b/bar/fruits.txt.i |
|
579 | adding data/b/bar/fruits.txt.i | |
580 | adding data/b/bar/orange/fly/gnat.py.i |
|
580 | adding data/b/bar/orange/fly/gnat.py.i | |
581 | adding data/b/bar/orange/fly/housefly.txt.i |
|
581 | adding data/b/bar/orange/fly/housefly.txt.i | |
582 | adding data/b/foo/apple/bees/flower.py.i |
|
582 | adding data/b/foo/apple/bees/flower.py.i | |
583 | adding data/c.txt.i |
|
583 | adding data/c.txt.i | |
584 | adding data/d.py.i |
|
584 | adding data/d.py.i | |
585 | adding meta/.A/00manifest.i |
|
585 | adding meta/.A/00manifest.i | |
586 | adding meta/b/00manifest.i |
|
586 | adding meta/b/00manifest.i | |
587 | adding meta/b/bar/00manifest.i |
|
587 | adding meta/b/bar/00manifest.i | |
588 | adding meta/b/bar/orange/00manifest.i |
|
588 | adding meta/b/bar/orange/00manifest.i | |
589 | adding meta/b/bar/orange/fly/00manifest.i |
|
589 | adding meta/b/bar/orange/fly/00manifest.i | |
590 | adding meta/b/foo/00manifest.i |
|
590 | adding meta/b/foo/00manifest.i | |
591 | adding meta/b/foo/apple/00manifest.i |
|
591 | adding meta/b/foo/apple/00manifest.i | |
592 | adding meta/b/foo/apple/bees/00manifest.i |
|
592 | adding meta/b/foo/apple/bees/00manifest.i | |
593 | 16 items added, 0 removed from fncache |
|
593 | 16 items added, 0 removed from fncache | |
594 | #endif |
|
594 | #endif | |
595 |
|
595 | |||
596 | Finish first server |
|
596 | Finish first server | |
597 | $ killdaemons.py |
|
597 | $ killdaemons.py | |
598 |
|
598 | |||
599 | Back up the recently added revlogs |
|
599 | Back up the recently added revlogs | |
600 | $ cp -R .hg/store .hg/store-newcopy |
|
600 | $ cp -R .hg/store .hg/store-newcopy | |
601 |
|
601 | |||
602 | Verify reports missing dirlog |
|
602 | Verify reports missing dirlog | |
603 | $ rm .hg/store/meta/b/00manifest.* |
|
603 | $ rm .hg/store/meta/b/00manifest.* | |
604 | $ hg verify |
|
604 | $ hg verify | |
605 | checking changesets |
|
605 | checking changesets | |
606 | checking manifests |
|
606 | checking manifests | |
607 | checking directory manifests |
|
607 | checking directory manifests | |
608 | 0: empty or missing b/ |
|
608 | 0: empty or missing b/ | |
609 | b/@0: parent-directory manifest refers to unknown revision 67688a370455 |
|
609 | b/@0: parent-directory manifest refers to unknown revision 67688a370455 | |
610 | b/@1: parent-directory manifest refers to unknown revision f065da70369e |
|
610 | b/@1: parent-directory manifest refers to unknown revision f065da70369e | |
611 | b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b |
|
611 | b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b | |
612 | b/@3: parent-directory manifest refers to unknown revision 367152e6af28 |
|
612 | b/@3: parent-directory manifest refers to unknown revision 367152e6af28 | |
613 | warning: orphan data file 'meta/b/bar/00manifest.i' (reporevlogstore !) |
|
613 | warning: orphan data file 'meta/b/bar/00manifest.i' (reporevlogstore !) | |
614 | warning: orphan data file 'meta/b/bar/orange/00manifest.i' (reporevlogstore !) |
|
614 | warning: orphan data file 'meta/b/bar/orange/00manifest.i' (reporevlogstore !) | |
615 | warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i' (reporevlogstore !) |
|
615 | warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i' (reporevlogstore !) | |
616 | warning: orphan data file 'meta/b/foo/00manifest.i' (reporevlogstore !) |
|
616 | warning: orphan data file 'meta/b/foo/00manifest.i' (reporevlogstore !) | |
617 | warning: orphan data file 'meta/b/foo/apple/00manifest.i' (reporevlogstore !) |
|
617 | warning: orphan data file 'meta/b/foo/apple/00manifest.i' (reporevlogstore !) | |
618 | warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i' (reporevlogstore !) |
|
618 | warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i' (reporevlogstore !) | |
619 | crosschecking files in changesets and manifests |
|
619 | crosschecking files in changesets and manifests | |
620 | b/bar/fruits.txt@0: in changeset but not in manifest |
|
620 | b/bar/fruits.txt@0: in changeset but not in manifest | |
621 | b/bar/orange/fly/gnat.py@0: in changeset but not in manifest |
|
621 | b/bar/orange/fly/gnat.py@0: in changeset but not in manifest | |
622 | b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest |
|
622 | b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest | |
623 | b/foo/apple/bees/flower.py@0: in changeset but not in manifest |
|
623 | b/foo/apple/bees/flower.py@0: in changeset but not in manifest | |
624 | checking files |
|
624 | checking files | |
625 | not checking dirstate because of previous errors |
|
625 | not checking dirstate because of previous errors | |
626 | checked 4 changesets with 18 changes to 8 files |
|
626 | checked 4 changesets with 18 changes to 8 files | |
627 | 6 warnings encountered! (reporevlogstore !) |
|
627 | 6 warnings encountered! (reporevlogstore !) | |
628 | 9 integrity errors encountered! |
|
628 | 9 integrity errors encountered! | |
629 | (first damaged changeset appears to be 0) |
|
629 | (first damaged changeset appears to be 0) | |
630 | [1] |
|
630 | [1] | |
631 | $ cp -R .hg/store-newcopy/. .hg/store |
|
631 | $ cp -R .hg/store-newcopy/. .hg/store | |
632 |
|
632 | |||
633 | Verify reports missing dirlog entry |
|
633 | Verify reports missing dirlog entry | |
634 | $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/ |
|
634 | $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/ | |
635 | $ hg verify |
|
635 | $ hg verify | |
636 | checking changesets |
|
636 | checking changesets | |
637 | checking manifests |
|
637 | checking manifests | |
638 | checking directory manifests |
|
638 | checking directory manifests | |
639 | b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b |
|
639 | b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b | |
640 | b/@3: parent-directory manifest refers to unknown revision 367152e6af28 |
|
640 | b/@3: parent-directory manifest refers to unknown revision 367152e6af28 | |
641 | b/bar/@?: rev 2 points to unexpected changeset 2 |
|
641 | b/bar/@?: rev 2 points to unexpected changeset 2 | |
642 | b/bar/@?: 44d7e1146e0d not in parent-directory manifest |
|
642 | b/bar/@?: 44d7e1146e0d not in parent-directory manifest | |
643 | b/bar/@?: rev 3 points to unexpected changeset 3 |
|
643 | b/bar/@?: rev 3 points to unexpected changeset 3 | |
644 | b/bar/@?: 70b10c6b17b7 not in parent-directory manifest |
|
644 | b/bar/@?: 70b10c6b17b7 not in parent-directory manifest | |
645 | b/bar/orange/@?: rev 2 points to unexpected changeset 3 |
|
645 | b/bar/orange/@?: rev 2 points to unexpected changeset 3 | |
646 | (expected None) |
|
646 | (expected None) | |
647 | b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3 |
|
647 | b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3 | |
648 | (expected None) |
|
648 | (expected None) | |
649 | crosschecking files in changesets and manifests |
|
649 | crosschecking files in changesets and manifests | |
650 | checking files |
|
650 | checking files | |
651 | not checking dirstate because of previous errors |
|
651 | not checking dirstate because of previous errors | |
652 | checked 4 changesets with 18 changes to 8 files |
|
652 | checked 4 changesets with 18 changes to 8 files | |
653 | 2 warnings encountered! |
|
653 | 2 warnings encountered! | |
654 | 8 integrity errors encountered! |
|
654 | 8 integrity errors encountered! | |
655 | (first damaged changeset appears to be 2) |
|
655 | (first damaged changeset appears to be 2) | |
656 | [1] |
|
656 | [1] | |
657 | $ cp -R .hg/store-newcopy/. .hg/store |
|
657 | $ cp -R .hg/store-newcopy/. .hg/store | |
658 |
|
658 | |||
659 | Test cloning a treemanifest repo over http. |
|
659 | Test cloning a treemanifest repo over http. | |
660 | $ cd .. |
|
660 | $ cd .. | |
661 | $ hg -R deeprepo serve -p $HGPORT -d \ |
|
661 | $ hg -R deeprepo serve -p $HGPORT -d \ | |
662 | > --pid-file=port-0-hg.pid \ |
|
662 | > --pid-file=port-0-hg.pid \ | |
663 | > --errorlog=port-0-errors.log |
|
663 | > --errorlog=port-0-errors.log | |
664 | $ cat port-0-hg.pid >> $DAEMON_PIDS |
|
664 | $ cat port-0-hg.pid >> $DAEMON_PIDS | |
665 |
|
665 | |||
666 | We can clone even with the knob turned off and we'll get a treemanifest repo. |
|
666 | We can clone even with the knob turned off and we'll get a treemanifest repo. | |
667 | $ hg clone --config experimental.treemanifest=False \ |
|
667 | $ hg clone --config experimental.treemanifest=False \ | |
668 | > --config experimental.changegroup3=True \ |
|
668 | > --config experimental.changegroup3=True \ | |
669 | > http://localhost:$HGPORT deepclone |
|
669 | > http://localhost:$HGPORT deepclone | |
670 | requesting all changes |
|
670 | requesting all changes | |
671 | adding changesets |
|
671 | adding changesets | |
672 | adding manifests |
|
672 | adding manifests | |
673 | adding file changes |
|
673 | adding file changes | |
674 | added 4 changesets with 18 changes to 8 files |
|
674 | added 4 changesets with 18 changes to 8 files | |
675 | new changesets 775704be6f52:523e5c631710 |
|
675 | new changesets 775704be6f52:523e5c631710 | |
676 | updating to branch default |
|
676 | updating to branch default | |
677 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
677 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
678 | No server errors. |
|
678 | No server errors. | |
679 | $ cat port-0-errors.log |
|
679 | $ cat port-0-errors.log | |
680 |
|
680 | |||
681 | requires got updated to include treemanifest |
|
681 | requires got updated to include treemanifest | |
682 | $ hg debugrequires -R deepclone | grep treemanifest |
|
682 | $ hg debugrequires -R deepclone | grep treemanifest | |
683 | treemanifest |
|
683 | treemanifest | |
684 | Tree manifest revlogs exist. |
|
684 | Tree manifest revlogs exist. | |
685 | $ find deepclone/.hg/store/meta | sort |
|
685 | $ find deepclone/.hg/store/meta | sort | |
686 | deepclone/.hg/store/meta |
|
686 | deepclone/.hg/store/meta | |
687 | deepclone/.hg/store/meta/._a (reposimplestore !) |
|
687 | deepclone/.hg/store/meta/._a (reposimplestore !) | |
688 | deepclone/.hg/store/meta/._a/00manifest.i (reposimplestore !) |
|
688 | deepclone/.hg/store/meta/._a/00manifest.i (reposimplestore !) | |
689 | deepclone/.hg/store/meta/b |
|
689 | deepclone/.hg/store/meta/b | |
690 | deepclone/.hg/store/meta/b/00manifest.i |
|
690 | deepclone/.hg/store/meta/b/00manifest.i | |
691 | deepclone/.hg/store/meta/b/bar |
|
691 | deepclone/.hg/store/meta/b/bar | |
692 | deepclone/.hg/store/meta/b/bar/00manifest.i |
|
692 | deepclone/.hg/store/meta/b/bar/00manifest.i | |
693 | deepclone/.hg/store/meta/b/bar/orange |
|
693 | deepclone/.hg/store/meta/b/bar/orange | |
694 | deepclone/.hg/store/meta/b/bar/orange/00manifest.i |
|
694 | deepclone/.hg/store/meta/b/bar/orange/00manifest.i | |
695 | deepclone/.hg/store/meta/b/bar/orange/fly |
|
695 | deepclone/.hg/store/meta/b/bar/orange/fly | |
696 | deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i |
|
696 | deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i | |
697 | deepclone/.hg/store/meta/b/foo |
|
697 | deepclone/.hg/store/meta/b/foo | |
698 | deepclone/.hg/store/meta/b/foo/00manifest.i |
|
698 | deepclone/.hg/store/meta/b/foo/00manifest.i | |
699 | deepclone/.hg/store/meta/b/foo/apple |
|
699 | deepclone/.hg/store/meta/b/foo/apple | |
700 | deepclone/.hg/store/meta/b/foo/apple/00manifest.i |
|
700 | deepclone/.hg/store/meta/b/foo/apple/00manifest.i | |
701 | deepclone/.hg/store/meta/b/foo/apple/bees |
|
701 | deepclone/.hg/store/meta/b/foo/apple/bees | |
702 | deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i |
|
702 | deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i | |
703 | deepclone/.hg/store/meta/~2e_a (reporevlogstore !) |
|
703 | deepclone/.hg/store/meta/~2e_a (reporevlogstore !) | |
704 | deepclone/.hg/store/meta/~2e_a/00manifest.i (reporevlogstore !) |
|
704 | deepclone/.hg/store/meta/~2e_a/00manifest.i (reporevlogstore !) | |
705 | Verify passes. |
|
705 | Verify passes. | |
706 | $ cd deepclone |
|
706 | $ cd deepclone | |
707 | $ hg verify -q |
|
707 | $ hg verify -q | |
708 | $ cd .. |
|
708 | $ cd .. | |
709 |
|
709 | |||
710 | #if reporevlogstore |
|
710 | #if reporevlogstore | |
711 | Create clones using old repo formats to use in later tests |
|
711 | Create clones using old repo formats to use in later tests | |
712 | $ hg clone --config format.usestore=False \ |
|
712 | $ hg clone --config format.usestore=False \ | |
713 | > --config experimental.changegroup3=True \ |
|
713 | > --config experimental.changegroup3=True \ | |
714 | > http://localhost:$HGPORT deeprepo-basicstore |
|
714 | > http://localhost:$HGPORT deeprepo-basicstore | |
715 | requesting all changes |
|
715 | requesting all changes | |
716 | adding changesets |
|
716 | adding changesets | |
717 | adding manifests |
|
717 | adding manifests | |
718 | adding file changes |
|
718 | adding file changes | |
719 | added 4 changesets with 18 changes to 8 files |
|
719 | added 4 changesets with 18 changes to 8 files | |
720 | new changesets 775704be6f52:523e5c631710 |
|
720 | new changesets 775704be6f52:523e5c631710 | |
721 | updating to branch default |
|
721 | updating to branch default | |
722 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
722 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
723 | $ hg -R deeprepo-basicstore debugrequires | grep store |
|
723 | $ hg -R deeprepo-basicstore debugrequires | grep store | |
724 | [1] |
|
724 | [1] | |
725 | $ hg -R deeprepo-basicstore serve -p $HGPORT1 -d \ |
|
725 | $ hg -R deeprepo-basicstore serve -p $HGPORT1 -d \ | |
726 | > --pid-file=port-1-hg.pid \ |
|
726 | > --pid-file=port-1-hg.pid \ | |
727 | > --errorlog=port-1-errors.log |
|
727 | > --errorlog=port-1-errors.log | |
728 | $ cat port-1-hg.pid >> $DAEMON_PIDS |
|
728 | $ cat port-1-hg.pid >> $DAEMON_PIDS | |
729 |
|
729 | |||
730 | $ hg clone --config format.usefncache=False \ |
|
730 | $ hg clone --config format.usefncache=False \ | |
731 | > --config experimental.changegroup3=True \ |
|
731 | > --config experimental.changegroup3=True \ | |
732 | > http://localhost:$HGPORT deeprepo-encodedstore |
|
732 | > http://localhost:$HGPORT deeprepo-encodedstore | |
733 | requesting all changes |
|
733 | requesting all changes | |
734 | adding changesets |
|
734 | adding changesets | |
735 | adding manifests |
|
735 | adding manifests | |
736 | adding file changes |
|
736 | adding file changes | |
737 | added 4 changesets with 18 changes to 8 files |
|
737 | added 4 changesets with 18 changes to 8 files | |
738 | new changesets 775704be6f52:523e5c631710 |
|
738 | new changesets 775704be6f52:523e5c631710 | |
739 | updating to branch default |
|
739 | updating to branch default | |
740 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
740 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
741 | $ hg -R deeprepo-encodedstore debugrequires | grep fncache |
|
741 | $ hg -R deeprepo-encodedstore debugrequires | grep fncache | |
742 | [1] |
|
742 | [1] | |
743 | $ hg -R deeprepo-encodedstore serve -p $HGPORT2 -d \ |
|
743 | $ hg -R deeprepo-encodedstore serve -p $HGPORT2 -d \ | |
744 | > --pid-file=port-2-hg.pid \ |
|
744 | > --pid-file=port-2-hg.pid \ | |
745 | > --errorlog=port-2-errors.log |
|
745 | > --errorlog=port-2-errors.log | |
746 | $ cat port-2-hg.pid >> $DAEMON_PIDS |
|
746 | $ cat port-2-hg.pid >> $DAEMON_PIDS | |
747 |
|
747 | |||
748 | Local clone with basicstore |
|
748 | Local clone with basicstore | |
749 | $ hg clone -U deeprepo-basicstore local-clone-basicstore |
|
749 | $ hg clone -U deeprepo-basicstore local-clone-basicstore | |
750 | $ hg -R local-clone-basicstore verify -q |
|
750 | $ hg -R local-clone-basicstore verify -q | |
751 |
|
751 | |||
752 | Local clone with encodedstore |
|
752 | Local clone with encodedstore | |
753 | $ hg clone -U deeprepo-encodedstore local-clone-encodedstore |
|
753 | $ hg clone -U deeprepo-encodedstore local-clone-encodedstore | |
754 | $ hg -R local-clone-encodedstore verify -q |
|
754 | $ hg -R local-clone-encodedstore verify -q | |
755 |
|
755 | |||
756 | Local clone with fncachestore |
|
756 | Local clone with fncachestore | |
757 | $ hg clone -U deeprepo local-clone-fncachestore |
|
757 | $ hg clone -U deeprepo local-clone-fncachestore | |
758 | $ hg -R local-clone-fncachestore verify -q |
|
758 | $ hg -R local-clone-fncachestore verify -q | |
759 |
|
759 | |||
760 | Stream clone with basicstore |
|
760 | Stream clone with basicstore | |
761 | $ hg clone --config experimental.changegroup3=True --stream -U \ |
|
761 | $ hg clone --config experimental.changegroup3=True --stream -U \ | |
762 | > http://localhost:$HGPORT1 stream-clone-basicstore |
|
762 | > http://localhost:$HGPORT1 stream-clone-basicstore | |
763 | streaming all changes |
|
763 | streaming all changes | |
764 | 28 files to transfer, * of data (glob) |
|
764 | 28 files to transfer, * of data (glob) | |
765 | transferred * in * seconds (*) (glob) |
|
765 | transferred * in * seconds (*) (glob) | |
766 | $ hg -R stream-clone-basicstore verify -q |
|
766 | $ hg -R stream-clone-basicstore verify -q | |
767 | $ cat port-1-errors.log |
|
767 | $ cat port-1-errors.log | |
768 |
|
768 | |||
769 | Stream clone with encodedstore |
|
769 | Stream clone with encodedstore | |
770 | $ hg clone --config experimental.changegroup3=True --stream -U \ |
|
770 | $ hg clone --config experimental.changegroup3=True --stream -U \ | |
771 | > http://localhost:$HGPORT2 stream-clone-encodedstore |
|
771 | > http://localhost:$HGPORT2 stream-clone-encodedstore | |
772 | streaming all changes |
|
772 | streaming all changes | |
773 | 28 files to transfer, * of data (glob) |
|
773 | 28 files to transfer, * of data (glob) | |
774 | transferred * in * seconds (*) (glob) |
|
774 | transferred * in * seconds (*) (glob) | |
775 | $ hg -R stream-clone-encodedstore verify -q |
|
775 | $ hg -R stream-clone-encodedstore verify -q | |
776 | $ cat port-2-errors.log |
|
776 | $ cat port-2-errors.log | |
777 |
|
777 | |||
778 | Stream clone with fncachestore |
|
778 | Stream clone with fncachestore | |
779 | $ hg clone --config experimental.changegroup3=True --stream -U \ |
|
779 | $ hg clone --config experimental.changegroup3=True --stream -U \ | |
780 | > http://localhost:$HGPORT stream-clone-fncachestore |
|
780 | > http://localhost:$HGPORT stream-clone-fncachestore | |
781 | streaming all changes |
|
781 | streaming all changes | |
782 | 22 files to transfer, * of data (glob) |
|
782 | 22 files to transfer, * of data (glob) | |
783 | transferred * in * seconds (*) (glob) |
|
783 | transferred * in * seconds (*) (glob) | |
784 | $ hg -R stream-clone-fncachestore verify -q |
|
784 | $ hg -R stream-clone-fncachestore verify -q | |
785 | $ cat port-0-errors.log |
|
785 | $ cat port-0-errors.log | |
786 |
|
786 | |||
787 | Packed bundle |
|
787 | Packed bundle | |
788 | $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg |
|
788 | $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg | |
789 | writing 5330 bytes for 18 files (no-zstd !) |
|
789 | writing 5330 bytes for 18 files (no-zstd !) | |
790 | writing 5400 bytes for 18 files (zstd !) |
|
790 | writing 5400 bytes for 18 files (zstd !) | |
791 | bundle requirements:.* treemanifest(,.*)? (re) |
|
791 | bundle requirements:.* treemanifest(,.*)? (re) | |
792 | $ hg debugbundle --spec repo-packed.hg |
|
792 | $ hg debugbundle --spec repo-packed.hg | |
793 | none-packed1;requirements%3D(.*%2C)?treemanifest(%2C.*)? (re) |
|
793 | none-packed1;requirements%3D(.*%2C)?treemanifest(%2C.*)? (re) | |
794 |
|
794 | |||
795 | #endif |
|
795 | #endif | |
796 |
|
796 | |||
797 | Bundle with changegroup2 is not supported |
|
797 | Bundle with changegroup2 is not supported | |
798 |
|
798 | |||
799 | $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle |
|
799 | $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle | |
800 | abort: repository does not support bundle version 02 |
|
800 | abort: repository does not support bundle version 02 | |
801 | [255] |
|
801 | [255] | |
802 |
|
802 | |||
803 | Pull does not include changegroup for manifest the client already has from |
|
803 | Pull does not include changegroup for manifest the client already has from | |
804 | other branch |
|
804 | other branch | |
805 |
|
805 | |||
806 | $ mkdir grafted-dir-repo |
|
806 | $ mkdir grafted-dir-repo | |
807 | $ cd grafted-dir-repo |
|
807 | $ cd grafted-dir-repo | |
808 | $ hg --config experimental.treemanifest=1 init |
|
808 | $ hg --config experimental.treemanifest=1 init | |
809 | $ mkdir dir |
|
809 | $ mkdir dir | |
810 | $ echo a > dir/file |
|
810 | $ echo a > dir/file | |
811 | $ echo a > file |
|
811 | $ echo a > file | |
812 | $ hg ci -Am initial |
|
812 | $ hg ci -Am initial | |
813 | adding dir/file |
|
813 | adding dir/file | |
814 | adding file |
|
814 | adding file | |
815 | $ echo b > dir/file |
|
815 | $ echo b > dir/file | |
816 | $ hg ci -m updated |
|
816 | $ hg ci -m updated | |
817 | $ hg co '.^' |
|
817 | $ hg co '.^' | |
818 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
818 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
819 | $ hg revert -r tip dir/ |
|
819 | $ hg revert -r tip dir/ | |
820 | reverting dir/file |
|
820 | reverting dir/file | |
821 | $ echo b > file # to make sure root manifest is sent |
|
821 | $ echo b > file # to make sure root manifest is sent | |
822 | $ hg ci -m grafted |
|
822 | $ hg ci -m grafted | |
823 | created new head |
|
823 | created new head | |
824 | $ cd .. |
|
824 | $ cd .. | |
825 |
|
825 | |||
826 | $ hg --config experimental.treemanifest=1 clone --pull -r 1 \ |
|
826 | $ hg --config experimental.treemanifest=1 clone --pull -r 1 \ | |
827 | > grafted-dir-repo grafted-dir-repo-clone |
|
827 | > grafted-dir-repo grafted-dir-repo-clone | |
828 | adding changesets |
|
828 | adding changesets | |
829 | adding manifests |
|
829 | adding manifests | |
830 | adding file changes |
|
830 | adding file changes | |
831 | added 2 changesets with 3 changes to 2 files |
|
831 | added 2 changesets with 3 changes to 2 files | |
832 | new changesets d84f4c419457:09ab742f3b0f |
|
832 | new changesets d84f4c419457:09ab742f3b0f | |
833 | updating to branch default |
|
833 | updating to branch default | |
834 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
834 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
835 | $ cd grafted-dir-repo-clone |
|
835 | $ cd grafted-dir-repo-clone | |
836 | $ hg pull -r 2 |
|
836 | $ hg pull -r 2 | |
837 | pulling from $TESTTMP/grafted-dir-repo |
|
837 | pulling from $TESTTMP/grafted-dir-repo | |
838 | searching for changes |
|
838 | searching for changes | |
839 | adding changesets |
|
839 | adding changesets | |
840 | adding manifests |
|
840 | adding manifests | |
841 | adding file changes |
|
841 | adding file changes | |
842 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
842 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
843 | new changesets 73699489fb7c |
|
843 | new changesets 73699489fb7c | |
844 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
844 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
845 |
|
845 | |||
846 | Committing a empty commit does not duplicate root treemanifest |
|
846 | Committing a empty commit does not duplicate root treemanifest | |
847 | $ echo z >> z |
|
847 | $ echo z >> z | |
848 | $ hg commit -Aqm 'pre-empty commit' |
|
848 | $ hg commit -Aqm 'pre-empty commit' | |
849 | $ hg rm z |
|
849 | $ hg rm z | |
850 | $ hg commit --amend -m 'empty commit' |
|
850 | $ hg commit --amend -m 'empty commit' | |
851 | saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg |
|
851 | saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg | |
852 | $ hg log -r 'tip + tip^' -T '{manifest}\n' |
|
852 | $ hg log -r 'tip + tip^' -T '{manifest}\n' | |
853 | 1:678d3574b88c |
|
853 | 1:678d3574b88c | |
854 | 1:678d3574b88c |
|
854 | 1:678d3574b88c | |
855 | $ hg --config extensions.strip= strip -r . -q |
|
855 | $ hg --config extensions.strip= strip -r . -q | |
|
856 | ||||
|
857 | Testing repository upgrade | |||
|
858 | -------------------------- | |||
|
859 | ||||
|
860 | $ for x in 1 2 3 4 5 6 7 8 9; do | |||
|
861 | > echo $x > file-$x # make sure we have interresting compression | |||
|
862 | > echo $x > dir/foo-$x # make sure we have interresting compression | |||
|
863 | > hg add file-$x | |||
|
864 | > hg add dir/foo-$x | |||
|
865 | > done | |||
|
866 | $ hg ci -m 'have some content' | |||
|
867 | $ f -s .hg/store/00manifest.* | |||
|
868 | .hg/store/00manifest.i: size=798 (no-pure !) | |||
|
869 | .hg/store/00manifest.i: size=784 (pure !) | |||
|
870 | $ f -s .hg/store/meta/dir/00manifest* | |||
|
871 | .hg/store/meta/dir/00manifest.i: size=556 (no-pure !) | |||
|
872 | .hg/store/meta/dir/00manifest.i: size=544 (pure !) | |||
|
873 | $ hg debugupgraderepo --config format.revlog-compression=none --config experimental.treemanifest=yes --run --quiet --no-backup | |||
|
874 | upgrade will perform the following actions: | |||
|
875 | ||||
|
876 | requirements | |||
|
877 | preserved: * (glob) | |||
|
878 | removed: revlog-compression-zstd (no-pure !) | |||
|
879 | added: exp-compression-none | |||
|
880 | ||||
|
881 | processed revlogs: | |||
|
882 | - all-filelogs | |||
|
883 | - changelog | |||
|
884 | - manifest | |||
|
885 | ||||
|
886 | $ hg verify | |||
|
887 | checking changesets | |||
|
888 | checking manifests | |||
|
889 | checking directory manifests | |||
|
890 | crosschecking files in changesets and manifests | |||
|
891 | checking files | |||
|
892 | checking dirstate | |||
|
893 | checked 4 changesets with 22 changes to 20 files | |||
|
894 | $ f -s .hg/store/00manifest.* | |||
|
895 | .hg/store/00manifest.i: size=1002 | |||
|
896 | $ f -s .hg/store/meta/dir/00manifest* | |||
|
897 | .hg/store/meta/dir/00manifest.i: size=721 | |||
|
898 | $ hg files --rev tip | wc -l | |||
|
899 | \s*20 (re) |
@@ -1,2101 +1,2101 b'' | |||||
1 | #require no-reposimplestore |
|
1 | #require no-reposimplestore | |
2 |
|
2 | |||
3 | $ cat >> $HGRCPATH << EOF |
|
3 | $ cat >> $HGRCPATH << EOF | |
4 | > [extensions] |
|
4 | > [extensions] | |
5 | > share = |
|
5 | > share = | |
6 | > [format] |
|
6 | > [format] | |
7 | > # stabilize test accross variant |
|
7 | > # stabilize test accross variant | |
8 | > revlog-compression=zlib |
|
8 | > revlog-compression=zlib | |
9 | > [storage] |
|
9 | > [storage] | |
10 | > dirstate-v2.slow-path=allow |
|
10 | > dirstate-v2.slow-path=allow | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 | store and revlogv1 are required in source |
|
13 | store and revlogv1 are required in source | |
14 |
|
14 | |||
15 | $ hg --config format.usestore=false init no-store |
|
15 | $ hg --config format.usestore=false init no-store | |
16 | $ hg -R no-store debugupgraderepo |
|
16 | $ hg -R no-store debugupgraderepo | |
17 | abort: cannot upgrade repository; requirement missing: store |
|
17 | abort: cannot upgrade repository; requirement missing: store | |
18 | [255] |
|
18 | [255] | |
19 |
|
19 | |||
20 | $ hg init no-revlogv1 |
|
20 | $ hg init no-revlogv1 | |
21 | $ cat > no-revlogv1/.hg/requires << EOF |
|
21 | $ cat > no-revlogv1/.hg/requires << EOF | |
22 | > dotencode |
|
22 | > dotencode | |
23 | > fncache |
|
23 | > fncache | |
24 | > generaldelta |
|
24 | > generaldelta | |
25 | > store |
|
25 | > store | |
26 | > EOF |
|
26 | > EOF | |
27 |
|
27 | |||
28 | $ hg -R no-revlogv1 debugupgraderepo |
|
28 | $ hg -R no-revlogv1 debugupgraderepo | |
29 | abort: cannot upgrade repository; missing a revlog version |
|
29 | abort: cannot upgrade repository; missing a revlog version | |
30 | [255] |
|
30 | [255] | |
31 |
|
31 | |||
32 | Cannot upgrade shared repositories |
|
32 | Cannot upgrade shared repositories | |
33 |
|
33 | |||
34 | $ hg init share-parent |
|
34 | $ hg init share-parent | |
35 | $ hg -R share-parent debugbuilddag -n .+9 |
|
35 | $ hg -R share-parent debugbuilddag -n .+9 | |
36 | $ hg -R share-parent up tip |
|
36 | $ hg -R share-parent up tip | |
37 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 10 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | $ hg -q share share-parent share-child |
|
38 | $ hg -q share share-parent share-child | |
39 |
|
39 | |||
40 | $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no |
|
40 | $ hg -R share-child debugupgraderepo --config format.sparse-revlog=no | |
41 | abort: cannot use these actions on a share repository: sparserevlog |
|
41 | abort: cannot use these actions on a share repository: sparserevlog | |
42 | (upgrade the main repository directly) |
|
42 | (upgrade the main repository directly) | |
43 | [255] |
|
43 | [255] | |
44 |
|
44 | |||
45 | Unless the action is compatible with share |
|
45 | Unless the action is compatible with share | |
46 |
|
46 | |||
47 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet |
|
47 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet | |
48 | requirements |
|
48 | requirements | |
49 | preserved: * (glob) |
|
49 | preserved: * (glob) | |
50 | added: dirstate-v2 |
|
50 | added: dirstate-v2 | |
51 |
|
51 | |||
52 | no revlogs to process |
|
52 | no revlogs to process | |
53 |
|
53 | |||
54 |
|
54 | |||
55 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run |
|
55 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=yes --quiet --run | |
56 | upgrade will perform the following actions: |
|
56 | upgrade will perform the following actions: | |
57 |
|
57 | |||
58 | requirements |
|
58 | requirements | |
59 | preserved: * (glob) |
|
59 | preserved: * (glob) | |
60 | added: dirstate-v2 |
|
60 | added: dirstate-v2 | |
61 |
|
61 | |||
62 | no revlogs to process |
|
62 | no revlogs to process | |
63 |
|
63 | |||
64 | $ hg debugformat -R share-child | grep dirstate-v2 |
|
64 | $ hg debugformat -R share-child | grep dirstate-v2 | |
65 | dirstate-v2: yes |
|
65 | dirstate-v2: yes | |
66 | $ hg debugformat -R share-parent | grep dirstate-v2 |
|
66 | $ hg debugformat -R share-parent | grep dirstate-v2 | |
67 | dirstate-v2: no |
|
67 | dirstate-v2: no | |
68 | $ hg status --all -R share-child |
|
68 | $ hg status --all -R share-child | |
69 | C nf0 |
|
69 | C nf0 | |
70 | C nf1 |
|
70 | C nf1 | |
71 | C nf2 |
|
71 | C nf2 | |
72 | C nf3 |
|
72 | C nf3 | |
73 | C nf4 |
|
73 | C nf4 | |
74 | C nf5 |
|
74 | C nf5 | |
75 | C nf6 |
|
75 | C nf6 | |
76 | C nf7 |
|
76 | C nf7 | |
77 | C nf8 |
|
77 | C nf8 | |
78 | C nf9 |
|
78 | C nf9 | |
79 | $ hg log -l 3 -R share-child |
|
79 | $ hg log -l 3 -R share-child | |
80 | changeset: 9:0059eb38e4a4 |
|
80 | changeset: 9:0059eb38e4a4 | |
81 | tag: tip |
|
81 | tag: tip | |
82 | user: debugbuilddag |
|
82 | user: debugbuilddag | |
83 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
83 | date: Thu Jan 01 00:00:09 1970 +0000 | |
84 | summary: r9 |
|
84 | summary: r9 | |
85 |
|
85 | |||
86 | changeset: 8:4d5be70c8130 |
|
86 | changeset: 8:4d5be70c8130 | |
87 | user: debugbuilddag |
|
87 | user: debugbuilddag | |
88 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
88 | date: Thu Jan 01 00:00:08 1970 +0000 | |
89 | summary: r8 |
|
89 | summary: r8 | |
90 |
|
90 | |||
91 | changeset: 7:e60bfe72517e |
|
91 | changeset: 7:e60bfe72517e | |
92 | user: debugbuilddag |
|
92 | user: debugbuilddag | |
93 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
93 | date: Thu Jan 01 00:00:07 1970 +0000 | |
94 | summary: r7 |
|
94 | summary: r7 | |
95 |
|
95 | |||
96 | $ hg status --all -R share-parent |
|
96 | $ hg status --all -R share-parent | |
97 | C nf0 |
|
97 | C nf0 | |
98 | C nf1 |
|
98 | C nf1 | |
99 | C nf2 |
|
99 | C nf2 | |
100 | C nf3 |
|
100 | C nf3 | |
101 | C nf4 |
|
101 | C nf4 | |
102 | C nf5 |
|
102 | C nf5 | |
103 | C nf6 |
|
103 | C nf6 | |
104 | C nf7 |
|
104 | C nf7 | |
105 | C nf8 |
|
105 | C nf8 | |
106 | C nf9 |
|
106 | C nf9 | |
107 | $ hg log -l 3 -R share-parent |
|
107 | $ hg log -l 3 -R share-parent | |
108 | changeset: 9:0059eb38e4a4 |
|
108 | changeset: 9:0059eb38e4a4 | |
109 | tag: tip |
|
109 | tag: tip | |
110 | user: debugbuilddag |
|
110 | user: debugbuilddag | |
111 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
111 | date: Thu Jan 01 00:00:09 1970 +0000 | |
112 | summary: r9 |
|
112 | summary: r9 | |
113 |
|
113 | |||
114 | changeset: 8:4d5be70c8130 |
|
114 | changeset: 8:4d5be70c8130 | |
115 | user: debugbuilddag |
|
115 | user: debugbuilddag | |
116 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
116 | date: Thu Jan 01 00:00:08 1970 +0000 | |
117 | summary: r8 |
|
117 | summary: r8 | |
118 |
|
118 | |||
119 | changeset: 7:e60bfe72517e |
|
119 | changeset: 7:e60bfe72517e | |
120 | user: debugbuilddag |
|
120 | user: debugbuilddag | |
121 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:07 1970 +0000 | |
122 | summary: r7 |
|
122 | summary: r7 | |
123 |
|
123 | |||
124 |
|
124 | |||
125 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run |
|
125 | $ hg -R share-child debugupgraderepo --config format.use-dirstate-v2=no --quiet --run | |
126 | upgrade will perform the following actions: |
|
126 | upgrade will perform the following actions: | |
127 |
|
127 | |||
128 | requirements |
|
128 | requirements | |
129 | preserved: * (glob) |
|
129 | preserved: * (glob) | |
130 | removed: dirstate-v2 |
|
130 | removed: dirstate-v2 | |
131 |
|
131 | |||
132 | no revlogs to process |
|
132 | no revlogs to process | |
133 |
|
133 | |||
134 | $ hg debugformat -R share-child | grep dirstate-v2 |
|
134 | $ hg debugformat -R share-child | grep dirstate-v2 | |
135 | dirstate-v2: no |
|
135 | dirstate-v2: no | |
136 | $ hg debugformat -R share-parent | grep dirstate-v2 |
|
136 | $ hg debugformat -R share-parent | grep dirstate-v2 | |
137 | dirstate-v2: no |
|
137 | dirstate-v2: no | |
138 | $ hg status --all -R share-child |
|
138 | $ hg status --all -R share-child | |
139 | C nf0 |
|
139 | C nf0 | |
140 | C nf1 |
|
140 | C nf1 | |
141 | C nf2 |
|
141 | C nf2 | |
142 | C nf3 |
|
142 | C nf3 | |
143 | C nf4 |
|
143 | C nf4 | |
144 | C nf5 |
|
144 | C nf5 | |
145 | C nf6 |
|
145 | C nf6 | |
146 | C nf7 |
|
146 | C nf7 | |
147 | C nf8 |
|
147 | C nf8 | |
148 | C nf9 |
|
148 | C nf9 | |
149 | $ hg log -l 3 -R share-child |
|
149 | $ hg log -l 3 -R share-child | |
150 | changeset: 9:0059eb38e4a4 |
|
150 | changeset: 9:0059eb38e4a4 | |
151 | tag: tip |
|
151 | tag: tip | |
152 | user: debugbuilddag |
|
152 | user: debugbuilddag | |
153 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
153 | date: Thu Jan 01 00:00:09 1970 +0000 | |
154 | summary: r9 |
|
154 | summary: r9 | |
155 |
|
155 | |||
156 | changeset: 8:4d5be70c8130 |
|
156 | changeset: 8:4d5be70c8130 | |
157 | user: debugbuilddag |
|
157 | user: debugbuilddag | |
158 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
158 | date: Thu Jan 01 00:00:08 1970 +0000 | |
159 | summary: r8 |
|
159 | summary: r8 | |
160 |
|
160 | |||
161 | changeset: 7:e60bfe72517e |
|
161 | changeset: 7:e60bfe72517e | |
162 | user: debugbuilddag |
|
162 | user: debugbuilddag | |
163 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
163 | date: Thu Jan 01 00:00:07 1970 +0000 | |
164 | summary: r7 |
|
164 | summary: r7 | |
165 |
|
165 | |||
166 | $ hg status --all -R share-parent |
|
166 | $ hg status --all -R share-parent | |
167 | C nf0 |
|
167 | C nf0 | |
168 | C nf1 |
|
168 | C nf1 | |
169 | C nf2 |
|
169 | C nf2 | |
170 | C nf3 |
|
170 | C nf3 | |
171 | C nf4 |
|
171 | C nf4 | |
172 | C nf5 |
|
172 | C nf5 | |
173 | C nf6 |
|
173 | C nf6 | |
174 | C nf7 |
|
174 | C nf7 | |
175 | C nf8 |
|
175 | C nf8 | |
176 | C nf9 |
|
176 | C nf9 | |
177 | $ hg log -l 3 -R share-parent |
|
177 | $ hg log -l 3 -R share-parent | |
178 | changeset: 9:0059eb38e4a4 |
|
178 | changeset: 9:0059eb38e4a4 | |
179 | tag: tip |
|
179 | tag: tip | |
180 | user: debugbuilddag |
|
180 | user: debugbuilddag | |
181 | date: Thu Jan 01 00:00:09 1970 +0000 |
|
181 | date: Thu Jan 01 00:00:09 1970 +0000 | |
182 | summary: r9 |
|
182 | summary: r9 | |
183 |
|
183 | |||
184 | changeset: 8:4d5be70c8130 |
|
184 | changeset: 8:4d5be70c8130 | |
185 | user: debugbuilddag |
|
185 | user: debugbuilddag | |
186 | date: Thu Jan 01 00:00:08 1970 +0000 |
|
186 | date: Thu Jan 01 00:00:08 1970 +0000 | |
187 | summary: r8 |
|
187 | summary: r8 | |
188 |
|
188 | |||
189 | changeset: 7:e60bfe72517e |
|
189 | changeset: 7:e60bfe72517e | |
190 | user: debugbuilddag |
|
190 | user: debugbuilddag | |
191 | date: Thu Jan 01 00:00:07 1970 +0000 |
|
191 | date: Thu Jan 01 00:00:07 1970 +0000 | |
192 | summary: r7 |
|
192 | summary: r7 | |
193 |
|
193 | |||
194 |
|
194 | |||
195 |
Do not yet support |
|
195 | Do not yet support downgrading treemanifest repos | |
196 |
|
196 | |||
197 | $ hg --config experimental.treemanifest=true init treemanifest |
|
197 | $ hg --config experimental.treemanifest=true init treemanifest | |
198 | $ hg -R treemanifest debugupgraderepo |
|
198 | $ hg -R treemanifest debugupgraderepo | |
199 |
abort: cannot upgrade repository; |
|
199 | abort: cannot upgrade repository; requirement would be removed: treemanifest | |
200 | [255] |
|
200 | [255] | |
201 |
|
201 | |||
202 | Cannot add treemanifest requirement during upgrade |
|
202 | Cannot add treemanifest requirement during upgrade | |
203 |
|
203 | |||
204 | $ hg init disallowaddedreq |
|
204 | $ hg init disallowaddedreq | |
205 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo |
|
205 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo | |
206 | abort: cannot upgrade repository; do not support adding requirement: treemanifest |
|
206 | abort: cannot upgrade repository; do not support adding requirement: treemanifest | |
207 | [255] |
|
207 | [255] | |
208 |
|
208 | |||
209 | An upgrade of a repository created with recommended settings only suggests optimizations |
|
209 | An upgrade of a repository created with recommended settings only suggests optimizations | |
210 |
|
210 | |||
211 | $ hg init empty |
|
211 | $ hg init empty | |
212 | $ cd empty |
|
212 | $ cd empty | |
213 | $ hg debugformat |
|
213 | $ hg debugformat | |
214 | format-variant repo |
|
214 | format-variant repo | |
215 | fncache: yes |
|
215 | fncache: yes | |
216 | dirstate-v2: no |
|
216 | dirstate-v2: no | |
217 | tracked-hint: no |
|
217 | tracked-hint: no | |
218 | dotencode: yes |
|
218 | dotencode: yes | |
219 | generaldelta: yes |
|
219 | generaldelta: yes | |
220 | share-safe: yes |
|
220 | share-safe: yes | |
221 | sparserevlog: yes |
|
221 | sparserevlog: yes | |
222 | persistent-nodemap: no (no-rust !) |
|
222 | persistent-nodemap: no (no-rust !) | |
223 | persistent-nodemap: yes (rust !) |
|
223 | persistent-nodemap: yes (rust !) | |
224 | copies-sdc: no |
|
224 | copies-sdc: no | |
225 | revlog-v2: no |
|
225 | revlog-v2: no | |
226 | changelog-v2: no |
|
226 | changelog-v2: no | |
227 | plain-cl-delta: yes |
|
227 | plain-cl-delta: yes | |
228 | compression: zlib |
|
228 | compression: zlib | |
229 | compression-level: default |
|
229 | compression-level: default | |
230 | $ hg debugformat --verbose |
|
230 | $ hg debugformat --verbose | |
231 | format-variant repo config default |
|
231 | format-variant repo config default | |
232 | fncache: yes yes yes |
|
232 | fncache: yes yes yes | |
233 | dirstate-v2: no no no |
|
233 | dirstate-v2: no no no | |
234 | tracked-hint: no no no |
|
234 | tracked-hint: no no no | |
235 | dotencode: yes yes yes |
|
235 | dotencode: yes yes yes | |
236 | generaldelta: yes yes yes |
|
236 | generaldelta: yes yes yes | |
237 | share-safe: yes yes yes |
|
237 | share-safe: yes yes yes | |
238 | sparserevlog: yes yes yes |
|
238 | sparserevlog: yes yes yes | |
239 | persistent-nodemap: no no no (no-rust !) |
|
239 | persistent-nodemap: no no no (no-rust !) | |
240 | persistent-nodemap: yes yes no (rust !) |
|
240 | persistent-nodemap: yes yes no (rust !) | |
241 | copies-sdc: no no no |
|
241 | copies-sdc: no no no | |
242 | revlog-v2: no no no |
|
242 | revlog-v2: no no no | |
243 | changelog-v2: no no no |
|
243 | changelog-v2: no no no | |
244 | plain-cl-delta: yes yes yes |
|
244 | plain-cl-delta: yes yes yes | |
245 | compression: zlib zlib zlib (no-zstd !) |
|
245 | compression: zlib zlib zlib (no-zstd !) | |
246 | compression: zlib zlib zstd (zstd !) |
|
246 | compression: zlib zlib zstd (zstd !) | |
247 | compression-level: default default default |
|
247 | compression-level: default default default | |
248 | $ hg debugformat --verbose --config format.usefncache=no |
|
248 | $ hg debugformat --verbose --config format.usefncache=no | |
249 | format-variant repo config default |
|
249 | format-variant repo config default | |
250 | fncache: yes no yes |
|
250 | fncache: yes no yes | |
251 | dirstate-v2: no no no |
|
251 | dirstate-v2: no no no | |
252 | tracked-hint: no no no |
|
252 | tracked-hint: no no no | |
253 | dotencode: yes no yes |
|
253 | dotencode: yes no yes | |
254 | generaldelta: yes yes yes |
|
254 | generaldelta: yes yes yes | |
255 | share-safe: yes yes yes |
|
255 | share-safe: yes yes yes | |
256 | sparserevlog: yes yes yes |
|
256 | sparserevlog: yes yes yes | |
257 | persistent-nodemap: no no no (no-rust !) |
|
257 | persistent-nodemap: no no no (no-rust !) | |
258 | persistent-nodemap: yes yes no (rust !) |
|
258 | persistent-nodemap: yes yes no (rust !) | |
259 | copies-sdc: no no no |
|
259 | copies-sdc: no no no | |
260 | revlog-v2: no no no |
|
260 | revlog-v2: no no no | |
261 | changelog-v2: no no no |
|
261 | changelog-v2: no no no | |
262 | plain-cl-delta: yes yes yes |
|
262 | plain-cl-delta: yes yes yes | |
263 | compression: zlib zlib zlib (no-zstd !) |
|
263 | compression: zlib zlib zlib (no-zstd !) | |
264 | compression: zlib zlib zstd (zstd !) |
|
264 | compression: zlib zlib zstd (zstd !) | |
265 | compression-level: default default default |
|
265 | compression-level: default default default | |
266 | $ hg debugformat --verbose --config format.usefncache=no --color=debug |
|
266 | $ hg debugformat --verbose --config format.usefncache=no --color=debug | |
267 | format-variant repo config default |
|
267 | format-variant repo config default | |
268 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] |
|
268 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | |
269 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
269 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
270 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
270 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
271 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] |
|
271 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] | |
272 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
272 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
273 | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
273 | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
274 | [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
274 | [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
275 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) |
|
275 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) | |
276 | [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !) |
|
276 | [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !) | |
277 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
277 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
278 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
278 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
279 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
279 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
280 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
280 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
281 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) |
|
281 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) | |
282 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) |
|
282 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) | |
283 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] |
|
283 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | |
284 | $ hg debugformat -Tjson |
|
284 | $ hg debugformat -Tjson | |
285 | [ |
|
285 | [ | |
286 | { |
|
286 | { | |
287 | "config": true, |
|
287 | "config": true, | |
288 | "default": true, |
|
288 | "default": true, | |
289 | "name": "fncache", |
|
289 | "name": "fncache", | |
290 | "repo": true |
|
290 | "repo": true | |
291 | }, |
|
291 | }, | |
292 | { |
|
292 | { | |
293 | "config": false, |
|
293 | "config": false, | |
294 | "default": false, |
|
294 | "default": false, | |
295 | "name": "dirstate-v2", |
|
295 | "name": "dirstate-v2", | |
296 | "repo": false |
|
296 | "repo": false | |
297 | }, |
|
297 | }, | |
298 | { |
|
298 | { | |
299 | "config": false, |
|
299 | "config": false, | |
300 | "default": false, |
|
300 | "default": false, | |
301 | "name": "tracked-hint", |
|
301 | "name": "tracked-hint", | |
302 | "repo": false |
|
302 | "repo": false | |
303 | }, |
|
303 | }, | |
304 | { |
|
304 | { | |
305 | "config": true, |
|
305 | "config": true, | |
306 | "default": true, |
|
306 | "default": true, | |
307 | "name": "dotencode", |
|
307 | "name": "dotencode", | |
308 | "repo": true |
|
308 | "repo": true | |
309 | }, |
|
309 | }, | |
310 | { |
|
310 | { | |
311 | "config": true, |
|
311 | "config": true, | |
312 | "default": true, |
|
312 | "default": true, | |
313 | "name": "generaldelta", |
|
313 | "name": "generaldelta", | |
314 | "repo": true |
|
314 | "repo": true | |
315 | }, |
|
315 | }, | |
316 | { |
|
316 | { | |
317 | "config": true, |
|
317 | "config": true, | |
318 | "default": true, |
|
318 | "default": true, | |
319 | "name": "share-safe", |
|
319 | "name": "share-safe", | |
320 | "repo": true |
|
320 | "repo": true | |
321 | }, |
|
321 | }, | |
322 | { |
|
322 | { | |
323 | "config": true, |
|
323 | "config": true, | |
324 | "default": true, |
|
324 | "default": true, | |
325 | "name": "sparserevlog", |
|
325 | "name": "sparserevlog", | |
326 | "repo": true |
|
326 | "repo": true | |
327 | }, |
|
327 | }, | |
328 | { |
|
328 | { | |
329 | "config": false, (no-rust !) |
|
329 | "config": false, (no-rust !) | |
330 | "config": true, (rust !) |
|
330 | "config": true, (rust !) | |
331 | "default": false, |
|
331 | "default": false, | |
332 | "name": "persistent-nodemap", |
|
332 | "name": "persistent-nodemap", | |
333 | "repo": false (no-rust !) |
|
333 | "repo": false (no-rust !) | |
334 | "repo": true (rust !) |
|
334 | "repo": true (rust !) | |
335 | }, |
|
335 | }, | |
336 | { |
|
336 | { | |
337 | "config": false, |
|
337 | "config": false, | |
338 | "default": false, |
|
338 | "default": false, | |
339 | "name": "copies-sdc", |
|
339 | "name": "copies-sdc", | |
340 | "repo": false |
|
340 | "repo": false | |
341 | }, |
|
341 | }, | |
342 | { |
|
342 | { | |
343 | "config": false, |
|
343 | "config": false, | |
344 | "default": false, |
|
344 | "default": false, | |
345 | "name": "revlog-v2", |
|
345 | "name": "revlog-v2", | |
346 | "repo": false |
|
346 | "repo": false | |
347 | }, |
|
347 | }, | |
348 | { |
|
348 | { | |
349 | "config": false, |
|
349 | "config": false, | |
350 | "default": false, |
|
350 | "default": false, | |
351 | "name": "changelog-v2", |
|
351 | "name": "changelog-v2", | |
352 | "repo": false |
|
352 | "repo": false | |
353 | }, |
|
353 | }, | |
354 | { |
|
354 | { | |
355 | "config": true, |
|
355 | "config": true, | |
356 | "default": true, |
|
356 | "default": true, | |
357 | "name": "plain-cl-delta", |
|
357 | "name": "plain-cl-delta", | |
358 | "repo": true |
|
358 | "repo": true | |
359 | }, |
|
359 | }, | |
360 | { |
|
360 | { | |
361 | "config": "zlib", |
|
361 | "config": "zlib", | |
362 | "default": "zlib", (no-zstd !) |
|
362 | "default": "zlib", (no-zstd !) | |
363 | "default": "zstd", (zstd !) |
|
363 | "default": "zstd", (zstd !) | |
364 | "name": "compression", |
|
364 | "name": "compression", | |
365 | "repo": "zlib" |
|
365 | "repo": "zlib" | |
366 | }, |
|
366 | }, | |
367 | { |
|
367 | { | |
368 | "config": "default", |
|
368 | "config": "default", | |
369 | "default": "default", |
|
369 | "default": "default", | |
370 | "name": "compression-level", |
|
370 | "name": "compression-level", | |
371 | "repo": "default" |
|
371 | "repo": "default" | |
372 | } |
|
372 | } | |
373 | ] |
|
373 | ] | |
374 | $ hg debugupgraderepo |
|
374 | $ hg debugupgraderepo | |
375 | (no format upgrades found in existing repository) |
|
375 | (no format upgrades found in existing repository) | |
376 | performing an upgrade with "--run" will make the following changes: |
|
376 | performing an upgrade with "--run" will make the following changes: | |
377 |
|
377 | |||
378 | requirements |
|
378 | requirements | |
379 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
379 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
380 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
380 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
381 |
|
381 | |||
382 | no revlogs to process |
|
382 | no revlogs to process | |
383 |
|
383 | |||
384 | additional optimizations are available by specifying "--optimize <name>": |
|
384 | additional optimizations are available by specifying "--optimize <name>": | |
385 |
|
385 | |||
386 | re-delta-parent |
|
386 | re-delta-parent | |
387 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
387 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
388 |
|
388 | |||
389 | re-delta-multibase |
|
389 | re-delta-multibase | |
390 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
390 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
391 |
|
391 | |||
392 | re-delta-all |
|
392 | re-delta-all | |
393 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
393 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
394 |
|
394 | |||
395 | re-delta-fulladd |
|
395 | re-delta-fulladd | |
396 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
396 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
397 |
|
397 | |||
398 |
|
398 | |||
399 | $ hg debugupgraderepo --quiet |
|
399 | $ hg debugupgraderepo --quiet | |
400 | requirements |
|
400 | requirements | |
401 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
401 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
402 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
402 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
403 |
|
403 | |||
404 | no revlogs to process |
|
404 | no revlogs to process | |
405 |
|
405 | |||
406 |
|
406 | |||
407 | --optimize can be used to add optimizations |
|
407 | --optimize can be used to add optimizations | |
408 |
|
408 | |||
409 | $ hg debugupgrade --optimize 're-delta-parent' |
|
409 | $ hg debugupgrade --optimize 're-delta-parent' | |
410 | (no format upgrades found in existing repository) |
|
410 | (no format upgrades found in existing repository) | |
411 | performing an upgrade with "--run" will make the following changes: |
|
411 | performing an upgrade with "--run" will make the following changes: | |
412 |
|
412 | |||
413 | requirements |
|
413 | requirements | |
414 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
414 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
415 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
415 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
416 |
|
416 | |||
417 | optimisations: re-delta-parent |
|
417 | optimisations: re-delta-parent | |
418 |
|
418 | |||
419 | re-delta-parent |
|
419 | re-delta-parent | |
420 | deltas within internal storage will choose a new base revision if needed |
|
420 | deltas within internal storage will choose a new base revision if needed | |
421 |
|
421 | |||
422 | processed revlogs: |
|
422 | processed revlogs: | |
423 | - all-filelogs |
|
423 | - all-filelogs | |
424 | - changelog |
|
424 | - changelog | |
425 | - manifest |
|
425 | - manifest | |
426 |
|
426 | |||
427 | additional optimizations are available by specifying "--optimize <name>": |
|
427 | additional optimizations are available by specifying "--optimize <name>": | |
428 |
|
428 | |||
429 | re-delta-multibase |
|
429 | re-delta-multibase | |
430 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
430 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
431 |
|
431 | |||
432 | re-delta-all |
|
432 | re-delta-all | |
433 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
433 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
434 |
|
434 | |||
435 | re-delta-fulladd |
|
435 | re-delta-fulladd | |
436 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
436 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
437 |
|
437 | |||
438 |
|
438 | |||
439 | modern form of the option |
|
439 | modern form of the option | |
440 |
|
440 | |||
441 | $ hg debugupgrade --optimize re-delta-parent |
|
441 | $ hg debugupgrade --optimize re-delta-parent | |
442 | (no format upgrades found in existing repository) |
|
442 | (no format upgrades found in existing repository) | |
443 | performing an upgrade with "--run" will make the following changes: |
|
443 | performing an upgrade with "--run" will make the following changes: | |
444 |
|
444 | |||
445 | requirements |
|
445 | requirements | |
446 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
446 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
447 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
447 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
448 |
|
448 | |||
449 | optimisations: re-delta-parent |
|
449 | optimisations: re-delta-parent | |
450 |
|
450 | |||
451 | re-delta-parent |
|
451 | re-delta-parent | |
452 | deltas within internal storage will choose a new base revision if needed |
|
452 | deltas within internal storage will choose a new base revision if needed | |
453 |
|
453 | |||
454 | processed revlogs: |
|
454 | processed revlogs: | |
455 | - all-filelogs |
|
455 | - all-filelogs | |
456 | - changelog |
|
456 | - changelog | |
457 | - manifest |
|
457 | - manifest | |
458 |
|
458 | |||
459 | additional optimizations are available by specifying "--optimize <name>": |
|
459 | additional optimizations are available by specifying "--optimize <name>": | |
460 |
|
460 | |||
461 | re-delta-multibase |
|
461 | re-delta-multibase | |
462 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
462 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
463 |
|
463 | |||
464 | re-delta-all |
|
464 | re-delta-all | |
465 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
465 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
466 |
|
466 | |||
467 | re-delta-fulladd |
|
467 | re-delta-fulladd | |
468 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
468 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
469 |
|
469 | |||
470 |
|
470 | |||
471 | $ hg debugupgrade --optimize re-delta-parent --quiet |
|
471 | $ hg debugupgrade --optimize re-delta-parent --quiet | |
472 | requirements |
|
472 | requirements | |
473 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
473 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
474 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
474 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
475 |
|
475 | |||
476 | optimisations: re-delta-parent |
|
476 | optimisations: re-delta-parent | |
477 |
|
477 | |||
478 | processed revlogs: |
|
478 | processed revlogs: | |
479 | - all-filelogs |
|
479 | - all-filelogs | |
480 | - changelog |
|
480 | - changelog | |
481 | - manifest |
|
481 | - manifest | |
482 |
|
482 | |||
483 |
|
483 | |||
484 | passing multiple optimization: |
|
484 | passing multiple optimization: | |
485 |
|
485 | |||
486 | $ hg debugupgrade --optimize re-delta-parent --optimize re-delta-multibase --quiet |
|
486 | $ hg debugupgrade --optimize re-delta-parent --optimize re-delta-multibase --quiet | |
487 | requirements |
|
487 | requirements | |
488 | preserved: * (glob) |
|
488 | preserved: * (glob) | |
489 |
|
489 | |||
490 | optimisations: re-delta-multibase, re-delta-parent |
|
490 | optimisations: re-delta-multibase, re-delta-parent | |
491 |
|
491 | |||
492 | processed revlogs: |
|
492 | processed revlogs: | |
493 | - all-filelogs |
|
493 | - all-filelogs | |
494 | - changelog |
|
494 | - changelog | |
495 | - manifest |
|
495 | - manifest | |
496 |
|
496 | |||
497 |
|
497 | |||
498 | unknown optimization: |
|
498 | unknown optimization: | |
499 |
|
499 | |||
500 | $ hg debugupgrade --optimize foobar |
|
500 | $ hg debugupgrade --optimize foobar | |
501 | abort: unknown optimization action requested: foobar |
|
501 | abort: unknown optimization action requested: foobar | |
502 | (run without arguments to see valid optimizations) |
|
502 | (run without arguments to see valid optimizations) | |
503 | [255] |
|
503 | [255] | |
504 |
|
504 | |||
505 | Various sub-optimal detections work |
|
505 | Various sub-optimal detections work | |
506 |
|
506 | |||
507 | $ cat > .hg/requires << EOF |
|
507 | $ cat > .hg/requires << EOF | |
508 | > revlogv1 |
|
508 | > revlogv1 | |
509 | > store |
|
509 | > store | |
510 | > EOF |
|
510 | > EOF | |
511 |
|
511 | |||
512 | $ hg debugformat |
|
512 | $ hg debugformat | |
513 | format-variant repo |
|
513 | format-variant repo | |
514 | fncache: no |
|
514 | fncache: no | |
515 | dirstate-v2: no |
|
515 | dirstate-v2: no | |
516 | tracked-hint: no |
|
516 | tracked-hint: no | |
517 | dotencode: no |
|
517 | dotencode: no | |
518 | generaldelta: no |
|
518 | generaldelta: no | |
519 | share-safe: no |
|
519 | share-safe: no | |
520 | sparserevlog: no |
|
520 | sparserevlog: no | |
521 | persistent-nodemap: no |
|
521 | persistent-nodemap: no | |
522 | copies-sdc: no |
|
522 | copies-sdc: no | |
523 | revlog-v2: no |
|
523 | revlog-v2: no | |
524 | changelog-v2: no |
|
524 | changelog-v2: no | |
525 | plain-cl-delta: yes |
|
525 | plain-cl-delta: yes | |
526 | compression: zlib |
|
526 | compression: zlib | |
527 | compression-level: default |
|
527 | compression-level: default | |
528 | $ hg debugformat --verbose |
|
528 | $ hg debugformat --verbose | |
529 | format-variant repo config default |
|
529 | format-variant repo config default | |
530 | fncache: no yes yes |
|
530 | fncache: no yes yes | |
531 | dirstate-v2: no no no |
|
531 | dirstate-v2: no no no | |
532 | tracked-hint: no no no |
|
532 | tracked-hint: no no no | |
533 | dotencode: no yes yes |
|
533 | dotencode: no yes yes | |
534 | generaldelta: no yes yes |
|
534 | generaldelta: no yes yes | |
535 | share-safe: no yes yes |
|
535 | share-safe: no yes yes | |
536 | sparserevlog: no yes yes |
|
536 | sparserevlog: no yes yes | |
537 | persistent-nodemap: no no no (no-rust !) |
|
537 | persistent-nodemap: no no no (no-rust !) | |
538 | persistent-nodemap: no yes no (rust !) |
|
538 | persistent-nodemap: no yes no (rust !) | |
539 | copies-sdc: no no no |
|
539 | copies-sdc: no no no | |
540 | revlog-v2: no no no |
|
540 | revlog-v2: no no no | |
541 | changelog-v2: no no no |
|
541 | changelog-v2: no no no | |
542 | plain-cl-delta: yes yes yes |
|
542 | plain-cl-delta: yes yes yes | |
543 | compression: zlib zlib zlib (no-zstd !) |
|
543 | compression: zlib zlib zlib (no-zstd !) | |
544 | compression: zlib zlib zstd (zstd !) |
|
544 | compression: zlib zlib zstd (zstd !) | |
545 | compression-level: default default default |
|
545 | compression-level: default default default | |
546 | $ hg debugformat --verbose --config format.usegeneraldelta=no |
|
546 | $ hg debugformat --verbose --config format.usegeneraldelta=no | |
547 | format-variant repo config default |
|
547 | format-variant repo config default | |
548 | fncache: no yes yes |
|
548 | fncache: no yes yes | |
549 | dirstate-v2: no no no |
|
549 | dirstate-v2: no no no | |
550 | tracked-hint: no no no |
|
550 | tracked-hint: no no no | |
551 | dotencode: no yes yes |
|
551 | dotencode: no yes yes | |
552 | generaldelta: no no yes |
|
552 | generaldelta: no no yes | |
553 | share-safe: no yes yes |
|
553 | share-safe: no yes yes | |
554 | sparserevlog: no no yes |
|
554 | sparserevlog: no no yes | |
555 | persistent-nodemap: no no no (no-rust !) |
|
555 | persistent-nodemap: no no no (no-rust !) | |
556 | persistent-nodemap: no yes no (rust !) |
|
556 | persistent-nodemap: no yes no (rust !) | |
557 | copies-sdc: no no no |
|
557 | copies-sdc: no no no | |
558 | revlog-v2: no no no |
|
558 | revlog-v2: no no no | |
559 | changelog-v2: no no no |
|
559 | changelog-v2: no no no | |
560 | plain-cl-delta: yes yes yes |
|
560 | plain-cl-delta: yes yes yes | |
561 | compression: zlib zlib zlib (no-zstd !) |
|
561 | compression: zlib zlib zlib (no-zstd !) | |
562 | compression: zlib zlib zstd (zstd !) |
|
562 | compression: zlib zlib zstd (zstd !) | |
563 | compression-level: default default default |
|
563 | compression-level: default default default | |
564 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug |
|
564 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug | |
565 | format-variant repo config default |
|
565 | format-variant repo config default | |
566 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
566 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
567 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
567 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
568 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
568 | [formatvariant.name.uptodate|tracked-hint: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
569 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
569 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
570 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
570 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | |
571 | [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
571 | [formatvariant.name.mismatchconfig|share-safe: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] | |
572 | [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
572 | [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] | |
573 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) |
|
573 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) | |
574 | [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !) |
|
574 | [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !) | |
575 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
575 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
576 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
576 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
577 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
577 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] | |
578 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
578 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] | |
579 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) |
|
579 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) | |
580 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) |
|
580 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) | |
581 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] |
|
581 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] | |
582 | $ hg debugupgraderepo |
|
582 | $ hg debugupgraderepo | |
583 | note: selecting all-filelogs for processing to change: dotencode |
|
583 | note: selecting all-filelogs for processing to change: dotencode | |
584 | note: selecting all-manifestlogs for processing to change: dotencode |
|
584 | note: selecting all-manifestlogs for processing to change: dotencode | |
585 | note: selecting changelog for processing to change: dotencode |
|
585 | note: selecting changelog for processing to change: dotencode | |
586 |
|
586 | |||
587 | repository lacks features recommended by current config options: |
|
587 | repository lacks features recommended by current config options: | |
588 |
|
588 | |||
589 | fncache |
|
589 | fncache | |
590 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
590 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
591 |
|
591 | |||
592 | dotencode |
|
592 | dotencode | |
593 | storage of filenames beginning with a period or space may not work correctly |
|
593 | storage of filenames beginning with a period or space may not work correctly | |
594 |
|
594 | |||
595 | generaldelta |
|
595 | generaldelta | |
596 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
596 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | |
597 |
|
597 | |||
598 | share-safe |
|
598 | share-safe | |
599 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. |
|
599 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. | |
600 |
|
600 | |||
601 | sparserevlog |
|
601 | sparserevlog | |
602 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. |
|
602 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. | |
603 |
|
603 | |||
604 | persistent-nodemap (rust !) |
|
604 | persistent-nodemap (rust !) | |
605 | persist the node -> rev mapping on disk to speedup lookup (rust !) |
|
605 | persist the node -> rev mapping on disk to speedup lookup (rust !) | |
606 | (rust !) |
|
606 | (rust !) | |
607 |
|
607 | |||
608 | performing an upgrade with "--run" will make the following changes: |
|
608 | performing an upgrade with "--run" will make the following changes: | |
609 |
|
609 | |||
610 | requirements |
|
610 | requirements | |
611 | preserved: revlogv1, store |
|
611 | preserved: revlogv1, store | |
612 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) |
|
612 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) | |
613 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) |
|
613 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) | |
614 |
|
614 | |||
615 | fncache |
|
615 | fncache | |
616 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
616 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
617 |
|
617 | |||
618 | dotencode |
|
618 | dotencode | |
619 | repository will be better able to store files beginning with a space or period |
|
619 | repository will be better able to store files beginning with a space or period | |
620 |
|
620 | |||
621 | generaldelta |
|
621 | generaldelta | |
622 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
622 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
623 |
|
623 | |||
624 | share-safe |
|
624 | share-safe | |
625 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. |
|
625 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | |
626 |
|
626 | |||
627 | sparserevlog |
|
627 | sparserevlog | |
628 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
628 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
629 |
|
629 | |||
630 | persistent-nodemap (rust !) |
|
630 | persistent-nodemap (rust !) | |
631 | Speedup revision lookup by node id. (rust !) |
|
631 | Speedup revision lookup by node id. (rust !) | |
632 | (rust !) |
|
632 | (rust !) | |
633 | processed revlogs: |
|
633 | processed revlogs: | |
634 | - all-filelogs |
|
634 | - all-filelogs | |
635 | - changelog |
|
635 | - changelog | |
636 | - manifest |
|
636 | - manifest | |
637 |
|
637 | |||
638 | additional optimizations are available by specifying "--optimize <name>": |
|
638 | additional optimizations are available by specifying "--optimize <name>": | |
639 |
|
639 | |||
640 | re-delta-parent |
|
640 | re-delta-parent | |
641 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
641 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
642 |
|
642 | |||
643 | re-delta-multibase |
|
643 | re-delta-multibase | |
644 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
644 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
645 |
|
645 | |||
646 | re-delta-all |
|
646 | re-delta-all | |
647 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
647 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
648 |
|
648 | |||
649 | re-delta-fulladd |
|
649 | re-delta-fulladd | |
650 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
650 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
651 |
|
651 | |||
652 | $ hg debugupgraderepo --quiet |
|
652 | $ hg debugupgraderepo --quiet | |
653 | requirements |
|
653 | requirements | |
654 | preserved: revlogv1, store |
|
654 | preserved: revlogv1, store | |
655 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) |
|
655 | added: dotencode, fncache, generaldelta, share-safe, sparserevlog (no-rust !) | |
656 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) |
|
656 | added: dotencode, fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) | |
657 |
|
657 | |||
658 | processed revlogs: |
|
658 | processed revlogs: | |
659 | - all-filelogs |
|
659 | - all-filelogs | |
660 | - changelog |
|
660 | - changelog | |
661 | - manifest |
|
661 | - manifest | |
662 |
|
662 | |||
663 |
|
663 | |||
664 | $ hg --config format.dotencode=false debugupgraderepo |
|
664 | $ hg --config format.dotencode=false debugupgraderepo | |
665 | note: selecting all-filelogs for processing to change: fncache |
|
665 | note: selecting all-filelogs for processing to change: fncache | |
666 | note: selecting all-manifestlogs for processing to change: fncache |
|
666 | note: selecting all-manifestlogs for processing to change: fncache | |
667 | note: selecting changelog for processing to change: fncache |
|
667 | note: selecting changelog for processing to change: fncache | |
668 |
|
668 | |||
669 | repository lacks features recommended by current config options: |
|
669 | repository lacks features recommended by current config options: | |
670 |
|
670 | |||
671 | fncache |
|
671 | fncache | |
672 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
672 | long and reserved filenames may not work correctly; repository performance is sub-optimal | |
673 |
|
673 | |||
674 | generaldelta |
|
674 | generaldelta | |
675 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
675 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower | |
676 |
|
676 | |||
677 | share-safe |
|
677 | share-safe | |
678 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. |
|
678 | old shared repositories do not share source repository requirements and config. This leads to various problems when the source repository format is upgraded or some new extensions are enabled. | |
679 |
|
679 | |||
680 | sparserevlog |
|
680 | sparserevlog | |
681 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. |
|
681 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. | |
682 |
|
682 | |||
683 | persistent-nodemap (rust !) |
|
683 | persistent-nodemap (rust !) | |
684 | persist the node -> rev mapping on disk to speedup lookup (rust !) |
|
684 | persist the node -> rev mapping on disk to speedup lookup (rust !) | |
685 | (rust !) |
|
685 | (rust !) | |
686 | repository lacks features used by the default config options: |
|
686 | repository lacks features used by the default config options: | |
687 |
|
687 | |||
688 | dotencode |
|
688 | dotencode | |
689 | storage of filenames beginning with a period or space may not work correctly |
|
689 | storage of filenames beginning with a period or space may not work correctly | |
690 |
|
690 | |||
691 |
|
691 | |||
692 | performing an upgrade with "--run" will make the following changes: |
|
692 | performing an upgrade with "--run" will make the following changes: | |
693 |
|
693 | |||
694 | requirements |
|
694 | requirements | |
695 | preserved: revlogv1, store |
|
695 | preserved: revlogv1, store | |
696 | added: fncache, generaldelta, share-safe, sparserevlog (no-rust !) |
|
696 | added: fncache, generaldelta, share-safe, sparserevlog (no-rust !) | |
697 | added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) |
|
697 | added: fncache, generaldelta, persistent-nodemap, share-safe, sparserevlog (rust !) | |
698 |
|
698 | |||
699 | fncache |
|
699 | fncache | |
700 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
700 | repository will be more resilient to storing certain paths and performance of certain operations should be improved | |
701 |
|
701 | |||
702 | generaldelta |
|
702 | generaldelta | |
703 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
703 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
704 |
|
704 | |||
705 | share-safe |
|
705 | share-safe | |
706 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. |
|
706 | Upgrades a repository to share-safe format so that future shares of this repository share its requirements and configs. | |
707 |
|
707 | |||
708 | sparserevlog |
|
708 | sparserevlog | |
709 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
709 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
710 |
|
710 | |||
711 | persistent-nodemap (rust !) |
|
711 | persistent-nodemap (rust !) | |
712 | Speedup revision lookup by node id. (rust !) |
|
712 | Speedup revision lookup by node id. (rust !) | |
713 | (rust !) |
|
713 | (rust !) | |
714 | processed revlogs: |
|
714 | processed revlogs: | |
715 | - all-filelogs |
|
715 | - all-filelogs | |
716 | - changelog |
|
716 | - changelog | |
717 | - manifest |
|
717 | - manifest | |
718 |
|
718 | |||
719 | additional optimizations are available by specifying "--optimize <name>": |
|
719 | additional optimizations are available by specifying "--optimize <name>": | |
720 |
|
720 | |||
721 | re-delta-parent |
|
721 | re-delta-parent | |
722 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
722 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower | |
723 |
|
723 | |||
724 | re-delta-multibase |
|
724 | re-delta-multibase | |
725 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
725 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges | |
726 |
|
726 | |||
727 | re-delta-all |
|
727 | re-delta-all | |
728 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
728 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed | |
729 |
|
729 | |||
730 | re-delta-fulladd |
|
730 | re-delta-fulladd | |
731 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
731 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. | |
732 |
|
732 | |||
733 |
|
733 | |||
734 | $ cd .. |
|
734 | $ cd .. | |
735 |
|
735 | |||
736 | Upgrading a repository that is already modern essentially no-ops |
|
736 | Upgrading a repository that is already modern essentially no-ops | |
737 |
|
737 | |||
738 | $ hg init modern |
|
738 | $ hg init modern | |
739 | $ hg -R modern debugupgraderepo --run |
|
739 | $ hg -R modern debugupgraderepo --run | |
740 | nothing to do |
|
740 | nothing to do | |
741 |
|
741 | |||
742 | Upgrading a repository to generaldelta works |
|
742 | Upgrading a repository to generaldelta works | |
743 |
|
743 | |||
744 | $ hg --config format.usegeneraldelta=false init upgradegd |
|
744 | $ hg --config format.usegeneraldelta=false init upgradegd | |
745 | $ cd upgradegd |
|
745 | $ cd upgradegd | |
746 | $ touch f0 |
|
746 | $ touch f0 | |
747 | $ hg -q commit -A -m initial |
|
747 | $ hg -q commit -A -m initial | |
748 | $ mkdir FooBarDirectory.d |
|
748 | $ mkdir FooBarDirectory.d | |
749 | $ touch FooBarDirectory.d/f1 |
|
749 | $ touch FooBarDirectory.d/f1 | |
750 | $ hg -q commit -A -m 'add f1' |
|
750 | $ hg -q commit -A -m 'add f1' | |
751 | $ hg -q up -r 0 |
|
751 | $ hg -q up -r 0 | |
752 | >>> import random |
|
752 | >>> import random | |
753 | >>> random.seed(0) # have a reproducible content |
|
753 | >>> random.seed(0) # have a reproducible content | |
754 | >>> with open("f2", "wb") as f: |
|
754 | >>> with open("f2", "wb") as f: | |
755 | ... for i in range(100000): |
|
755 | ... for i in range(100000): | |
756 | ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None |
|
756 | ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None | |
757 | $ hg -q commit -A -m 'add f2' |
|
757 | $ hg -q commit -A -m 'add f2' | |
758 |
|
758 | |||
759 | make sure we have a .d file |
|
759 | make sure we have a .d file | |
760 |
|
760 | |||
761 | $ ls -d .hg/store/data/* |
|
761 | $ ls -d .hg/store/data/* | |
762 | .hg/store/data/_foo_bar_directory.d.hg |
|
762 | .hg/store/data/_foo_bar_directory.d.hg | |
763 | .hg/store/data/f0.i |
|
763 | .hg/store/data/f0.i | |
764 | .hg/store/data/f2.d |
|
764 | .hg/store/data/f2.d | |
765 | .hg/store/data/f2.i |
|
765 | .hg/store/data/f2.i | |
766 |
|
766 | |||
767 | $ hg debugupgraderepo --run --config format.sparse-revlog=false |
|
767 | $ hg debugupgraderepo --run --config format.sparse-revlog=false | |
768 | note: selecting all-filelogs for processing to change: generaldelta |
|
768 | note: selecting all-filelogs for processing to change: generaldelta | |
769 | note: selecting all-manifestlogs for processing to change: generaldelta |
|
769 | note: selecting all-manifestlogs for processing to change: generaldelta | |
770 | note: selecting changelog for processing to change: generaldelta |
|
770 | note: selecting changelog for processing to change: generaldelta | |
771 |
|
771 | |||
772 | upgrade will perform the following actions: |
|
772 | upgrade will perform the following actions: | |
773 |
|
773 | |||
774 | requirements |
|
774 | requirements | |
775 | preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !) |
|
775 | preserved: dotencode, fncache, revlogv1, share-safe, store (no-rust !) | |
776 | preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
776 | preserved: dotencode, fncache, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
777 | added: generaldelta |
|
777 | added: generaldelta | |
778 |
|
778 | |||
779 | generaldelta |
|
779 | generaldelta | |
780 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
780 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster | |
781 |
|
781 | |||
782 | processed revlogs: |
|
782 | processed revlogs: | |
783 | - all-filelogs |
|
783 | - all-filelogs | |
784 | - changelog |
|
784 | - changelog | |
785 | - manifest |
|
785 | - manifest | |
786 |
|
786 | |||
787 | beginning upgrade... |
|
787 | beginning upgrade... | |
788 | repository locked and read-only |
|
788 | repository locked and read-only | |
789 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
789 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
790 | (it is safe to interrupt this process any time before data migration completes) |
|
790 | (it is safe to interrupt this process any time before data migration completes) | |
791 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
791 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
792 | migrating 519 KB in store; 1.05 MB tracked data |
|
792 | migrating 519 KB in store; 1.05 MB tracked data | |
793 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
793 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
794 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
794 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
795 | migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data) |
|
795 | migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data) | |
796 | finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes |
|
796 | finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes | |
797 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
797 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
798 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
798 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
799 | finished migrating 9 total revisions; total change in store size: -17 bytes |
|
799 | finished migrating 9 total revisions; total change in store size: -17 bytes | |
800 | copying phaseroots |
|
800 | copying phaseroots | |
801 | copying requires |
|
801 | copying requires | |
802 | data fully upgraded in a temporary repository |
|
802 | data fully upgraded in a temporary repository | |
803 | marking source repository as being upgraded; clients will be unable to read from repository |
|
803 | marking source repository as being upgraded; clients will be unable to read from repository | |
804 | starting in-place swap of repository data |
|
804 | starting in-place swap of repository data | |
805 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
805 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
806 | replacing store... |
|
806 | replacing store... | |
807 | store replacement complete; repository was inconsistent for *s (glob) |
|
807 | store replacement complete; repository was inconsistent for *s (glob) | |
808 | finalizing requirements file and making repository readable again |
|
808 | finalizing requirements file and making repository readable again | |
809 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
809 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
810 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
810 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) | |
811 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
811 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
812 |
|
812 | |||
813 | Original requirements backed up |
|
813 | Original requirements backed up | |
814 |
|
814 | |||
815 | $ cat .hg/upgradebackup.*/requires |
|
815 | $ cat .hg/upgradebackup.*/requires | |
816 | share-safe |
|
816 | share-safe | |
817 | $ cat .hg/upgradebackup.*/store/requires |
|
817 | $ cat .hg/upgradebackup.*/store/requires | |
818 | dotencode |
|
818 | dotencode | |
819 | fncache |
|
819 | fncache | |
820 | persistent-nodemap (rust !) |
|
820 | persistent-nodemap (rust !) | |
821 | revlogv1 |
|
821 | revlogv1 | |
822 | store |
|
822 | store | |
823 | upgradeinprogress |
|
823 | upgradeinprogress | |
824 |
|
824 | |||
825 | generaldelta added to original requirements files |
|
825 | generaldelta added to original requirements files | |
826 |
|
826 | |||
827 | $ hg debugrequires |
|
827 | $ hg debugrequires | |
828 | dotencode |
|
828 | dotencode | |
829 | fncache |
|
829 | fncache | |
830 | generaldelta |
|
830 | generaldelta | |
831 | persistent-nodemap (rust !) |
|
831 | persistent-nodemap (rust !) | |
832 | revlogv1 |
|
832 | revlogv1 | |
833 | share-safe |
|
833 | share-safe | |
834 | store |
|
834 | store | |
835 |
|
835 | |||
836 | store directory has files we expect |
|
836 | store directory has files we expect | |
837 |
|
837 | |||
838 | $ ls .hg/store |
|
838 | $ ls .hg/store | |
839 | 00changelog.i |
|
839 | 00changelog.i | |
840 | 00manifest.i |
|
840 | 00manifest.i | |
841 | data |
|
841 | data | |
842 | fncache |
|
842 | fncache | |
843 | phaseroots |
|
843 | phaseroots | |
844 | requires |
|
844 | requires | |
845 | undo |
|
845 | undo | |
846 | undo.backupfiles |
|
846 | undo.backupfiles | |
847 |
|
847 | |||
848 | manifest should be generaldelta |
|
848 | manifest should be generaldelta | |
849 |
|
849 | |||
850 | $ hg debugrevlog -m | grep flags |
|
850 | $ hg debugrevlog -m | grep flags | |
851 | flags : inline, generaldelta |
|
851 | flags : inline, generaldelta | |
852 |
|
852 | |||
853 | verify should be happy |
|
853 | verify should be happy | |
854 |
|
854 | |||
855 | $ hg verify -q |
|
855 | $ hg verify -q | |
856 |
|
856 | |||
857 | old store should be backed up |
|
857 | old store should be backed up | |
858 |
|
858 | |||
859 | $ ls -d .hg/upgradebackup.*/ |
|
859 | $ ls -d .hg/upgradebackup.*/ | |
860 | .hg/upgradebackup.*/ (glob) |
|
860 | .hg/upgradebackup.*/ (glob) | |
861 | $ ls .hg/upgradebackup.*/store |
|
861 | $ ls .hg/upgradebackup.*/store | |
862 | 00changelog.i |
|
862 | 00changelog.i | |
863 | 00manifest.i |
|
863 | 00manifest.i | |
864 | data |
|
864 | data | |
865 | fncache |
|
865 | fncache | |
866 | phaseroots |
|
866 | phaseroots | |
867 | requires |
|
867 | requires | |
868 | undo |
|
868 | undo | |
869 | undo.backup.fncache.bck |
|
869 | undo.backup.fncache.bck | |
870 | undo.backupfiles |
|
870 | undo.backupfiles | |
871 |
|
871 | |||
872 | unless --no-backup is passed |
|
872 | unless --no-backup is passed | |
873 |
|
873 | |||
874 | $ rm -rf .hg/upgradebackup.*/ |
|
874 | $ rm -rf .hg/upgradebackup.*/ | |
875 | $ hg debugupgraderepo --run --no-backup |
|
875 | $ hg debugupgraderepo --run --no-backup | |
876 | note: selecting all-filelogs for processing to change: sparserevlog |
|
876 | note: selecting all-filelogs for processing to change: sparserevlog | |
877 | note: selecting all-manifestlogs for processing to change: sparserevlog |
|
877 | note: selecting all-manifestlogs for processing to change: sparserevlog | |
878 | note: selecting changelog for processing to change: sparserevlog |
|
878 | note: selecting changelog for processing to change: sparserevlog | |
879 |
|
879 | |||
880 | upgrade will perform the following actions: |
|
880 | upgrade will perform the following actions: | |
881 |
|
881 | |||
882 | requirements |
|
882 | requirements | |
883 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
883 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
884 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
884 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
885 | added: sparserevlog |
|
885 | added: sparserevlog | |
886 |
|
886 | |||
887 | sparserevlog |
|
887 | sparserevlog | |
888 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
888 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
889 |
|
889 | |||
890 | processed revlogs: |
|
890 | processed revlogs: | |
891 | - all-filelogs |
|
891 | - all-filelogs | |
892 | - changelog |
|
892 | - changelog | |
893 | - manifest |
|
893 | - manifest | |
894 |
|
894 | |||
895 | beginning upgrade... |
|
895 | beginning upgrade... | |
896 | repository locked and read-only |
|
896 | repository locked and read-only | |
897 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
897 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
898 | (it is safe to interrupt this process any time before data migration completes) |
|
898 | (it is safe to interrupt this process any time before data migration completes) | |
899 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
899 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
900 | migrating 519 KB in store; 1.05 MB tracked data |
|
900 | migrating 519 KB in store; 1.05 MB tracked data | |
901 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
901 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
902 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
902 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
903 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
903 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
904 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
904 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
905 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
905 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
906 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
906 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
907 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
907 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
908 | copying phaseroots |
|
908 | copying phaseroots | |
909 | copying requires |
|
909 | copying requires | |
910 | data fully upgraded in a temporary repository |
|
910 | data fully upgraded in a temporary repository | |
911 | marking source repository as being upgraded; clients will be unable to read from repository |
|
911 | marking source repository as being upgraded; clients will be unable to read from repository | |
912 | starting in-place swap of repository data |
|
912 | starting in-place swap of repository data | |
913 | replacing store... |
|
913 | replacing store... | |
914 | store replacement complete; repository was inconsistent for * (glob) |
|
914 | store replacement complete; repository was inconsistent for * (glob) | |
915 | finalizing requirements file and making repository readable again |
|
915 | finalizing requirements file and making repository readable again | |
916 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
916 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
917 | $ ls -1 .hg/ | grep upgradebackup |
|
917 | $ ls -1 .hg/ | grep upgradebackup | |
918 | [1] |
|
918 | [1] | |
919 |
|
919 | |||
920 | We can restrict optimization to some revlog: |
|
920 | We can restrict optimization to some revlog: | |
921 |
|
921 | |||
922 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
922 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | |
923 | upgrade will perform the following actions: |
|
923 | upgrade will perform the following actions: | |
924 |
|
924 | |||
925 | requirements |
|
925 | requirements | |
926 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
926 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
927 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
927 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
928 |
|
928 | |||
929 | optimisations: re-delta-parent |
|
929 | optimisations: re-delta-parent | |
930 |
|
930 | |||
931 | re-delta-parent |
|
931 | re-delta-parent | |
932 | deltas within internal storage will choose a new base revision if needed |
|
932 | deltas within internal storage will choose a new base revision if needed | |
933 |
|
933 | |||
934 | processed revlogs: |
|
934 | processed revlogs: | |
935 | - manifest |
|
935 | - manifest | |
936 |
|
936 | |||
937 | beginning upgrade... |
|
937 | beginning upgrade... | |
938 | repository locked and read-only |
|
938 | repository locked and read-only | |
939 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
939 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
940 | (it is safe to interrupt this process any time before data migration completes) |
|
940 | (it is safe to interrupt this process any time before data migration completes) | |
941 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
941 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
942 | migrating 519 KB in store; 1.05 MB tracked data |
|
942 | migrating 519 KB in store; 1.05 MB tracked data | |
943 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
943 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
944 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions |
|
944 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions | |
945 | blindly copying data/f0.i containing 1 revisions |
|
945 | blindly copying data/f0.i containing 1 revisions | |
946 | blindly copying data/f2.i containing 1 revisions |
|
946 | blindly copying data/f2.i containing 1 revisions | |
947 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
947 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
948 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
948 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
949 | cloning 3 revisions from 00manifest.i |
|
949 | cloning 3 revisions from 00manifest.i | |
950 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
950 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
951 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
951 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
952 | blindly copying 00changelog.i containing 3 revisions |
|
952 | blindly copying 00changelog.i containing 3 revisions | |
953 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
953 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
954 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
954 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
955 | copying phaseroots |
|
955 | copying phaseroots | |
956 | copying requires |
|
956 | copying requires | |
957 | data fully upgraded in a temporary repository |
|
957 | data fully upgraded in a temporary repository | |
958 | marking source repository as being upgraded; clients will be unable to read from repository |
|
958 | marking source repository as being upgraded; clients will be unable to read from repository | |
959 | starting in-place swap of repository data |
|
959 | starting in-place swap of repository data | |
960 | replacing store... |
|
960 | replacing store... | |
961 | store replacement complete; repository was inconsistent for *s (glob) |
|
961 | store replacement complete; repository was inconsistent for *s (glob) | |
962 | finalizing requirements file and making repository readable again |
|
962 | finalizing requirements file and making repository readable again | |
963 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
963 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
964 |
|
964 | |||
965 | Check that the repo still works fine |
|
965 | Check that the repo still works fine | |
966 |
|
966 | |||
967 | $ hg log -G --stat |
|
967 | $ hg log -G --stat | |
968 | @ changeset: 2:fca376863211 |
|
968 | @ changeset: 2:fca376863211 | |
969 | | tag: tip |
|
969 | | tag: tip | |
970 | | parent: 0:ba592bf28da2 |
|
970 | | parent: 0:ba592bf28da2 | |
971 | | user: test |
|
971 | | user: test | |
972 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
972 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
973 | | summary: add f2 |
|
973 | | summary: add f2 | |
974 | | |
|
974 | | | |
975 | | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
975 | | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
976 | | 1 files changed, 100000 insertions(+), 0 deletions(-) |
|
976 | | 1 files changed, 100000 insertions(+), 0 deletions(-) | |
977 | | |
|
977 | | | |
978 | | o changeset: 1:2029ce2354e2 |
|
978 | | o changeset: 1:2029ce2354e2 | |
979 | |/ user: test |
|
979 | |/ user: test | |
980 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
980 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
981 | | summary: add f1 |
|
981 | | summary: add f1 | |
982 | | |
|
982 | | | |
983 | | |
|
983 | | | |
984 | o changeset: 0:ba592bf28da2 |
|
984 | o changeset: 0:ba592bf28da2 | |
985 | user: test |
|
985 | user: test | |
986 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
986 | date: Thu Jan 01 00:00:00 1970 +0000 | |
987 | summary: initial |
|
987 | summary: initial | |
988 |
|
988 | |||
989 |
|
989 | |||
990 |
|
990 | |||
991 | $ hg verify -q |
|
991 | $ hg verify -q | |
992 |
|
992 | |||
993 | Check we can select negatively |
|
993 | Check we can select negatively | |
994 |
|
994 | |||
995 | $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback |
|
995 | $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback | |
996 | upgrade will perform the following actions: |
|
996 | upgrade will perform the following actions: | |
997 |
|
997 | |||
998 | requirements |
|
998 | requirements | |
999 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
999 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1000 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1000 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1001 |
|
1001 | |||
1002 | optimisations: re-delta-parent |
|
1002 | optimisations: re-delta-parent | |
1003 |
|
1003 | |||
1004 | re-delta-parent |
|
1004 | re-delta-parent | |
1005 | deltas within internal storage will choose a new base revision if needed |
|
1005 | deltas within internal storage will choose a new base revision if needed | |
1006 |
|
1006 | |||
1007 | processed revlogs: |
|
1007 | processed revlogs: | |
1008 | - all-filelogs |
|
1008 | - all-filelogs | |
1009 | - changelog |
|
1009 | - changelog | |
1010 |
|
1010 | |||
1011 | beginning upgrade... |
|
1011 | beginning upgrade... | |
1012 | repository locked and read-only |
|
1012 | repository locked and read-only | |
1013 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1013 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1014 | (it is safe to interrupt this process any time before data migration completes) |
|
1014 | (it is safe to interrupt this process any time before data migration completes) | |
1015 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1015 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1016 | migrating 519 KB in store; 1.05 MB tracked data |
|
1016 | migrating 519 KB in store; 1.05 MB tracked data | |
1017 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1017 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1018 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1018 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1019 | cloning 1 revisions from data/f0.i |
|
1019 | cloning 1 revisions from data/f0.i | |
1020 | cloning 1 revisions from data/f2.i |
|
1020 | cloning 1 revisions from data/f2.i | |
1021 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1021 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1022 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1022 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1023 | blindly copying 00manifest.i containing 3 revisions |
|
1023 | blindly copying 00manifest.i containing 3 revisions | |
1024 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1024 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1025 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1025 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1026 | cloning 3 revisions from 00changelog.i |
|
1026 | cloning 3 revisions from 00changelog.i | |
1027 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1027 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1028 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1028 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1029 | copying phaseroots |
|
1029 | copying phaseroots | |
1030 | copying requires |
|
1030 | copying requires | |
1031 | data fully upgraded in a temporary repository |
|
1031 | data fully upgraded in a temporary repository | |
1032 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1032 | marking source repository as being upgraded; clients will be unable to read from repository | |
1033 | starting in-place swap of repository data |
|
1033 | starting in-place swap of repository data | |
1034 | replacing store... |
|
1034 | replacing store... | |
1035 | store replacement complete; repository was inconsistent for *s (glob) |
|
1035 | store replacement complete; repository was inconsistent for *s (glob) | |
1036 | finalizing requirements file and making repository readable again |
|
1036 | finalizing requirements file and making repository readable again | |
1037 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1037 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1038 | $ hg verify -q |
|
1038 | $ hg verify -q | |
1039 |
|
1039 | |||
1040 | Check that we can select changelog only |
|
1040 | Check that we can select changelog only | |
1041 |
|
1041 | |||
1042 | $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback |
|
1042 | $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback | |
1043 | upgrade will perform the following actions: |
|
1043 | upgrade will perform the following actions: | |
1044 |
|
1044 | |||
1045 | requirements |
|
1045 | requirements | |
1046 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1046 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1047 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1047 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1048 |
|
1048 | |||
1049 | optimisations: re-delta-parent |
|
1049 | optimisations: re-delta-parent | |
1050 |
|
1050 | |||
1051 | re-delta-parent |
|
1051 | re-delta-parent | |
1052 | deltas within internal storage will choose a new base revision if needed |
|
1052 | deltas within internal storage will choose a new base revision if needed | |
1053 |
|
1053 | |||
1054 | processed revlogs: |
|
1054 | processed revlogs: | |
1055 | - changelog |
|
1055 | - changelog | |
1056 |
|
1056 | |||
1057 | beginning upgrade... |
|
1057 | beginning upgrade... | |
1058 | repository locked and read-only |
|
1058 | repository locked and read-only | |
1059 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1059 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1060 | (it is safe to interrupt this process any time before data migration completes) |
|
1060 | (it is safe to interrupt this process any time before data migration completes) | |
1061 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1061 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1062 | migrating 519 KB in store; 1.05 MB tracked data |
|
1062 | migrating 519 KB in store; 1.05 MB tracked data | |
1063 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1063 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1064 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions |
|
1064 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions | |
1065 | blindly copying data/f0.i containing 1 revisions |
|
1065 | blindly copying data/f0.i containing 1 revisions | |
1066 | blindly copying data/f2.i containing 1 revisions |
|
1066 | blindly copying data/f2.i containing 1 revisions | |
1067 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1067 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1068 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1068 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1069 | blindly copying 00manifest.i containing 3 revisions |
|
1069 | blindly copying 00manifest.i containing 3 revisions | |
1070 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1070 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1071 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1071 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1072 | cloning 3 revisions from 00changelog.i |
|
1072 | cloning 3 revisions from 00changelog.i | |
1073 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1073 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1074 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1074 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1075 | copying phaseroots |
|
1075 | copying phaseroots | |
1076 | copying requires |
|
1076 | copying requires | |
1077 | data fully upgraded in a temporary repository |
|
1077 | data fully upgraded in a temporary repository | |
1078 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1078 | marking source repository as being upgraded; clients will be unable to read from repository | |
1079 | starting in-place swap of repository data |
|
1079 | starting in-place swap of repository data | |
1080 | replacing store... |
|
1080 | replacing store... | |
1081 | store replacement complete; repository was inconsistent for *s (glob) |
|
1081 | store replacement complete; repository was inconsistent for *s (glob) | |
1082 | finalizing requirements file and making repository readable again |
|
1082 | finalizing requirements file and making repository readable again | |
1083 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1083 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1084 | $ hg verify -q |
|
1084 | $ hg verify -q | |
1085 |
|
1085 | |||
1086 | Check that we can select filelog only |
|
1086 | Check that we can select filelog only | |
1087 |
|
1087 | |||
1088 | $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback |
|
1088 | $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback | |
1089 | upgrade will perform the following actions: |
|
1089 | upgrade will perform the following actions: | |
1090 |
|
1090 | |||
1091 | requirements |
|
1091 | requirements | |
1092 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1092 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1093 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1093 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1094 |
|
1094 | |||
1095 | optimisations: re-delta-parent |
|
1095 | optimisations: re-delta-parent | |
1096 |
|
1096 | |||
1097 | re-delta-parent |
|
1097 | re-delta-parent | |
1098 | deltas within internal storage will choose a new base revision if needed |
|
1098 | deltas within internal storage will choose a new base revision if needed | |
1099 |
|
1099 | |||
1100 | processed revlogs: |
|
1100 | processed revlogs: | |
1101 | - all-filelogs |
|
1101 | - all-filelogs | |
1102 |
|
1102 | |||
1103 | beginning upgrade... |
|
1103 | beginning upgrade... | |
1104 | repository locked and read-only |
|
1104 | repository locked and read-only | |
1105 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1105 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1106 | (it is safe to interrupt this process any time before data migration completes) |
|
1106 | (it is safe to interrupt this process any time before data migration completes) | |
1107 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1107 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1108 | migrating 519 KB in store; 1.05 MB tracked data |
|
1108 | migrating 519 KB in store; 1.05 MB tracked data | |
1109 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1109 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1110 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1110 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1111 | cloning 1 revisions from data/f0.i |
|
1111 | cloning 1 revisions from data/f0.i | |
1112 | cloning 1 revisions from data/f2.i |
|
1112 | cloning 1 revisions from data/f2.i | |
1113 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1113 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1114 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1114 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1115 | blindly copying 00manifest.i containing 3 revisions |
|
1115 | blindly copying 00manifest.i containing 3 revisions | |
1116 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1116 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1117 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1117 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1118 | blindly copying 00changelog.i containing 3 revisions |
|
1118 | blindly copying 00changelog.i containing 3 revisions | |
1119 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1119 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1120 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1120 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1121 | copying phaseroots |
|
1121 | copying phaseroots | |
1122 | copying requires |
|
1122 | copying requires | |
1123 | data fully upgraded in a temporary repository |
|
1123 | data fully upgraded in a temporary repository | |
1124 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1124 | marking source repository as being upgraded; clients will be unable to read from repository | |
1125 | starting in-place swap of repository data |
|
1125 | starting in-place swap of repository data | |
1126 | replacing store... |
|
1126 | replacing store... | |
1127 | store replacement complete; repository was inconsistent for *s (glob) |
|
1127 | store replacement complete; repository was inconsistent for *s (glob) | |
1128 | finalizing requirements file and making repository readable again |
|
1128 | finalizing requirements file and making repository readable again | |
1129 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1129 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1130 | $ hg verify -q |
|
1130 | $ hg verify -q | |
1131 |
|
1131 | |||
1132 |
|
1132 | |||
1133 | Check you can't skip revlog clone during important format downgrade |
|
1133 | Check you can't skip revlog clone during important format downgrade | |
1134 |
|
1134 | |||
1135 | $ echo "[format]" > .hg/hgrc |
|
1135 | $ echo "[format]" > .hg/hgrc | |
1136 | $ echo "sparse-revlog=no" >> .hg/hgrc |
|
1136 | $ echo "sparse-revlog=no" >> .hg/hgrc | |
1137 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet |
|
1137 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet | |
1138 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog |
|
1138 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog | |
1139 |
|
1139 | |||
1140 | requirements |
|
1140 | requirements | |
1141 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1141 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1142 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1142 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1143 | removed: sparserevlog |
|
1143 | removed: sparserevlog | |
1144 |
|
1144 | |||
1145 | optimisations: re-delta-parent |
|
1145 | optimisations: re-delta-parent | |
1146 |
|
1146 | |||
1147 | processed revlogs: |
|
1147 | processed revlogs: | |
1148 | - all-filelogs |
|
1148 | - all-filelogs | |
1149 | - changelog |
|
1149 | - changelog | |
1150 | - manifest |
|
1150 | - manifest | |
1151 |
|
1151 | |||
1152 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
1152 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | |
1153 | note: selecting all-filelogs for processing to change: sparserevlog |
|
1153 | note: selecting all-filelogs for processing to change: sparserevlog | |
1154 | note: selecting changelog for processing to change: sparserevlog |
|
1154 | note: selecting changelog for processing to change: sparserevlog | |
1155 |
|
1155 | |||
1156 | upgrade will perform the following actions: |
|
1156 | upgrade will perform the following actions: | |
1157 |
|
1157 | |||
1158 | requirements |
|
1158 | requirements | |
1159 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1159 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1160 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1160 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1161 | removed: sparserevlog |
|
1161 | removed: sparserevlog | |
1162 |
|
1162 | |||
1163 | optimisations: re-delta-parent |
|
1163 | optimisations: re-delta-parent | |
1164 |
|
1164 | |||
1165 | re-delta-parent |
|
1165 | re-delta-parent | |
1166 | deltas within internal storage will choose a new base revision if needed |
|
1166 | deltas within internal storage will choose a new base revision if needed | |
1167 |
|
1167 | |||
1168 | processed revlogs: |
|
1168 | processed revlogs: | |
1169 | - all-filelogs |
|
1169 | - all-filelogs | |
1170 | - changelog |
|
1170 | - changelog | |
1171 | - manifest |
|
1171 | - manifest | |
1172 |
|
1172 | |||
1173 | beginning upgrade... |
|
1173 | beginning upgrade... | |
1174 | repository locked and read-only |
|
1174 | repository locked and read-only | |
1175 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1175 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1176 | (it is safe to interrupt this process any time before data migration completes) |
|
1176 | (it is safe to interrupt this process any time before data migration completes) | |
1177 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1177 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1178 | migrating 519 KB in store; 1.05 MB tracked data |
|
1178 | migrating 519 KB in store; 1.05 MB tracked data | |
1179 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1179 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1180 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1180 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1181 | cloning 1 revisions from data/f0.i |
|
1181 | cloning 1 revisions from data/f0.i | |
1182 | cloning 1 revisions from data/f2.i |
|
1182 | cloning 1 revisions from data/f2.i | |
1183 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1183 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1184 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1184 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1185 | cloning 3 revisions from 00manifest.i |
|
1185 | cloning 3 revisions from 00manifest.i | |
1186 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1186 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1187 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1187 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1188 | cloning 3 revisions from 00changelog.i |
|
1188 | cloning 3 revisions from 00changelog.i | |
1189 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1189 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1190 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1190 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1191 | copying phaseroots |
|
1191 | copying phaseroots | |
1192 | copying requires |
|
1192 | copying requires | |
1193 | data fully upgraded in a temporary repository |
|
1193 | data fully upgraded in a temporary repository | |
1194 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1194 | marking source repository as being upgraded; clients will be unable to read from repository | |
1195 | starting in-place swap of repository data |
|
1195 | starting in-place swap of repository data | |
1196 | replacing store... |
|
1196 | replacing store... | |
1197 | store replacement complete; repository was inconsistent for *s (glob) |
|
1197 | store replacement complete; repository was inconsistent for *s (glob) | |
1198 | finalizing requirements file and making repository readable again |
|
1198 | finalizing requirements file and making repository readable again | |
1199 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1199 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1200 | $ hg verify -q |
|
1200 | $ hg verify -q | |
1201 |
|
1201 | |||
1202 | Check you can't skip revlog clone during important format upgrade |
|
1202 | Check you can't skip revlog clone during important format upgrade | |
1203 |
|
1203 | |||
1204 | $ echo "sparse-revlog=yes" >> .hg/hgrc |
|
1204 | $ echo "sparse-revlog=yes" >> .hg/hgrc | |
1205 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
1205 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback | |
1206 | note: selecting all-filelogs for processing to change: sparserevlog |
|
1206 | note: selecting all-filelogs for processing to change: sparserevlog | |
1207 | note: selecting changelog for processing to change: sparserevlog |
|
1207 | note: selecting changelog for processing to change: sparserevlog | |
1208 |
|
1208 | |||
1209 | upgrade will perform the following actions: |
|
1209 | upgrade will perform the following actions: | |
1210 |
|
1210 | |||
1211 | requirements |
|
1211 | requirements | |
1212 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1212 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1213 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1213 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1214 | added: sparserevlog |
|
1214 | added: sparserevlog | |
1215 |
|
1215 | |||
1216 | optimisations: re-delta-parent |
|
1216 | optimisations: re-delta-parent | |
1217 |
|
1217 | |||
1218 | sparserevlog |
|
1218 | sparserevlog | |
1219 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
1219 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. | |
1220 |
|
1220 | |||
1221 | re-delta-parent |
|
1221 | re-delta-parent | |
1222 | deltas within internal storage will choose a new base revision if needed |
|
1222 | deltas within internal storage will choose a new base revision if needed | |
1223 |
|
1223 | |||
1224 | processed revlogs: |
|
1224 | processed revlogs: | |
1225 | - all-filelogs |
|
1225 | - all-filelogs | |
1226 | - changelog |
|
1226 | - changelog | |
1227 | - manifest |
|
1227 | - manifest | |
1228 |
|
1228 | |||
1229 | beginning upgrade... |
|
1229 | beginning upgrade... | |
1230 | repository locked and read-only |
|
1230 | repository locked and read-only | |
1231 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1231 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1232 | (it is safe to interrupt this process any time before data migration completes) |
|
1232 | (it is safe to interrupt this process any time before data migration completes) | |
1233 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1233 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1234 | migrating 519 KB in store; 1.05 MB tracked data |
|
1234 | migrating 519 KB in store; 1.05 MB tracked data | |
1235 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1235 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) | |
1236 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1236 | cloning 1 revisions from data/FooBarDirectory.d/f1.i | |
1237 | cloning 1 revisions from data/f0.i |
|
1237 | cloning 1 revisions from data/f0.i | |
1238 | cloning 1 revisions from data/f2.i |
|
1238 | cloning 1 revisions from data/f2.i | |
1239 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1239 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes | |
1240 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1240 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) | |
1241 | cloning 3 revisions from 00manifest.i |
|
1241 | cloning 3 revisions from 00manifest.i | |
1242 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1242 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1243 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1243 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) | |
1244 | cloning 3 revisions from 00changelog.i |
|
1244 | cloning 3 revisions from 00changelog.i | |
1245 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1245 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1246 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1246 | finished migrating 9 total revisions; total change in store size: 0 bytes | |
1247 | copying phaseroots |
|
1247 | copying phaseroots | |
1248 | copying requires |
|
1248 | copying requires | |
1249 | data fully upgraded in a temporary repository |
|
1249 | data fully upgraded in a temporary repository | |
1250 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1250 | marking source repository as being upgraded; clients will be unable to read from repository | |
1251 | starting in-place swap of repository data |
|
1251 | starting in-place swap of repository data | |
1252 | replacing store... |
|
1252 | replacing store... | |
1253 | store replacement complete; repository was inconsistent for *s (glob) |
|
1253 | store replacement complete; repository was inconsistent for *s (glob) | |
1254 | finalizing requirements file and making repository readable again |
|
1254 | finalizing requirements file and making repository readable again | |
1255 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1255 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) | |
1256 | $ hg verify -q |
|
1256 | $ hg verify -q | |
1257 |
|
1257 | |||
1258 | $ cd .. |
|
1258 | $ cd .. | |
1259 |
|
1259 | |||
1260 | store files with special filenames aren't encoded during copy |
|
1260 | store files with special filenames aren't encoded during copy | |
1261 |
|
1261 | |||
1262 | $ hg init store-filenames |
|
1262 | $ hg init store-filenames | |
1263 | $ cd store-filenames |
|
1263 | $ cd store-filenames | |
1264 | $ touch foo |
|
1264 | $ touch foo | |
1265 | $ hg -q commit -A -m initial |
|
1265 | $ hg -q commit -A -m initial | |
1266 | $ touch .hg/store/.XX_special_filename |
|
1266 | $ touch .hg/store/.XX_special_filename | |
1267 |
|
1267 | |||
1268 | $ hg debugupgraderepo --run |
|
1268 | $ hg debugupgraderepo --run | |
1269 | nothing to do |
|
1269 | nothing to do | |
1270 | $ hg debugupgraderepo --run --optimize 're-delta-fulladd' |
|
1270 | $ hg debugupgraderepo --run --optimize 're-delta-fulladd' | |
1271 | upgrade will perform the following actions: |
|
1271 | upgrade will perform the following actions: | |
1272 |
|
1272 | |||
1273 | requirements |
|
1273 | requirements | |
1274 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1274 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1275 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1275 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1276 |
|
1276 | |||
1277 | optimisations: re-delta-fulladd |
|
1277 | optimisations: re-delta-fulladd | |
1278 |
|
1278 | |||
1279 | re-delta-fulladd |
|
1279 | re-delta-fulladd | |
1280 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it |
|
1280 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it | |
1281 |
|
1281 | |||
1282 | processed revlogs: |
|
1282 | processed revlogs: | |
1283 | - all-filelogs |
|
1283 | - all-filelogs | |
1284 | - changelog |
|
1284 | - changelog | |
1285 | - manifest |
|
1285 | - manifest | |
1286 |
|
1286 | |||
1287 | beginning upgrade... |
|
1287 | beginning upgrade... | |
1288 | repository locked and read-only |
|
1288 | repository locked and read-only | |
1289 | creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
1289 | creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
1290 | (it is safe to interrupt this process any time before data migration completes) |
|
1290 | (it is safe to interrupt this process any time before data migration completes) | |
1291 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
1291 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) | |
1292 | migrating 301 bytes in store; 107 bytes tracked data |
|
1292 | migrating 301 bytes in store; 107 bytes tracked data | |
1293 | migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) |
|
1293 | migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) | |
1294 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
1294 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes | |
1295 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) |
|
1295 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) | |
1296 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1296 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes | |
1297 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) |
|
1297 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) | |
1298 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
1298 | finished migrating 1 changelog revisions; change in size: 0 bytes | |
1299 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
1299 | finished migrating 3 total revisions; total change in store size: 0 bytes | |
1300 | copying .XX_special_filename |
|
1300 | copying .XX_special_filename | |
1301 | copying phaseroots |
|
1301 | copying phaseroots | |
1302 | copying requires |
|
1302 | copying requires | |
1303 | data fully upgraded in a temporary repository |
|
1303 | data fully upgraded in a temporary repository | |
1304 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1304 | marking source repository as being upgraded; clients will be unable to read from repository | |
1305 | starting in-place swap of repository data |
|
1305 | starting in-place swap of repository data | |
1306 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
1306 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
1307 | replacing store... |
|
1307 | replacing store... | |
1308 | store replacement complete; repository was inconsistent for *s (glob) |
|
1308 | store replacement complete; repository was inconsistent for *s (glob) | |
1309 | finalizing requirements file and making repository readable again |
|
1309 | finalizing requirements file and making repository readable again | |
1310 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
1310 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) | |
1311 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
1311 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) | |
1312 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
1312 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
1313 |
|
1313 | |||
1314 | fncache is valid after upgrade |
|
1314 | fncache is valid after upgrade | |
1315 |
|
1315 | |||
1316 | $ hg debugrebuildfncache |
|
1316 | $ hg debugrebuildfncache | |
1317 | fncache already up to date |
|
1317 | fncache already up to date | |
1318 |
|
1318 | |||
1319 | $ cd .. |
|
1319 | $ cd .. | |
1320 |
|
1320 | |||
1321 | Check upgrading a large file repository |
|
1321 | Check upgrading a large file repository | |
1322 | --------------------------------------- |
|
1322 | --------------------------------------- | |
1323 |
|
1323 | |||
1324 | $ hg init largefilesrepo |
|
1324 | $ hg init largefilesrepo | |
1325 | $ cat << EOF >> largefilesrepo/.hg/hgrc |
|
1325 | $ cat << EOF >> largefilesrepo/.hg/hgrc | |
1326 | > [extensions] |
|
1326 | > [extensions] | |
1327 | > largefiles = |
|
1327 | > largefiles = | |
1328 | > EOF |
|
1328 | > EOF | |
1329 |
|
1329 | |||
1330 | $ cd largefilesrepo |
|
1330 | $ cd largefilesrepo | |
1331 | $ touch foo |
|
1331 | $ touch foo | |
1332 | $ hg add --large foo |
|
1332 | $ hg add --large foo | |
1333 | $ hg -q commit -m initial |
|
1333 | $ hg -q commit -m initial | |
1334 | $ hg debugrequires |
|
1334 | $ hg debugrequires | |
1335 | dotencode |
|
1335 | dotencode | |
1336 | fncache |
|
1336 | fncache | |
1337 | generaldelta |
|
1337 | generaldelta | |
1338 | largefiles |
|
1338 | largefiles | |
1339 | persistent-nodemap (rust !) |
|
1339 | persistent-nodemap (rust !) | |
1340 | revlogv1 |
|
1340 | revlogv1 | |
1341 | share-safe |
|
1341 | share-safe | |
1342 | sparserevlog |
|
1342 | sparserevlog | |
1343 | store |
|
1343 | store | |
1344 |
|
1344 | |||
1345 | $ hg debugupgraderepo --run |
|
1345 | $ hg debugupgraderepo --run | |
1346 | nothing to do |
|
1346 | nothing to do | |
1347 | $ hg debugrequires |
|
1347 | $ hg debugrequires | |
1348 | dotencode |
|
1348 | dotencode | |
1349 | fncache |
|
1349 | fncache | |
1350 | generaldelta |
|
1350 | generaldelta | |
1351 | largefiles |
|
1351 | largefiles | |
1352 | persistent-nodemap (rust !) |
|
1352 | persistent-nodemap (rust !) | |
1353 | revlogv1 |
|
1353 | revlogv1 | |
1354 | share-safe |
|
1354 | share-safe | |
1355 | sparserevlog |
|
1355 | sparserevlog | |
1356 | store |
|
1356 | store | |
1357 |
|
1357 | |||
1358 | $ cat << EOF >> .hg/hgrc |
|
1358 | $ cat << EOF >> .hg/hgrc | |
1359 | > [extensions] |
|
1359 | > [extensions] | |
1360 | > lfs = |
|
1360 | > lfs = | |
1361 | > [lfs] |
|
1361 | > [lfs] | |
1362 | > threshold = 10 |
|
1362 | > threshold = 10 | |
1363 | > EOF |
|
1363 | > EOF | |
1364 | $ echo '123456789012345' > lfs.bin |
|
1364 | $ echo '123456789012345' > lfs.bin | |
1365 | $ hg ci -Am 'lfs.bin' |
|
1365 | $ hg ci -Am 'lfs.bin' | |
1366 | adding lfs.bin |
|
1366 | adding lfs.bin | |
1367 | $ hg debugrequires | grep lfs |
|
1367 | $ hg debugrequires | grep lfs | |
1368 | lfs |
|
1368 | lfs | |
1369 | $ find .hg/store/lfs -type f |
|
1369 | $ find .hg/store/lfs -type f | |
1370 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1370 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
1371 |
|
1371 | |||
1372 | $ hg debugupgraderepo --run |
|
1372 | $ hg debugupgraderepo --run | |
1373 | nothing to do |
|
1373 | nothing to do | |
1374 |
|
1374 | |||
1375 | $ hg debugrequires | grep lfs |
|
1375 | $ hg debugrequires | grep lfs | |
1376 | lfs |
|
1376 | lfs | |
1377 | $ find .hg/store/lfs -type f |
|
1377 | $ find .hg/store/lfs -type f | |
1378 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1378 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
1379 | $ hg verify -q |
|
1379 | $ hg verify -q | |
1380 | $ hg debugdata lfs.bin 0 |
|
1380 | $ hg debugdata lfs.bin 0 | |
1381 | version https://git-lfs.github.com/spec/v1 |
|
1381 | version https://git-lfs.github.com/spec/v1 | |
1382 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1382 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f | |
1383 | size 16 |
|
1383 | size 16 | |
1384 | x-is-binary 0 |
|
1384 | x-is-binary 0 | |
1385 |
|
1385 | |||
1386 | $ cd .. |
|
1386 | $ cd .. | |
1387 |
|
1387 | |||
1388 | repository config is taken in account |
|
1388 | repository config is taken in account | |
1389 | ------------------------------------- |
|
1389 | ------------------------------------- | |
1390 |
|
1390 | |||
1391 | $ cat << EOF >> $HGRCPATH |
|
1391 | $ cat << EOF >> $HGRCPATH | |
1392 | > [format] |
|
1392 | > [format] | |
1393 | > maxchainlen = 1 |
|
1393 | > maxchainlen = 1 | |
1394 | > EOF |
|
1394 | > EOF | |
1395 |
|
1395 | |||
1396 | $ hg init localconfig |
|
1396 | $ hg init localconfig | |
1397 | $ cd localconfig |
|
1397 | $ cd localconfig | |
1398 | $ cat << EOF > file |
|
1398 | $ cat << EOF > file | |
1399 | > some content |
|
1399 | > some content | |
1400 | > with some length |
|
1400 | > with some length | |
1401 | > to make sure we get a delta |
|
1401 | > to make sure we get a delta | |
1402 | > after changes |
|
1402 | > after changes | |
1403 | > very long |
|
1403 | > very long | |
1404 | > very long |
|
1404 | > very long | |
1405 | > very long |
|
1405 | > very long | |
1406 | > very long |
|
1406 | > very long | |
1407 | > very long |
|
1407 | > very long | |
1408 | > very long |
|
1408 | > very long | |
1409 | > very long |
|
1409 | > very long | |
1410 | > very long |
|
1410 | > very long | |
1411 | > very long |
|
1411 | > very long | |
1412 | > very long |
|
1412 | > very long | |
1413 | > very long |
|
1413 | > very long | |
1414 | > EOF |
|
1414 | > EOF | |
1415 | $ hg -q commit -A -m A |
|
1415 | $ hg -q commit -A -m A | |
1416 | $ echo "new line" >> file |
|
1416 | $ echo "new line" >> file | |
1417 | $ hg -q commit -m B |
|
1417 | $ hg -q commit -m B | |
1418 | $ echo "new line" >> file |
|
1418 | $ echo "new line" >> file | |
1419 | $ hg -q commit -m C |
|
1419 | $ hg -q commit -m C | |
1420 |
|
1420 | |||
1421 | $ cat << EOF >> .hg/hgrc |
|
1421 | $ cat << EOF >> .hg/hgrc | |
1422 | > [format] |
|
1422 | > [format] | |
1423 | > maxchainlen = 9001 |
|
1423 | > maxchainlen = 9001 | |
1424 | > EOF |
|
1424 | > EOF | |
1425 | $ hg config format |
|
1425 | $ hg config format | |
1426 | format.revlog-compression=$BUNDLE2_COMPRESSIONS$ |
|
1426 | format.revlog-compression=$BUNDLE2_COMPRESSIONS$ | |
1427 | format.maxchainlen=9001 |
|
1427 | format.maxchainlen=9001 | |
1428 | $ hg debugdeltachain file |
|
1428 | $ hg debugdeltachain file | |
1429 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
1429 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks | |
1430 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 |
|
1430 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 | |
1431 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 |
|
1431 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 | |
1432 | 2 1 -1 1 2 0 snap 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 |
|
1432 | 2 1 -1 1 2 0 snap 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 | |
1433 |
|
1433 | |||
1434 | $ hg debugupgraderepo --run --optimize 're-delta-all' |
|
1434 | $ hg debugupgraderepo --run --optimize 're-delta-all' | |
1435 | upgrade will perform the following actions: |
|
1435 | upgrade will perform the following actions: | |
1436 |
|
1436 | |||
1437 | requirements |
|
1437 | requirements | |
1438 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1438 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1439 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1439 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1440 |
|
1440 | |||
1441 | optimisations: re-delta-all |
|
1441 | optimisations: re-delta-all | |
1442 |
|
1442 | |||
1443 | re-delta-all |
|
1443 | re-delta-all | |
1444 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time |
|
1444 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time | |
1445 |
|
1445 | |||
1446 | processed revlogs: |
|
1446 | processed revlogs: | |
1447 | - all-filelogs |
|
1447 | - all-filelogs | |
1448 | - changelog |
|
1448 | - changelog | |
1449 | - manifest |
|
1449 | - manifest | |
1450 |
|
1450 | |||
1451 | beginning upgrade... |
|
1451 | beginning upgrade... | |
1452 | repository locked and read-only |
|
1452 | repository locked and read-only | |
1453 | creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
1453 | creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
1454 | (it is safe to interrupt this process any time before data migration completes) |
|
1454 | (it is safe to interrupt this process any time before data migration completes) | |
1455 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1455 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) | |
1456 | migrating 1019 bytes in store; 882 bytes tracked data |
|
1456 | migrating 1019 bytes in store; 882 bytes tracked data | |
1457 | migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data) |
|
1457 | migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data) | |
1458 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes |
|
1458 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes | |
1459 | migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) |
|
1459 | migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) | |
1460 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1460 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes | |
1461 | migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) |
|
1461 | migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) | |
1462 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1462 | finished migrating 3 changelog revisions; change in size: 0 bytes | |
1463 | finished migrating 9 total revisions; total change in store size: -9 bytes |
|
1463 | finished migrating 9 total revisions; total change in store size: -9 bytes | |
1464 | copying phaseroots |
|
1464 | copying phaseroots | |
1465 | copying requires |
|
1465 | copying requires | |
1466 | data fully upgraded in a temporary repository |
|
1466 | data fully upgraded in a temporary repository | |
1467 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1467 | marking source repository as being upgraded; clients will be unable to read from repository | |
1468 | starting in-place swap of repository data |
|
1468 | starting in-place swap of repository data | |
1469 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
1469 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
1470 | replacing store... |
|
1470 | replacing store... | |
1471 | store replacement complete; repository was inconsistent for *s (glob) |
|
1471 | store replacement complete; repository was inconsistent for *s (glob) | |
1472 | finalizing requirements file and making repository readable again |
|
1472 | finalizing requirements file and making repository readable again | |
1473 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
1473 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) | |
1474 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
1474 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) | |
1475 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
1475 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified | |
1476 | $ hg debugdeltachain file |
|
1476 | $ hg debugdeltachain file | |
1477 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
1477 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks | |
1478 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 |
|
1478 | 0 -1 -1 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 | |
1479 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 |
|
1479 | 1 0 -1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 | |
1480 | 2 1 -1 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1 |
|
1480 | 2 1 -1 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1 | |
1481 | $ cd .. |
|
1481 | $ cd .. | |
1482 |
|
1482 | |||
1483 | $ cat << EOF >> $HGRCPATH |
|
1483 | $ cat << EOF >> $HGRCPATH | |
1484 | > [format] |
|
1484 | > [format] | |
1485 | > maxchainlen = 9001 |
|
1485 | > maxchainlen = 9001 | |
1486 | > EOF |
|
1486 | > EOF | |
1487 |
|
1487 | |||
1488 | Check upgrading a sparse-revlog repository |
|
1488 | Check upgrading a sparse-revlog repository | |
1489 | --------------------------------------- |
|
1489 | --------------------------------------- | |
1490 |
|
1490 | |||
1491 | $ hg init sparserevlogrepo --config format.sparse-revlog=no |
|
1491 | $ hg init sparserevlogrepo --config format.sparse-revlog=no | |
1492 | $ cd sparserevlogrepo |
|
1492 | $ cd sparserevlogrepo | |
1493 | $ touch foo |
|
1493 | $ touch foo | |
1494 | $ hg add foo |
|
1494 | $ hg add foo | |
1495 | $ hg -q commit -m "foo" |
|
1495 | $ hg -q commit -m "foo" | |
1496 | $ hg debugrequires |
|
1496 | $ hg debugrequires | |
1497 | dotencode |
|
1497 | dotencode | |
1498 | fncache |
|
1498 | fncache | |
1499 | generaldelta |
|
1499 | generaldelta | |
1500 | persistent-nodemap (rust !) |
|
1500 | persistent-nodemap (rust !) | |
1501 | revlogv1 |
|
1501 | revlogv1 | |
1502 | share-safe |
|
1502 | share-safe | |
1503 | store |
|
1503 | store | |
1504 |
|
1504 | |||
1505 | Check that we can add the sparse-revlog format requirement |
|
1505 | Check that we can add the sparse-revlog format requirement | |
1506 | $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet |
|
1506 | $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet | |
1507 | upgrade will perform the following actions: |
|
1507 | upgrade will perform the following actions: | |
1508 |
|
1508 | |||
1509 | requirements |
|
1509 | requirements | |
1510 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1510 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1511 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1511 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1512 | added: sparserevlog |
|
1512 | added: sparserevlog | |
1513 |
|
1513 | |||
1514 | processed revlogs: |
|
1514 | processed revlogs: | |
1515 | - all-filelogs |
|
1515 | - all-filelogs | |
1516 | - changelog |
|
1516 | - changelog | |
1517 | - manifest |
|
1517 | - manifest | |
1518 |
|
1518 | |||
1519 | $ hg debugrequires |
|
1519 | $ hg debugrequires | |
1520 | dotencode |
|
1520 | dotencode | |
1521 | fncache |
|
1521 | fncache | |
1522 | generaldelta |
|
1522 | generaldelta | |
1523 | persistent-nodemap (rust !) |
|
1523 | persistent-nodemap (rust !) | |
1524 | revlogv1 |
|
1524 | revlogv1 | |
1525 | share-safe |
|
1525 | share-safe | |
1526 | sparserevlog |
|
1526 | sparserevlog | |
1527 | store |
|
1527 | store | |
1528 |
|
1528 | |||
1529 | Check that we can remove the sparse-revlog format requirement |
|
1529 | Check that we can remove the sparse-revlog format requirement | |
1530 | $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet |
|
1530 | $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet | |
1531 | upgrade will perform the following actions: |
|
1531 | upgrade will perform the following actions: | |
1532 |
|
1532 | |||
1533 | requirements |
|
1533 | requirements | |
1534 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1534 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1535 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1535 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1536 | removed: sparserevlog |
|
1536 | removed: sparserevlog | |
1537 |
|
1537 | |||
1538 | processed revlogs: |
|
1538 | processed revlogs: | |
1539 | - all-filelogs |
|
1539 | - all-filelogs | |
1540 | - changelog |
|
1540 | - changelog | |
1541 | - manifest |
|
1541 | - manifest | |
1542 |
|
1542 | |||
1543 | $ hg debugrequires |
|
1543 | $ hg debugrequires | |
1544 | dotencode |
|
1544 | dotencode | |
1545 | fncache |
|
1545 | fncache | |
1546 | generaldelta |
|
1546 | generaldelta | |
1547 | persistent-nodemap (rust !) |
|
1547 | persistent-nodemap (rust !) | |
1548 | revlogv1 |
|
1548 | revlogv1 | |
1549 | share-safe |
|
1549 | share-safe | |
1550 | store |
|
1550 | store | |
1551 |
|
1551 | |||
1552 | #if zstd |
|
1552 | #if zstd | |
1553 |
|
1553 | |||
1554 | Check upgrading to a zstd revlog |
|
1554 | Check upgrading to a zstd revlog | |
1555 | -------------------------------- |
|
1555 | -------------------------------- | |
1556 |
|
1556 | |||
1557 | upgrade |
|
1557 | upgrade | |
1558 |
|
1558 | |||
1559 | $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet |
|
1559 | $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet | |
1560 | upgrade will perform the following actions: |
|
1560 | upgrade will perform the following actions: | |
1561 |
|
1561 | |||
1562 | requirements |
|
1562 | requirements | |
1563 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) |
|
1563 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, store (no-rust !) | |
1564 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) |
|
1564 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, store (rust !) | |
1565 | added: revlog-compression-zstd, sparserevlog |
|
1565 | added: revlog-compression-zstd, sparserevlog | |
1566 |
|
1566 | |||
1567 | processed revlogs: |
|
1567 | processed revlogs: | |
1568 | - all-filelogs |
|
1568 | - all-filelogs | |
1569 | - changelog |
|
1569 | - changelog | |
1570 | - manifest |
|
1570 | - manifest | |
1571 |
|
1571 | |||
1572 | $ hg debugformat -v |
|
1572 | $ hg debugformat -v | |
1573 | format-variant repo config default |
|
1573 | format-variant repo config default | |
1574 | fncache: yes yes yes |
|
1574 | fncache: yes yes yes | |
1575 | dirstate-v2: no no no |
|
1575 | dirstate-v2: no no no | |
1576 | tracked-hint: no no no |
|
1576 | tracked-hint: no no no | |
1577 | dotencode: yes yes yes |
|
1577 | dotencode: yes yes yes | |
1578 | generaldelta: yes yes yes |
|
1578 | generaldelta: yes yes yes | |
1579 | share-safe: yes yes yes |
|
1579 | share-safe: yes yes yes | |
1580 | sparserevlog: yes yes yes |
|
1580 | sparserevlog: yes yes yes | |
1581 | persistent-nodemap: no no no (no-rust !) |
|
1581 | persistent-nodemap: no no no (no-rust !) | |
1582 | persistent-nodemap: yes yes no (rust !) |
|
1582 | persistent-nodemap: yes yes no (rust !) | |
1583 | copies-sdc: no no no |
|
1583 | copies-sdc: no no no | |
1584 | revlog-v2: no no no |
|
1584 | revlog-v2: no no no | |
1585 | changelog-v2: no no no |
|
1585 | changelog-v2: no no no | |
1586 | plain-cl-delta: yes yes yes |
|
1586 | plain-cl-delta: yes yes yes | |
1587 | compression: zlib zlib zlib (no-zstd !) |
|
1587 | compression: zlib zlib zlib (no-zstd !) | |
1588 | compression: zstd zlib zstd (zstd !) |
|
1588 | compression: zstd zlib zstd (zstd !) | |
1589 | compression-level: default default default |
|
1589 | compression-level: default default default | |
1590 | $ hg debugrequires |
|
1590 | $ hg debugrequires | |
1591 | dotencode |
|
1591 | dotencode | |
1592 | fncache |
|
1592 | fncache | |
1593 | generaldelta |
|
1593 | generaldelta | |
1594 | persistent-nodemap (rust !) |
|
1594 | persistent-nodemap (rust !) | |
1595 | revlog-compression-zstd |
|
1595 | revlog-compression-zstd | |
1596 | revlogv1 |
|
1596 | revlogv1 | |
1597 | share-safe |
|
1597 | share-safe | |
1598 | sparserevlog |
|
1598 | sparserevlog | |
1599 | store |
|
1599 | store | |
1600 |
|
1600 | |||
1601 | downgrade |
|
1601 | downgrade | |
1602 |
|
1602 | |||
1603 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1603 | $ hg debugupgraderepo --run --no-backup --quiet | |
1604 | upgrade will perform the following actions: |
|
1604 | upgrade will perform the following actions: | |
1605 |
|
1605 | |||
1606 | requirements |
|
1606 | requirements | |
1607 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1607 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1608 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1608 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1609 | removed: revlog-compression-zstd |
|
1609 | removed: revlog-compression-zstd | |
1610 |
|
1610 | |||
1611 | processed revlogs: |
|
1611 | processed revlogs: | |
1612 | - all-filelogs |
|
1612 | - all-filelogs | |
1613 | - changelog |
|
1613 | - changelog | |
1614 | - manifest |
|
1614 | - manifest | |
1615 |
|
1615 | |||
1616 | $ hg debugformat -v |
|
1616 | $ hg debugformat -v | |
1617 | format-variant repo config default |
|
1617 | format-variant repo config default | |
1618 | fncache: yes yes yes |
|
1618 | fncache: yes yes yes | |
1619 | dirstate-v2: no no no |
|
1619 | dirstate-v2: no no no | |
1620 | tracked-hint: no no no |
|
1620 | tracked-hint: no no no | |
1621 | dotencode: yes yes yes |
|
1621 | dotencode: yes yes yes | |
1622 | generaldelta: yes yes yes |
|
1622 | generaldelta: yes yes yes | |
1623 | share-safe: yes yes yes |
|
1623 | share-safe: yes yes yes | |
1624 | sparserevlog: yes yes yes |
|
1624 | sparserevlog: yes yes yes | |
1625 | persistent-nodemap: no no no (no-rust !) |
|
1625 | persistent-nodemap: no no no (no-rust !) | |
1626 | persistent-nodemap: yes yes no (rust !) |
|
1626 | persistent-nodemap: yes yes no (rust !) | |
1627 | copies-sdc: no no no |
|
1627 | copies-sdc: no no no | |
1628 | revlog-v2: no no no |
|
1628 | revlog-v2: no no no | |
1629 | changelog-v2: no no no |
|
1629 | changelog-v2: no no no | |
1630 | plain-cl-delta: yes yes yes |
|
1630 | plain-cl-delta: yes yes yes | |
1631 | compression: zlib zlib zlib (no-zstd !) |
|
1631 | compression: zlib zlib zlib (no-zstd !) | |
1632 | compression: zlib zlib zstd (zstd !) |
|
1632 | compression: zlib zlib zstd (zstd !) | |
1633 | compression-level: default default default |
|
1633 | compression-level: default default default | |
1634 | $ hg debugrequires |
|
1634 | $ hg debugrequires | |
1635 | dotencode |
|
1635 | dotencode | |
1636 | fncache |
|
1636 | fncache | |
1637 | generaldelta |
|
1637 | generaldelta | |
1638 | persistent-nodemap (rust !) |
|
1638 | persistent-nodemap (rust !) | |
1639 | revlogv1 |
|
1639 | revlogv1 | |
1640 | share-safe |
|
1640 | share-safe | |
1641 | sparserevlog |
|
1641 | sparserevlog | |
1642 | store |
|
1642 | store | |
1643 |
|
1643 | |||
1644 | upgrade from hgrc |
|
1644 | upgrade from hgrc | |
1645 |
|
1645 | |||
1646 | $ cat >> .hg/hgrc << EOF |
|
1646 | $ cat >> .hg/hgrc << EOF | |
1647 | > [format] |
|
1647 | > [format] | |
1648 | > revlog-compression=zstd |
|
1648 | > revlog-compression=zstd | |
1649 | > EOF |
|
1649 | > EOF | |
1650 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1650 | $ hg debugupgraderepo --run --no-backup --quiet | |
1651 | upgrade will perform the following actions: |
|
1651 | upgrade will perform the following actions: | |
1652 |
|
1652 | |||
1653 | requirements |
|
1653 | requirements | |
1654 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) |
|
1654 | preserved: dotencode, fncache, generaldelta, revlogv1, share-safe, sparserevlog, store (no-rust !) | |
1655 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) |
|
1655 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, share-safe, sparserevlog, store (rust !) | |
1656 | added: revlog-compression-zstd |
|
1656 | added: revlog-compression-zstd | |
1657 |
|
1657 | |||
1658 | processed revlogs: |
|
1658 | processed revlogs: | |
1659 | - all-filelogs |
|
1659 | - all-filelogs | |
1660 | - changelog |
|
1660 | - changelog | |
1661 | - manifest |
|
1661 | - manifest | |
1662 |
|
1662 | |||
1663 | $ hg debugformat -v |
|
1663 | $ hg debugformat -v | |
1664 | format-variant repo config default |
|
1664 | format-variant repo config default | |
1665 | fncache: yes yes yes |
|
1665 | fncache: yes yes yes | |
1666 | dirstate-v2: no no no |
|
1666 | dirstate-v2: no no no | |
1667 | tracked-hint: no no no |
|
1667 | tracked-hint: no no no | |
1668 | dotencode: yes yes yes |
|
1668 | dotencode: yes yes yes | |
1669 | generaldelta: yes yes yes |
|
1669 | generaldelta: yes yes yes | |
1670 | share-safe: yes yes yes |
|
1670 | share-safe: yes yes yes | |
1671 | sparserevlog: yes yes yes |
|
1671 | sparserevlog: yes yes yes | |
1672 | persistent-nodemap: no no no (no-rust !) |
|
1672 | persistent-nodemap: no no no (no-rust !) | |
1673 | persistent-nodemap: yes yes no (rust !) |
|
1673 | persistent-nodemap: yes yes no (rust !) | |
1674 | copies-sdc: no no no |
|
1674 | copies-sdc: no no no | |
1675 | revlog-v2: no no no |
|
1675 | revlog-v2: no no no | |
1676 | changelog-v2: no no no |
|
1676 | changelog-v2: no no no | |
1677 | plain-cl-delta: yes yes yes |
|
1677 | plain-cl-delta: yes yes yes | |
1678 | compression: zlib zlib zlib (no-zstd !) |
|
1678 | compression: zlib zlib zlib (no-zstd !) | |
1679 | compression: zstd zstd zstd (zstd !) |
|
1679 | compression: zstd zstd zstd (zstd !) | |
1680 | compression-level: default default default |
|
1680 | compression-level: default default default | |
1681 | $ hg debugrequires |
|
1681 | $ hg debugrequires | |
1682 | dotencode |
|
1682 | dotencode | |
1683 | fncache |
|
1683 | fncache | |
1684 | generaldelta |
|
1684 | generaldelta | |
1685 | persistent-nodemap (rust !) |
|
1685 | persistent-nodemap (rust !) | |
1686 | revlog-compression-zstd |
|
1686 | revlog-compression-zstd | |
1687 | revlogv1 |
|
1687 | revlogv1 | |
1688 | share-safe |
|
1688 | share-safe | |
1689 | sparserevlog |
|
1689 | sparserevlog | |
1690 | store |
|
1690 | store | |
1691 |
|
1691 | |||
1692 | #endif |
|
1692 | #endif | |
1693 |
|
1693 | |||
1694 | Check upgrading to a revlog format supporting sidedata |
|
1694 | Check upgrading to a revlog format supporting sidedata | |
1695 | ------------------------------------------------------ |
|
1695 | ------------------------------------------------------ | |
1696 |
|
1696 | |||
1697 | upgrade |
|
1697 | upgrade | |
1698 |
|
1698 | |||
1699 | $ hg debugsidedata -c 0 |
|
1699 | $ hg debugsidedata -c 0 | |
1700 | $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet |
|
1700 | $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet | |
1701 | upgrade will perform the following actions: |
|
1701 | upgrade will perform the following actions: | |
1702 |
|
1702 | |||
1703 | requirements |
|
1703 | requirements | |
1704 | preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !) |
|
1704 | preserved: dotencode, fncache, generaldelta, share-safe, store (no-zstd !) | |
1705 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) |
|
1705 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) | |
1706 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) |
|
1706 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) | |
1707 | removed: revlogv1 |
|
1707 | removed: revlogv1 | |
1708 | added: exp-revlogv2.2 (zstd !) |
|
1708 | added: exp-revlogv2.2 (zstd !) | |
1709 | added: exp-revlogv2.2, sparserevlog (no-zstd !) |
|
1709 | added: exp-revlogv2.2, sparserevlog (no-zstd !) | |
1710 |
|
1710 | |||
1711 | processed revlogs: |
|
1711 | processed revlogs: | |
1712 | - all-filelogs |
|
1712 | - all-filelogs | |
1713 | - changelog |
|
1713 | - changelog | |
1714 | - manifest |
|
1714 | - manifest | |
1715 |
|
1715 | |||
1716 | $ hg debugformat -v |
|
1716 | $ hg debugformat -v | |
1717 | format-variant repo config default |
|
1717 | format-variant repo config default | |
1718 | fncache: yes yes yes |
|
1718 | fncache: yes yes yes | |
1719 | dirstate-v2: no no no |
|
1719 | dirstate-v2: no no no | |
1720 | tracked-hint: no no no |
|
1720 | tracked-hint: no no no | |
1721 | dotencode: yes yes yes |
|
1721 | dotencode: yes yes yes | |
1722 | generaldelta: yes yes yes |
|
1722 | generaldelta: yes yes yes | |
1723 | share-safe: yes yes yes |
|
1723 | share-safe: yes yes yes | |
1724 | sparserevlog: yes yes yes |
|
1724 | sparserevlog: yes yes yes | |
1725 | persistent-nodemap: no no no (no-rust !) |
|
1725 | persistent-nodemap: no no no (no-rust !) | |
1726 | persistent-nodemap: yes yes no (rust !) |
|
1726 | persistent-nodemap: yes yes no (rust !) | |
1727 | copies-sdc: no no no |
|
1727 | copies-sdc: no no no | |
1728 | revlog-v2: yes no no |
|
1728 | revlog-v2: yes no no | |
1729 | changelog-v2: no no no |
|
1729 | changelog-v2: no no no | |
1730 | plain-cl-delta: yes yes yes |
|
1730 | plain-cl-delta: yes yes yes | |
1731 | compression: zlib zlib zlib (no-zstd !) |
|
1731 | compression: zlib zlib zlib (no-zstd !) | |
1732 | compression: zstd zstd zstd (zstd !) |
|
1732 | compression: zstd zstd zstd (zstd !) | |
1733 | compression-level: default default default |
|
1733 | compression-level: default default default | |
1734 | $ hg debugrequires |
|
1734 | $ hg debugrequires | |
1735 | dotencode |
|
1735 | dotencode | |
1736 | exp-revlogv2.2 |
|
1736 | exp-revlogv2.2 | |
1737 | fncache |
|
1737 | fncache | |
1738 | generaldelta |
|
1738 | generaldelta | |
1739 | persistent-nodemap (rust !) |
|
1739 | persistent-nodemap (rust !) | |
1740 | revlog-compression-zstd (zstd !) |
|
1740 | revlog-compression-zstd (zstd !) | |
1741 | share-safe |
|
1741 | share-safe | |
1742 | sparserevlog |
|
1742 | sparserevlog | |
1743 | store |
|
1743 | store | |
1744 | $ hg debugsidedata -c 0 |
|
1744 | $ hg debugsidedata -c 0 | |
1745 | 2 sidedata entries |
|
1745 | 2 sidedata entries | |
1746 | entry-0001 size 4 |
|
1746 | entry-0001 size 4 | |
1747 | entry-0002 size 32 |
|
1747 | entry-0002 size 32 | |
1748 |
|
1748 | |||
1749 | downgrade |
|
1749 | downgrade | |
1750 |
|
1750 | |||
1751 | $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet |
|
1751 | $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet | |
1752 | upgrade will perform the following actions: |
|
1752 | upgrade will perform the following actions: | |
1753 |
|
1753 | |||
1754 | requirements |
|
1754 | requirements | |
1755 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) |
|
1755 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) | |
1756 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) |
|
1756 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) | |
1757 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) |
|
1757 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) | |
1758 | removed: exp-revlogv2.2 |
|
1758 | removed: exp-revlogv2.2 | |
1759 | added: revlogv1 |
|
1759 | added: revlogv1 | |
1760 |
|
1760 | |||
1761 | processed revlogs: |
|
1761 | processed revlogs: | |
1762 | - all-filelogs |
|
1762 | - all-filelogs | |
1763 | - changelog |
|
1763 | - changelog | |
1764 | - manifest |
|
1764 | - manifest | |
1765 |
|
1765 | |||
1766 | $ hg debugformat -v |
|
1766 | $ hg debugformat -v | |
1767 | format-variant repo config default |
|
1767 | format-variant repo config default | |
1768 | fncache: yes yes yes |
|
1768 | fncache: yes yes yes | |
1769 | dirstate-v2: no no no |
|
1769 | dirstate-v2: no no no | |
1770 | tracked-hint: no no no |
|
1770 | tracked-hint: no no no | |
1771 | dotencode: yes yes yes |
|
1771 | dotencode: yes yes yes | |
1772 | generaldelta: yes yes yes |
|
1772 | generaldelta: yes yes yes | |
1773 | share-safe: yes yes yes |
|
1773 | share-safe: yes yes yes | |
1774 | sparserevlog: yes yes yes |
|
1774 | sparserevlog: yes yes yes | |
1775 | persistent-nodemap: no no no (no-rust !) |
|
1775 | persistent-nodemap: no no no (no-rust !) | |
1776 | persistent-nodemap: yes yes no (rust !) |
|
1776 | persistent-nodemap: yes yes no (rust !) | |
1777 | copies-sdc: no no no |
|
1777 | copies-sdc: no no no | |
1778 | revlog-v2: no no no |
|
1778 | revlog-v2: no no no | |
1779 | changelog-v2: no no no |
|
1779 | changelog-v2: no no no | |
1780 | plain-cl-delta: yes yes yes |
|
1780 | plain-cl-delta: yes yes yes | |
1781 | compression: zlib zlib zlib (no-zstd !) |
|
1781 | compression: zlib zlib zlib (no-zstd !) | |
1782 | compression: zstd zstd zstd (zstd !) |
|
1782 | compression: zstd zstd zstd (zstd !) | |
1783 | compression-level: default default default |
|
1783 | compression-level: default default default | |
1784 | $ hg debugrequires |
|
1784 | $ hg debugrequires | |
1785 | dotencode |
|
1785 | dotencode | |
1786 | fncache |
|
1786 | fncache | |
1787 | generaldelta |
|
1787 | generaldelta | |
1788 | persistent-nodemap (rust !) |
|
1788 | persistent-nodemap (rust !) | |
1789 | revlog-compression-zstd (zstd !) |
|
1789 | revlog-compression-zstd (zstd !) | |
1790 | revlogv1 |
|
1790 | revlogv1 | |
1791 | share-safe |
|
1791 | share-safe | |
1792 | sparserevlog |
|
1792 | sparserevlog | |
1793 | store |
|
1793 | store | |
1794 | $ hg debugsidedata -c 0 |
|
1794 | $ hg debugsidedata -c 0 | |
1795 |
|
1795 | |||
1796 | upgrade from hgrc |
|
1796 | upgrade from hgrc | |
1797 |
|
1797 | |||
1798 | $ cat >> .hg/hgrc << EOF |
|
1798 | $ cat >> .hg/hgrc << EOF | |
1799 | > [experimental] |
|
1799 | > [experimental] | |
1800 | > revlogv2=enable-unstable-format-and-corrupt-my-data |
|
1800 | > revlogv2=enable-unstable-format-and-corrupt-my-data | |
1801 | > EOF |
|
1801 | > EOF | |
1802 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1802 | $ hg debugupgraderepo --run --no-backup --quiet | |
1803 | upgrade will perform the following actions: |
|
1803 | upgrade will perform the following actions: | |
1804 |
|
1804 | |||
1805 | requirements |
|
1805 | requirements | |
1806 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) |
|
1806 | preserved: dotencode, fncache, generaldelta, share-safe, sparserevlog, store (no-zstd !) | |
1807 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) |
|
1807 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, share-safe, sparserevlog, store (zstd no-rust !) | |
1808 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) |
|
1808 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, share-safe, sparserevlog, store (rust !) | |
1809 | removed: revlogv1 |
|
1809 | removed: revlogv1 | |
1810 | added: exp-revlogv2.2 |
|
1810 | added: exp-revlogv2.2 | |
1811 |
|
1811 | |||
1812 | processed revlogs: |
|
1812 | processed revlogs: | |
1813 | - all-filelogs |
|
1813 | - all-filelogs | |
1814 | - changelog |
|
1814 | - changelog | |
1815 | - manifest |
|
1815 | - manifest | |
1816 |
|
1816 | |||
1817 | $ hg debugformat -v |
|
1817 | $ hg debugformat -v | |
1818 | format-variant repo config default |
|
1818 | format-variant repo config default | |
1819 | fncache: yes yes yes |
|
1819 | fncache: yes yes yes | |
1820 | dirstate-v2: no no no |
|
1820 | dirstate-v2: no no no | |
1821 | tracked-hint: no no no |
|
1821 | tracked-hint: no no no | |
1822 | dotencode: yes yes yes |
|
1822 | dotencode: yes yes yes | |
1823 | generaldelta: yes yes yes |
|
1823 | generaldelta: yes yes yes | |
1824 | share-safe: yes yes yes |
|
1824 | share-safe: yes yes yes | |
1825 | sparserevlog: yes yes yes |
|
1825 | sparserevlog: yes yes yes | |
1826 | persistent-nodemap: no no no (no-rust !) |
|
1826 | persistent-nodemap: no no no (no-rust !) | |
1827 | persistent-nodemap: yes yes no (rust !) |
|
1827 | persistent-nodemap: yes yes no (rust !) | |
1828 | copies-sdc: no no no |
|
1828 | copies-sdc: no no no | |
1829 | revlog-v2: yes yes no |
|
1829 | revlog-v2: yes yes no | |
1830 | changelog-v2: no no no |
|
1830 | changelog-v2: no no no | |
1831 | plain-cl-delta: yes yes yes |
|
1831 | plain-cl-delta: yes yes yes | |
1832 | compression: zlib zlib zlib (no-zstd !) |
|
1832 | compression: zlib zlib zlib (no-zstd !) | |
1833 | compression: zstd zstd zstd (zstd !) |
|
1833 | compression: zstd zstd zstd (zstd !) | |
1834 | compression-level: default default default |
|
1834 | compression-level: default default default | |
1835 | $ hg debugrequires |
|
1835 | $ hg debugrequires | |
1836 | dotencode |
|
1836 | dotencode | |
1837 | exp-revlogv2.2 |
|
1837 | exp-revlogv2.2 | |
1838 | fncache |
|
1838 | fncache | |
1839 | generaldelta |
|
1839 | generaldelta | |
1840 | persistent-nodemap (rust !) |
|
1840 | persistent-nodemap (rust !) | |
1841 | revlog-compression-zstd (zstd !) |
|
1841 | revlog-compression-zstd (zstd !) | |
1842 | share-safe |
|
1842 | share-safe | |
1843 | sparserevlog |
|
1843 | sparserevlog | |
1844 | store |
|
1844 | store | |
1845 | $ hg debugsidedata -c 0 |
|
1845 | $ hg debugsidedata -c 0 | |
1846 |
|
1846 | |||
1847 | Demonstrate that nothing to perform upgrade will still run all the way through |
|
1847 | Demonstrate that nothing to perform upgrade will still run all the way through | |
1848 |
|
1848 | |||
1849 | $ hg debugupgraderepo --run |
|
1849 | $ hg debugupgraderepo --run | |
1850 | nothing to do |
|
1850 | nothing to do | |
1851 |
|
1851 | |||
1852 | #if no-rust |
|
1852 | #if no-rust | |
1853 |
|
1853 | |||
1854 | $ cat << EOF >> $HGRCPATH |
|
1854 | $ cat << EOF >> $HGRCPATH | |
1855 | > [storage] |
|
1855 | > [storage] | |
1856 | > dirstate-v2.slow-path = allow |
|
1856 | > dirstate-v2.slow-path = allow | |
1857 | > EOF |
|
1857 | > EOF | |
1858 |
|
1858 | |||
1859 | #endif |
|
1859 | #endif | |
1860 |
|
1860 | |||
1861 | Upgrade to dirstate-v2 |
|
1861 | Upgrade to dirstate-v2 | |
1862 |
|
1862 | |||
1863 | $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2 |
|
1863 | $ hg debugformat -v --config format.use-dirstate-v2=1 | grep dirstate-v2 | |
1864 | dirstate-v2: no yes no |
|
1864 | dirstate-v2: no yes no | |
1865 | $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run |
|
1865 | $ hg debugupgraderepo --config format.use-dirstate-v2=1 --run | |
1866 | upgrade will perform the following actions: |
|
1866 | upgrade will perform the following actions: | |
1867 |
|
1867 | |||
1868 | requirements |
|
1868 | requirements | |
1869 | preserved: * (glob) |
|
1869 | preserved: * (glob) | |
1870 | added: dirstate-v2 |
|
1870 | added: dirstate-v2 | |
1871 |
|
1871 | |||
1872 | dirstate-v2 |
|
1872 | dirstate-v2 | |
1873 | "hg status" will be faster |
|
1873 | "hg status" will be faster | |
1874 |
|
1874 | |||
1875 | no revlogs to process |
|
1875 | no revlogs to process | |
1876 |
|
1876 | |||
1877 | beginning upgrade... |
|
1877 | beginning upgrade... | |
1878 | repository locked and read-only |
|
1878 | repository locked and read-only | |
1879 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1879 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1880 | (it is safe to interrupt this process any time before data migration completes) |
|
1880 | (it is safe to interrupt this process any time before data migration completes) | |
1881 | upgrading to dirstate-v2 from v1 |
|
1881 | upgrading to dirstate-v2 from v1 | |
1882 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) |
|
1882 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) | |
1883 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1883 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1884 | $ ls .hg/upgradebackup.*/dirstate |
|
1884 | $ ls .hg/upgradebackup.*/dirstate | |
1885 | .hg/upgradebackup.*/dirstate (glob) |
|
1885 | .hg/upgradebackup.*/dirstate (glob) | |
1886 | $ hg debugformat -v | grep dirstate-v2 |
|
1886 | $ hg debugformat -v | grep dirstate-v2 | |
1887 | dirstate-v2: yes no no |
|
1887 | dirstate-v2: yes no no | |
1888 | $ hg status |
|
1888 | $ hg status | |
1889 | $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null |
|
1889 | $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null | |
1890 | dirstate-v2 |
|
1890 | dirstate-v2 | |
1891 |
|
1891 | |||
1892 | Downgrade from dirstate-v2 |
|
1892 | Downgrade from dirstate-v2 | |
1893 |
|
1893 | |||
1894 | $ hg debugupgraderepo --run |
|
1894 | $ hg debugupgraderepo --run | |
1895 | upgrade will perform the following actions: |
|
1895 | upgrade will perform the following actions: | |
1896 |
|
1896 | |||
1897 | requirements |
|
1897 | requirements | |
1898 | preserved: * (glob) |
|
1898 | preserved: * (glob) | |
1899 | removed: dirstate-v2 |
|
1899 | removed: dirstate-v2 | |
1900 |
|
1900 | |||
1901 | no revlogs to process |
|
1901 | no revlogs to process | |
1902 |
|
1902 | |||
1903 | beginning upgrade... |
|
1903 | beginning upgrade... | |
1904 | repository locked and read-only |
|
1904 | repository locked and read-only | |
1905 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1905 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1906 | (it is safe to interrupt this process any time before data migration completes) |
|
1906 | (it is safe to interrupt this process any time before data migration completes) | |
1907 | downgrading from dirstate-v2 to v1 |
|
1907 | downgrading from dirstate-v2 to v1 | |
1908 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) |
|
1908 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) | |
1909 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1909 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) | |
1910 | $ hg debugformat -v | grep dirstate-v2 |
|
1910 | $ hg debugformat -v | grep dirstate-v2 | |
1911 | dirstate-v2: no no no |
|
1911 | dirstate-v2: no no no | |
1912 | $ hg status |
|
1912 | $ hg status | |
1913 |
|
1913 | |||
1914 | $ cd .. |
|
1914 | $ cd .. | |
1915 |
|
1915 | |||
1916 | dirstate-v2: upgrade and downgrade from and empty repository: |
|
1916 | dirstate-v2: upgrade and downgrade from and empty repository: | |
1917 | ------------------------------------------------------------- |
|
1917 | ------------------------------------------------------------- | |
1918 |
|
1918 | |||
1919 | $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty |
|
1919 | $ hg init --config format.use-dirstate-v2=no dirstate-v2-empty | |
1920 | $ cd dirstate-v2-empty |
|
1920 | $ cd dirstate-v2-empty | |
1921 | $ hg debugformat | grep dirstate-v2 |
|
1921 | $ hg debugformat | grep dirstate-v2 | |
1922 | dirstate-v2: no |
|
1922 | dirstate-v2: no | |
1923 |
|
1923 | |||
1924 | upgrade |
|
1924 | upgrade | |
1925 |
|
1925 | |||
1926 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes |
|
1926 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=yes | |
1927 | upgrade will perform the following actions: |
|
1927 | upgrade will perform the following actions: | |
1928 |
|
1928 | |||
1929 | requirements |
|
1929 | requirements | |
1930 | preserved: * (glob) |
|
1930 | preserved: * (glob) | |
1931 | added: dirstate-v2 |
|
1931 | added: dirstate-v2 | |
1932 |
|
1932 | |||
1933 | dirstate-v2 |
|
1933 | dirstate-v2 | |
1934 | "hg status" will be faster |
|
1934 | "hg status" will be faster | |
1935 |
|
1935 | |||
1936 | no revlogs to process |
|
1936 | no revlogs to process | |
1937 |
|
1937 | |||
1938 | beginning upgrade... |
|
1938 | beginning upgrade... | |
1939 | repository locked and read-only |
|
1939 | repository locked and read-only | |
1940 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1940 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1941 | (it is safe to interrupt this process any time before data migration completes) |
|
1941 | (it is safe to interrupt this process any time before data migration completes) | |
1942 | upgrading to dirstate-v2 from v1 |
|
1942 | upgrading to dirstate-v2 from v1 | |
1943 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) |
|
1943 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) | |
1944 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1944 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1945 | $ hg debugformat | grep dirstate-v2 |
|
1945 | $ hg debugformat | grep dirstate-v2 | |
1946 | dirstate-v2: yes |
|
1946 | dirstate-v2: yes | |
1947 |
|
1947 | |||
1948 | downgrade |
|
1948 | downgrade | |
1949 |
|
1949 | |||
1950 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=no |
|
1950 | $ hg debugupgraderepo --run --config format.use-dirstate-v2=no | |
1951 | upgrade will perform the following actions: |
|
1951 | upgrade will perform the following actions: | |
1952 |
|
1952 | |||
1953 | requirements |
|
1953 | requirements | |
1954 | preserved: * (glob) |
|
1954 | preserved: * (glob) | |
1955 | removed: dirstate-v2 |
|
1955 | removed: dirstate-v2 | |
1956 |
|
1956 | |||
1957 | no revlogs to process |
|
1957 | no revlogs to process | |
1958 |
|
1958 | |||
1959 | beginning upgrade... |
|
1959 | beginning upgrade... | |
1960 | repository locked and read-only |
|
1960 | repository locked and read-only | |
1961 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1961 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1962 | (it is safe to interrupt this process any time before data migration completes) |
|
1962 | (it is safe to interrupt this process any time before data migration completes) | |
1963 | downgrading from dirstate-v2 to v1 |
|
1963 | downgrading from dirstate-v2 to v1 | |
1964 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) |
|
1964 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) | |
1965 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1965 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) | |
1966 | $ hg debugformat | grep dirstate-v2 |
|
1966 | $ hg debugformat | grep dirstate-v2 | |
1967 | dirstate-v2: no |
|
1967 | dirstate-v2: no | |
1968 |
|
1968 | |||
1969 | $ cd .. |
|
1969 | $ cd .. | |
1970 |
|
1970 | |||
1971 | Test automatic upgrade/downgrade |
|
1971 | Test automatic upgrade/downgrade | |
1972 | ================================ |
|
1972 | ================================ | |
1973 |
|
1973 | |||
1974 |
|
1974 | |||
1975 | For dirstate v2 |
|
1975 | For dirstate v2 | |
1976 | --------------- |
|
1976 | --------------- | |
1977 |
|
1977 | |||
1978 | create an initial repository |
|
1978 | create an initial repository | |
1979 |
|
1979 | |||
1980 | $ hg init auto-upgrade \ |
|
1980 | $ hg init auto-upgrade \ | |
1981 | > --config format.use-dirstate-v2=no \ |
|
1981 | > --config format.use-dirstate-v2=no \ | |
1982 | > --config format.use-dirstate-tracked-hint=yes \ |
|
1982 | > --config format.use-dirstate-tracked-hint=yes \ | |
1983 | > --config format.use-share-safe=no |
|
1983 | > --config format.use-share-safe=no | |
1984 | $ hg debugbuilddag -R auto-upgrade --new-file .+5 |
|
1984 | $ hg debugbuilddag -R auto-upgrade --new-file .+5 | |
1985 | $ hg -R auto-upgrade update |
|
1985 | $ hg -R auto-upgrade update | |
1986 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1986 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1987 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
1987 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
1988 | dirstate-v2: no |
|
1988 | dirstate-v2: no | |
1989 |
|
1989 | |||
1990 | upgrade it to dirstate-v2 automatically |
|
1990 | upgrade it to dirstate-v2 automatically | |
1991 |
|
1991 | |||
1992 | $ hg status -R auto-upgrade \ |
|
1992 | $ hg status -R auto-upgrade \ | |
1993 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
1993 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
1994 | > --config format.use-dirstate-v2=yes |
|
1994 | > --config format.use-dirstate-v2=yes | |
1995 | automatically upgrading repository to the `dirstate-v2` feature |
|
1995 | automatically upgrading repository to the `dirstate-v2` feature | |
1996 | (see `hg help config.format.use-dirstate-v2` for details) |
|
1996 | (see `hg help config.format.use-dirstate-v2` for details) | |
1997 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
1997 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
1998 | dirstate-v2: yes |
|
1998 | dirstate-v2: yes | |
1999 |
|
1999 | |||
2000 | downgrade it from dirstate-v2 automatically |
|
2000 | downgrade it from dirstate-v2 automatically | |
2001 |
|
2001 | |||
2002 | $ hg status -R auto-upgrade \ |
|
2002 | $ hg status -R auto-upgrade \ | |
2003 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2003 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2004 | > --config format.use-dirstate-v2=no |
|
2004 | > --config format.use-dirstate-v2=no | |
2005 | automatically downgrading repository from the `dirstate-v2` feature |
|
2005 | automatically downgrading repository from the `dirstate-v2` feature | |
2006 | (see `hg help config.format.use-dirstate-v2` for details) |
|
2006 | (see `hg help config.format.use-dirstate-v2` for details) | |
2007 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2007 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2008 | dirstate-v2: no |
|
2008 | dirstate-v2: no | |
2009 |
|
2009 | |||
2010 |
|
2010 | |||
2011 | For multiple change at the same time |
|
2011 | For multiple change at the same time | |
2012 | ------------------------------------ |
|
2012 | ------------------------------------ | |
2013 |
|
2013 | |||
2014 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2014 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2015 | dirstate-v2: no |
|
2015 | dirstate-v2: no | |
2016 | tracked-hint: yes |
|
2016 | tracked-hint: yes | |
2017 | share-safe: no |
|
2017 | share-safe: no | |
2018 |
|
2018 | |||
2019 | $ hg status -R auto-upgrade \ |
|
2019 | $ hg status -R auto-upgrade \ | |
2020 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2020 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2021 | > --config format.use-dirstate-v2=yes \ |
|
2021 | > --config format.use-dirstate-v2=yes \ | |
2022 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2022 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ | |
2023 | > --config format.use-dirstate-tracked-hint=no\ |
|
2023 | > --config format.use-dirstate-tracked-hint=no\ | |
2024 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2024 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ | |
2025 | > --config format.use-share-safe=yes |
|
2025 | > --config format.use-share-safe=yes | |
2026 | automatically upgrading repository to the `dirstate-v2` feature |
|
2026 | automatically upgrading repository to the `dirstate-v2` feature | |
2027 | (see `hg help config.format.use-dirstate-v2` for details) |
|
2027 | (see `hg help config.format.use-dirstate-v2` for details) | |
2028 | automatically upgrading repository to the `share-safe` feature |
|
2028 | automatically upgrading repository to the `share-safe` feature | |
2029 | (see `hg help config.format.use-share-safe` for details) |
|
2029 | (see `hg help config.format.use-share-safe` for details) | |
2030 | automatically downgrading repository from the `tracked-hint` feature |
|
2030 | automatically downgrading repository from the `tracked-hint` feature | |
2031 | (see `hg help config.format.use-dirstate-tracked-hint` for details) |
|
2031 | (see `hg help config.format.use-dirstate-tracked-hint` for details) | |
2032 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2032 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2033 | dirstate-v2: yes |
|
2033 | dirstate-v2: yes | |
2034 | tracked-hint: no |
|
2034 | tracked-hint: no | |
2035 | share-safe: yes |
|
2035 | share-safe: yes | |
2036 |
|
2036 | |||
2037 | Quiet upgrade and downgrade |
|
2037 | Quiet upgrade and downgrade | |
2038 | --------------------------- |
|
2038 | --------------------------- | |
2039 |
|
2039 | |||
2040 |
|
2040 | |||
2041 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2041 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2042 | dirstate-v2: yes |
|
2042 | dirstate-v2: yes | |
2043 | tracked-hint: no |
|
2043 | tracked-hint: no | |
2044 | share-safe: yes |
|
2044 | share-safe: yes | |
2045 | $ hg status -R auto-upgrade \ |
|
2045 | $ hg status -R auto-upgrade \ | |
2046 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2046 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2047 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2047 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2048 | > --config format.use-dirstate-v2=no \ |
|
2048 | > --config format.use-dirstate-v2=no \ | |
2049 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2049 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ | |
2050 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2050 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2051 | > --config format.use-dirstate-tracked-hint=yes \ |
|
2051 | > --config format.use-dirstate-tracked-hint=yes \ | |
2052 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2052 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ | |
2053 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2053 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2054 | > --config format.use-share-safe=no |
|
2054 | > --config format.use-share-safe=no | |
2055 |
|
2055 | |||
2056 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2056 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2057 | dirstate-v2: no |
|
2057 | dirstate-v2: no | |
2058 | tracked-hint: yes |
|
2058 | tracked-hint: yes | |
2059 | share-safe: no |
|
2059 | share-safe: no | |
2060 |
|
2060 | |||
2061 | $ hg status -R auto-upgrade \ |
|
2061 | $ hg status -R auto-upgrade \ | |
2062 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2062 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2063 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2063 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2064 | > --config format.use-dirstate-v2=yes \ |
|
2064 | > --config format.use-dirstate-v2=yes \ | |
2065 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2065 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories=yes \ | |
2066 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2066 | > --config format.use-dirstate-tracked-hint.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2067 | > --config format.use-dirstate-tracked-hint=no\ |
|
2067 | > --config format.use-dirstate-tracked-hint=no\ | |
2068 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2068 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories=yes \ | |
2069 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ |
|
2069 | > --config format.use-share-safe.automatic-upgrade-of-mismatching-repositories:quiet=yes \ | |
2070 | > --config format.use-share-safe=yes |
|
2070 | > --config format.use-share-safe=yes | |
2071 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' |
|
2071 | $ hg debugformat -R auto-upgrade | egrep '(dirstate-v2|tracked|share-safe)' | |
2072 | dirstate-v2: yes |
|
2072 | dirstate-v2: yes | |
2073 | tracked-hint: no |
|
2073 | tracked-hint: no | |
2074 | share-safe: yes |
|
2074 | share-safe: yes | |
2075 |
|
2075 | |||
2076 | Attempting Auto-upgrade on a read-only repository |
|
2076 | Attempting Auto-upgrade on a read-only repository | |
2077 | ------------------------------------------------- |
|
2077 | ------------------------------------------------- | |
2078 |
|
2078 | |||
2079 | $ chmod -R a-w auto-upgrade |
|
2079 | $ chmod -R a-w auto-upgrade | |
2080 |
|
2080 | |||
2081 | $ hg status -R auto-upgrade \ |
|
2081 | $ hg status -R auto-upgrade \ | |
2082 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2082 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2083 | > --config format.use-dirstate-v2=no |
|
2083 | > --config format.use-dirstate-v2=no | |
2084 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2084 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2085 | dirstate-v2: yes |
|
2085 | dirstate-v2: yes | |
2086 |
|
2086 | |||
2087 | $ chmod -R u+w auto-upgrade |
|
2087 | $ chmod -R u+w auto-upgrade | |
2088 |
|
2088 | |||
2089 | Attempting Auto-upgrade on a locked repository |
|
2089 | Attempting Auto-upgrade on a locked repository | |
2090 | ---------------------------------------------- |
|
2090 | ---------------------------------------------- | |
2091 |
|
2091 | |||
2092 | $ hg -R auto-upgrade debuglock --set-lock --quiet & |
|
2092 | $ hg -R auto-upgrade debuglock --set-lock --quiet & | |
2093 | $ echo $! >> $DAEMON_PIDS |
|
2093 | $ echo $! >> $DAEMON_PIDS | |
2094 | $ $RUNTESTDIR/testlib/wait-on-file 10 auto-upgrade/.hg/store/lock |
|
2094 | $ $RUNTESTDIR/testlib/wait-on-file 10 auto-upgrade/.hg/store/lock | |
2095 | $ hg status -R auto-upgrade \ |
|
2095 | $ hg status -R auto-upgrade \ | |
2096 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ |
|
2096 | > --config format.use-dirstate-v2.automatic-upgrade-of-mismatching-repositories=yes \ | |
2097 | > --config format.use-dirstate-v2=no |
|
2097 | > --config format.use-dirstate-v2=no | |
2098 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 |
|
2098 | $ hg debugformat -R auto-upgrade | grep dirstate-v2 | |
2099 | dirstate-v2: yes |
|
2099 | dirstate-v2: yes | |
2100 |
|
2100 | |||
2101 | $ killdaemons.py |
|
2101 | $ killdaemons.py |
General Comments 0
You need to be logged in to leave comments.
Login now