Show More
@@ -1,605 +1,621 b'' | |||
|
1 | 1 | # revlogutils/debug.py - utility used for revlog debuging |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2005-2007 Olivia Mackall <olivia@selenic.com> |
|
4 | 4 | # Copyright 2022 Octobus <contact@octobus.net> |
|
5 | 5 | # |
|
6 | 6 | # This software may be used and distributed according to the terms of the |
|
7 | 7 | # GNU General Public License version 2 or any later version. |
|
8 | 8 | |
|
9 | 9 | import collections |
|
10 | 10 | import string |
|
11 | 11 | |
|
12 | 12 | from .. import ( |
|
13 | 13 | node as nodemod, |
|
14 | 14 | util, |
|
15 | 15 | ) |
|
16 | 16 | |
|
17 | 17 | from . import ( |
|
18 | 18 | constants, |
|
19 | 19 | ) |
|
20 | 20 | |
|
21 | 21 | INDEX_ENTRY_DEBUG_COLUMN = [] |
|
22 | 22 | |
|
23 | 23 | NODE_SIZE = object() |
|
24 | 24 | |
|
25 | 25 | |
|
26 | 26 | class _column_base: |
|
27 | 27 | """constains the definition of a revlog column |
|
28 | 28 | |
|
29 | 29 | name: the column header, |
|
30 | 30 | value_func: the function called to get a value, |
|
31 | 31 | size: the width of the column, |
|
32 | 32 | verbose_only: only include the column in verbose mode. |
|
33 | 33 | """ |
|
34 | 34 | |
|
35 | 35 | def __init__(self, name, value_func, size=None, verbose=False): |
|
36 | 36 | self.name = name |
|
37 | 37 | self.value_func = value_func |
|
38 | 38 | if size is not NODE_SIZE: |
|
39 | 39 | if size is None: |
|
40 | 40 | size = 8 # arbitrary default |
|
41 | 41 | size = max(len(name), size) |
|
42 | 42 | self._size = size |
|
43 | 43 | self.verbose_only = verbose |
|
44 | 44 | |
|
45 | 45 | def get_size(self, node_size): |
|
46 | 46 | if self._size is NODE_SIZE: |
|
47 | 47 | return node_size |
|
48 | 48 | else: |
|
49 | 49 | return self._size |
|
50 | 50 | |
|
51 | 51 | |
|
52 | 52 | def debug_column(name, size=None, verbose=False): |
|
53 | 53 | """decorated function is registered as a column |
|
54 | 54 | |
|
55 | 55 | name: the name of the column, |
|
56 | 56 | size: the expected size of the column. |
|
57 | 57 | """ |
|
58 | 58 | |
|
59 | 59 | def register(func): |
|
60 | 60 | entry = _column_base( |
|
61 | 61 | name=name, |
|
62 | 62 | value_func=func, |
|
63 | 63 | size=size, |
|
64 | 64 | verbose=verbose, |
|
65 | 65 | ) |
|
66 | 66 | INDEX_ENTRY_DEBUG_COLUMN.append(entry) |
|
67 | 67 | return entry |
|
68 | 68 | |
|
69 | 69 | return register |
|
70 | 70 | |
|
71 | 71 | |
|
72 | 72 | @debug_column(b"rev", size=6) |
|
73 | 73 | def _rev(index, rev, entry, hexfn): |
|
74 | 74 | return b"%d" % rev |
|
75 | 75 | |
|
76 | 76 | |
|
77 | 77 | @debug_column(b"rank", size=6, verbose=True) |
|
78 | 78 | def rank(index, rev, entry, hexfn): |
|
79 | 79 | return b"%d" % entry[constants.ENTRY_RANK] |
|
80 | 80 | |
|
81 | 81 | |
|
82 | 82 | @debug_column(b"linkrev", size=6) |
|
83 | 83 | def _linkrev(index, rev, entry, hexfn): |
|
84 | 84 | return b"%d" % entry[constants.ENTRY_LINK_REV] |
|
85 | 85 | |
|
86 | 86 | |
|
87 | 87 | @debug_column(b"nodeid", size=NODE_SIZE) |
|
88 | 88 | def _nodeid(index, rev, entry, hexfn): |
|
89 | 89 | return hexfn(entry[constants.ENTRY_NODE_ID]) |
|
90 | 90 | |
|
91 | 91 | |
|
92 | 92 | @debug_column(b"p1-rev", size=6, verbose=True) |
|
93 | 93 | def _p1_rev(index, rev, entry, hexfn): |
|
94 | 94 | return b"%d" % entry[constants.ENTRY_PARENT_1] |
|
95 | 95 | |
|
96 | 96 | |
|
97 | 97 | @debug_column(b"p1-nodeid", size=NODE_SIZE) |
|
98 | 98 | def _p1_node(index, rev, entry, hexfn): |
|
99 | 99 | parent = entry[constants.ENTRY_PARENT_1] |
|
100 | 100 | p_entry = index[parent] |
|
101 | 101 | return hexfn(p_entry[constants.ENTRY_NODE_ID]) |
|
102 | 102 | |
|
103 | 103 | |
|
104 | 104 | @debug_column(b"p2-rev", size=6, verbose=True) |
|
105 | 105 | def _p2_rev(index, rev, entry, hexfn): |
|
106 | 106 | return b"%d" % entry[constants.ENTRY_PARENT_2] |
|
107 | 107 | |
|
108 | 108 | |
|
109 | 109 | @debug_column(b"p2-nodeid", size=NODE_SIZE) |
|
110 | 110 | def _p2_node(index, rev, entry, hexfn): |
|
111 | 111 | parent = entry[constants.ENTRY_PARENT_2] |
|
112 | 112 | p_entry = index[parent] |
|
113 | 113 | return hexfn(p_entry[constants.ENTRY_NODE_ID]) |
|
114 | 114 | |
|
115 | 115 | |
|
116 | 116 | @debug_column(b"full-size", size=20, verbose=True) |
|
117 | 117 | def full_size(index, rev, entry, hexfn): |
|
118 | 118 | return b"%d" % entry[constants.ENTRY_DATA_UNCOMPRESSED_LENGTH] |
|
119 | 119 | |
|
120 | 120 | |
|
121 | 121 | @debug_column(b"delta-base", size=6, verbose=True) |
|
122 | 122 | def delta_base(index, rev, entry, hexfn): |
|
123 | 123 | return b"%d" % entry[constants.ENTRY_DELTA_BASE] |
|
124 | 124 | |
|
125 | 125 | |
|
126 | 126 | @debug_column(b"flags", size=2, verbose=True) |
|
127 | 127 | def flags(index, rev, entry, hexfn): |
|
128 | 128 | field = entry[constants.ENTRY_DATA_OFFSET] |
|
129 | 129 | field &= 0xFFFF |
|
130 | 130 | return b"%d" % field |
|
131 | 131 | |
|
132 | 132 | |
|
133 | 133 | @debug_column(b"comp-mode", size=4, verbose=True) |
|
134 | 134 | def compression_mode(index, rev, entry, hexfn): |
|
135 | 135 | return b"%d" % entry[constants.ENTRY_DATA_COMPRESSION_MODE] |
|
136 | 136 | |
|
137 | 137 | |
|
138 | 138 | @debug_column(b"data-offset", size=20, verbose=True) |
|
139 | 139 | def data_offset(index, rev, entry, hexfn): |
|
140 | 140 | field = entry[constants.ENTRY_DATA_OFFSET] |
|
141 | 141 | field >>= 16 |
|
142 | 142 | return b"%d" % field |
|
143 | 143 | |
|
144 | 144 | |
|
145 | 145 | @debug_column(b"chunk-size", size=10, verbose=True) |
|
146 | 146 | def data_chunk_size(index, rev, entry, hexfn): |
|
147 | 147 | return b"%d" % entry[constants.ENTRY_DATA_COMPRESSED_LENGTH] |
|
148 | 148 | |
|
149 | 149 | |
|
150 | 150 | @debug_column(b"sd-comp-mode", size=7, verbose=True) |
|
151 | 151 | def sidedata_compression_mode(index, rev, entry, hexfn): |
|
152 | 152 | compression = entry[constants.ENTRY_SIDEDATA_COMPRESSION_MODE] |
|
153 | 153 | if compression == constants.COMP_MODE_PLAIN: |
|
154 | 154 | return b"plain" |
|
155 | 155 | elif compression == constants.COMP_MODE_DEFAULT: |
|
156 | 156 | return b"default" |
|
157 | 157 | elif compression == constants.COMP_MODE_INLINE: |
|
158 | 158 | return b"inline" |
|
159 | 159 | else: |
|
160 | 160 | return b"%d" % compression |
|
161 | 161 | |
|
162 | 162 | |
|
163 | 163 | @debug_column(b"sidedata-offset", size=20, verbose=True) |
|
164 | 164 | def sidedata_offset(index, rev, entry, hexfn): |
|
165 | 165 | return b"%d" % entry[constants.ENTRY_SIDEDATA_OFFSET] |
|
166 | 166 | |
|
167 | 167 | |
|
168 | 168 | @debug_column(b"sd-chunk-size", size=10, verbose=True) |
|
169 | 169 | def sidedata_chunk_size(index, rev, entry, hexfn): |
|
170 | 170 | return b"%d" % entry[constants.ENTRY_SIDEDATA_COMPRESSED_LENGTH] |
|
171 | 171 | |
|
172 | 172 | |
|
173 | 173 | def debug_index( |
|
174 | 174 | ui, |
|
175 | 175 | repo, |
|
176 | 176 | formatter, |
|
177 | 177 | revlog, |
|
178 | 178 | full_node, |
|
179 | 179 | ): |
|
180 | 180 | """display index data for a revlog""" |
|
181 | 181 | if full_node: |
|
182 | 182 | hexfn = nodemod.hex |
|
183 | 183 | else: |
|
184 | 184 | hexfn = nodemod.short |
|
185 | 185 | |
|
186 | 186 | idlen = 12 |
|
187 | 187 | for i in revlog: |
|
188 | 188 | idlen = len(hexfn(revlog.node(i))) |
|
189 | 189 | break |
|
190 | 190 | |
|
191 | 191 | fm = formatter |
|
192 | 192 | |
|
193 | 193 | header_pieces = [] |
|
194 | 194 | for column in INDEX_ENTRY_DEBUG_COLUMN: |
|
195 | 195 | if column.verbose_only and not ui.verbose: |
|
196 | 196 | continue |
|
197 | 197 | size = column.get_size(idlen) |
|
198 | 198 | name = column.name |
|
199 | 199 | header_pieces.append(name.rjust(size)) |
|
200 | 200 | |
|
201 | 201 | fm.plain(b' '.join(header_pieces) + b'\n') |
|
202 | 202 | |
|
203 | 203 | index = revlog.index |
|
204 | 204 | |
|
205 | 205 | for rev in revlog: |
|
206 | 206 | fm.startitem() |
|
207 | 207 | entry = index[rev] |
|
208 | 208 | first = True |
|
209 | 209 | for column in INDEX_ENTRY_DEBUG_COLUMN: |
|
210 | 210 | if column.verbose_only and not ui.verbose: |
|
211 | 211 | continue |
|
212 | 212 | if not first: |
|
213 | 213 | fm.plain(b' ') |
|
214 | 214 | first = False |
|
215 | 215 | |
|
216 | 216 | size = column.get_size(idlen) |
|
217 | 217 | value = column.value_func(index, rev, entry, hexfn) |
|
218 | 218 | display = b"%%%ds" % size |
|
219 | 219 | fm.write(column.name, display, value) |
|
220 | 220 | fm.plain(b'\n') |
|
221 | 221 | |
|
222 | 222 | fm.end() |
|
223 | 223 | |
|
224 | 224 | |
|
225 | 225 | def dump(ui, revlog): |
|
226 | 226 | """perform the work for `hg debugrevlog --dump""" |
|
227 | 227 | # XXX seems redundant with debug index ? |
|
228 | 228 | r = revlog |
|
229 | 229 | numrevs = len(r) |
|
230 | 230 | ui.write( |
|
231 | 231 | ( |
|
232 | 232 | b"# rev p1rev p2rev start end deltastart base p1 p2" |
|
233 | 233 | b" rawsize totalsize compression heads chainlen\n" |
|
234 | 234 | ) |
|
235 | 235 | ) |
|
236 | 236 | ts = 0 |
|
237 | 237 | heads = set() |
|
238 | 238 | |
|
239 | 239 | for rev in range(numrevs): |
|
240 | 240 | dbase = r.deltaparent(rev) |
|
241 | 241 | if dbase == -1: |
|
242 | 242 | dbase = rev |
|
243 | 243 | cbase = r.chainbase(rev) |
|
244 | 244 | clen = r.chainlen(rev) |
|
245 | 245 | p1, p2 = r.parentrevs(rev) |
|
246 | 246 | rs = r.rawsize(rev) |
|
247 | 247 | ts = ts + rs |
|
248 | 248 | heads -= set(r.parentrevs(rev)) |
|
249 | 249 | heads.add(rev) |
|
250 | 250 | try: |
|
251 | 251 | compression = ts / r.end(rev) |
|
252 | 252 | except ZeroDivisionError: |
|
253 | 253 | compression = 0 |
|
254 | 254 | ui.write( |
|
255 | 255 | b"%5d %5d %5d %5d %5d %10d %4d %4d %4d %7d %9d " |
|
256 | 256 | b"%11d %5d %8d\n" |
|
257 | 257 | % ( |
|
258 | 258 | rev, |
|
259 | 259 | p1, |
|
260 | 260 | p2, |
|
261 | 261 | r.start(rev), |
|
262 | 262 | r.end(rev), |
|
263 | 263 | r.start(dbase), |
|
264 | 264 | r.start(cbase), |
|
265 | 265 | r.start(p1), |
|
266 | 266 | r.start(p2), |
|
267 | 267 | rs, |
|
268 | 268 | ts, |
|
269 | 269 | compression, |
|
270 | 270 | len(heads), |
|
271 | 271 | clen, |
|
272 | 272 | ) |
|
273 | 273 | ) |
|
274 | 274 | |
|
275 | 275 | |
|
276 | 276 | def debug_revlog(ui, revlog): |
|
277 | 277 | """code for `hg debugrevlog`""" |
|
278 | 278 | r = revlog |
|
279 | 279 | format = r._format_version |
|
280 | 280 | v = r._format_flags |
|
281 | 281 | flags = [] |
|
282 | 282 | gdelta = False |
|
283 | 283 | if v & constants.FLAG_INLINE_DATA: |
|
284 | 284 | flags.append(b'inline') |
|
285 | 285 | if v & constants.FLAG_GENERALDELTA: |
|
286 | 286 | gdelta = True |
|
287 | 287 | flags.append(b'generaldelta') |
|
288 | 288 | if not flags: |
|
289 | 289 | flags = [b'(none)'] |
|
290 | 290 | |
|
291 | ### the total size of stored content if incompressed. | |
|
292 | full_text_total_size = 0 | |
|
291 | 293 | ### tracks merge vs single parent |
|
292 | 294 | nummerges = 0 |
|
293 | 295 | |
|
294 | 296 | ### tracks ways the "delta" are build |
|
295 | 297 | # nodelta |
|
296 | 298 | numempty = 0 |
|
297 | 299 | numemptytext = 0 |
|
298 | 300 | numemptydelta = 0 |
|
299 | 301 | # full file content |
|
300 | 302 | numfull = 0 |
|
301 | 303 | # intermediate snapshot against a prior snapshot |
|
302 | 304 | numsemi = 0 |
|
303 | 305 | # snapshot count per depth |
|
304 | 306 | numsnapdepth = collections.defaultdict(lambda: 0) |
|
305 | 307 | # number of snapshots with a non-ancestor delta |
|
306 | 308 | numsnapdepth_nad = collections.defaultdict(lambda: 0) |
|
307 | 309 | # delta against previous revision |
|
308 | 310 | numprev = 0 |
|
309 | 311 | # delta against prev, where prev is a non-ancestor |
|
310 | 312 | numprev_nad = 0 |
|
311 | 313 | # delta against first or second parent (not prev) |
|
312 | 314 | nump1 = 0 |
|
313 | 315 | nump2 = 0 |
|
314 | 316 | # delta against neither prev nor parents |
|
315 | 317 | numother = 0 |
|
316 | 318 | # delta against other that is a non-ancestor |
|
317 | 319 | numother_nad = 0 |
|
318 | 320 | # delta against prev that are also first or second parent |
|
319 | 321 | # (details of `numprev`) |
|
320 | 322 | nump1prev = 0 |
|
321 | 323 | nump2prev = 0 |
|
322 | 324 | |
|
323 | 325 | # data about delta chain of each revs |
|
324 | 326 | chainlengths = [] |
|
325 | 327 | chainbases = [] |
|
326 | 328 | chainspans = [] |
|
327 | 329 | |
|
328 | 330 | # data about each revision |
|
329 | 331 | datasize = [None, 0, 0] |
|
330 | 332 | fullsize = [None, 0, 0] |
|
331 | 333 | semisize = [None, 0, 0] |
|
332 | 334 | # snapshot count per depth |
|
333 | 335 | snapsizedepth = collections.defaultdict(lambda: [None, 0, 0]) |
|
334 | 336 | deltasize = [None, 0, 0] |
|
335 | 337 | chunktypecounts = {} |
|
336 | 338 | chunktypesizes = {} |
|
337 | 339 | |
|
338 | 340 | def addsize(size, l): |
|
339 | 341 | if l[0] is None or size < l[0]: |
|
340 | 342 | l[0] = size |
|
341 | 343 | if size > l[1]: |
|
342 | 344 | l[1] = size |
|
343 | 345 | l[2] += size |
|
344 | 346 | |
|
345 | 347 | numrevs = len(r) |
|
346 | 348 | for rev in range(numrevs): |
|
347 | 349 | p1, p2 = r.parentrevs(rev) |
|
348 | 350 | delta = r.deltaparent(rev) |
|
349 | 351 | if format > 0: |
|
350 |
|
|
|
352 | s = r.rawsize(rev) | |
|
353 | full_text_total_size += s | |
|
354 | addsize(s, datasize) | |
|
351 | 355 | if p2 != nodemod.nullrev: |
|
352 | 356 | nummerges += 1 |
|
353 | 357 | size = r.length(rev) |
|
354 | 358 | if delta == nodemod.nullrev: |
|
355 | 359 | chainlengths.append(0) |
|
356 | 360 | chainbases.append(r.start(rev)) |
|
357 | 361 | chainspans.append(size) |
|
358 | 362 | if size == 0: |
|
359 | 363 | numempty += 1 |
|
360 | 364 | numemptytext += 1 |
|
361 | 365 | else: |
|
362 | 366 | numfull += 1 |
|
363 | 367 | numsnapdepth[0] += 1 |
|
364 | 368 | addsize(size, fullsize) |
|
365 | 369 | addsize(size, snapsizedepth[0]) |
|
366 | 370 | else: |
|
367 | 371 | nad = ( |
|
368 | 372 | delta != p1 and delta != p2 and not r.isancestorrev(delta, rev) |
|
369 | 373 | ) |
|
370 | 374 | chainlengths.append(chainlengths[delta] + 1) |
|
371 | 375 | baseaddr = chainbases[delta] |
|
372 | 376 | revaddr = r.start(rev) |
|
373 | 377 | chainbases.append(baseaddr) |
|
374 | 378 | chainspans.append((revaddr - baseaddr) + size) |
|
375 | 379 | if size == 0: |
|
376 | 380 | numempty += 1 |
|
377 | 381 | numemptydelta += 1 |
|
378 | 382 | elif r.issnapshot(rev): |
|
379 | 383 | addsize(size, semisize) |
|
380 | 384 | numsemi += 1 |
|
381 | 385 | depth = r.snapshotdepth(rev) |
|
382 | 386 | numsnapdepth[depth] += 1 |
|
383 | 387 | if nad: |
|
384 | 388 | numsnapdepth_nad[depth] += 1 |
|
385 | 389 | addsize(size, snapsizedepth[depth]) |
|
386 | 390 | else: |
|
387 | 391 | addsize(size, deltasize) |
|
388 | 392 | if delta == rev - 1: |
|
389 | 393 | numprev += 1 |
|
390 | 394 | if delta == p1: |
|
391 | 395 | nump1prev += 1 |
|
392 | 396 | elif delta == p2: |
|
393 | 397 | nump2prev += 1 |
|
394 | 398 | elif nad: |
|
395 | 399 | numprev_nad += 1 |
|
396 | 400 | elif delta == p1: |
|
397 | 401 | nump1 += 1 |
|
398 | 402 | elif delta == p2: |
|
399 | 403 | nump2 += 1 |
|
400 | 404 | elif delta != nodemod.nullrev: |
|
401 | 405 | numother += 1 |
|
402 | 406 | numother_nad += 1 |
|
403 | 407 | |
|
404 | 408 | # Obtain data on the raw chunks in the revlog. |
|
405 | 409 | if util.safehasattr(r, '_getsegmentforrevs'): |
|
406 | 410 | segment = r._getsegmentforrevs(rev, rev)[1] |
|
407 | 411 | else: |
|
408 | 412 | segment = r._revlog._getsegmentforrevs(rev, rev)[1] |
|
409 | 413 | if segment: |
|
410 | 414 | chunktype = bytes(segment[0:1]) |
|
411 | 415 | else: |
|
412 | 416 | chunktype = b'empty' |
|
413 | 417 | |
|
414 | 418 | if chunktype not in chunktypecounts: |
|
415 | 419 | chunktypecounts[chunktype] = 0 |
|
416 | 420 | chunktypesizes[chunktype] = 0 |
|
417 | 421 | |
|
418 | 422 | chunktypecounts[chunktype] += 1 |
|
419 | 423 | chunktypesizes[chunktype] += size |
|
420 | 424 | |
|
421 | 425 | # Adjust size min value for empty cases |
|
422 | 426 | for size in (datasize, fullsize, semisize, deltasize): |
|
423 | 427 | if size[0] is None: |
|
424 | 428 | size[0] = 0 |
|
425 | 429 | |
|
426 | 430 | numdeltas = numrevs - numfull - numempty - numsemi |
|
427 | 431 | numoprev = numprev - nump1prev - nump2prev - numprev_nad |
|
428 | 432 | num_other_ancestors = numother - numother_nad |
|
429 | 433 | totalrawsize = datasize[2] |
|
430 | 434 | datasize[2] /= numrevs |
|
431 | 435 | fulltotal = fullsize[2] |
|
432 | 436 | if numfull == 0: |
|
433 | 437 | fullsize[2] = 0 |
|
434 | 438 | else: |
|
435 | 439 | fullsize[2] /= numfull |
|
436 | 440 | semitotal = semisize[2] |
|
437 | 441 | snaptotal = {} |
|
438 | 442 | if numsemi > 0: |
|
439 | 443 | semisize[2] /= numsemi |
|
440 | 444 | for depth in snapsizedepth: |
|
441 | 445 | snaptotal[depth] = snapsizedepth[depth][2] |
|
442 | 446 | snapsizedepth[depth][2] /= numsnapdepth[depth] |
|
443 | 447 | |
|
444 | 448 | deltatotal = deltasize[2] |
|
445 | 449 | if numdeltas > 0: |
|
446 | 450 | deltasize[2] /= numdeltas |
|
447 | 451 | totalsize = fulltotal + semitotal + deltatotal |
|
448 | 452 | avgchainlen = sum(chainlengths) / numrevs |
|
449 | 453 | maxchainlen = max(chainlengths) |
|
450 | 454 | maxchainspan = max(chainspans) |
|
451 | 455 | compratio = 1 |
|
452 | 456 | if totalsize: |
|
453 | 457 | compratio = totalrawsize / totalsize |
|
454 | 458 | |
|
455 | 459 | basedfmtstr = b'%%%dd\n' |
|
456 | 460 | basepcfmtstr = b'%%%dd %s(%%5.2f%%%%)\n' |
|
457 | 461 | |
|
458 | 462 | def dfmtstr(max): |
|
459 | 463 | return basedfmtstr % len(str(max)) |
|
460 | 464 | |
|
461 | 465 | def pcfmtstr(max, padding=0): |
|
462 | 466 | return basepcfmtstr % (len(str(max)), b' ' * padding) |
|
463 | 467 | |
|
464 | 468 | def pcfmt(value, total): |
|
465 | 469 | if total: |
|
466 | 470 | return (value, 100 * float(value) / total) |
|
467 | 471 | else: |
|
468 | 472 | return value, 100.0 |
|
469 | 473 | |
|
470 | 474 | ui.writenoi18n(b'format : %d\n' % format) |
|
471 | 475 | ui.writenoi18n(b'flags : %s\n' % b', '.join(flags)) |
|
472 | 476 | |
|
473 | 477 | ui.write(b'\n') |
|
474 | 478 | fmt = pcfmtstr(totalsize) |
|
475 | 479 | fmt2 = dfmtstr(totalsize) |
|
476 | 480 | ui.writenoi18n(b'revisions : ' + fmt2 % numrevs) |
|
477 | 481 | ui.writenoi18n(b' merges : ' + fmt % pcfmt(nummerges, numrevs)) |
|
478 | 482 | ui.writenoi18n( |
|
479 | 483 | b' normal : ' + fmt % pcfmt(numrevs - nummerges, numrevs) |
|
480 | 484 | ) |
|
481 | 485 | ui.writenoi18n(b'revisions : ' + fmt2 % numrevs) |
|
482 | 486 | ui.writenoi18n(b' empty : ' + fmt % pcfmt(numempty, numrevs)) |
|
483 | 487 | ui.writenoi18n( |
|
484 | 488 | b' text : ' |
|
485 | 489 | + fmt % pcfmt(numemptytext, numemptytext + numemptydelta) |
|
486 | 490 | ) |
|
487 | 491 | ui.writenoi18n( |
|
488 | 492 | b' delta : ' |
|
489 | 493 | + fmt % pcfmt(numemptydelta, numemptytext + numemptydelta) |
|
490 | 494 | ) |
|
491 | 495 | ui.writenoi18n( |
|
492 | 496 | b' snapshot : ' + fmt % pcfmt(numfull + numsemi, numrevs) |
|
493 | 497 | ) |
|
494 | 498 | for depth in sorted(numsnapdepth): |
|
495 | 499 | base = b' lvl-%-3d : ' % depth |
|
496 | 500 | count = fmt % pcfmt(numsnapdepth[depth], numrevs) |
|
497 | 501 | pieces = [base, count] |
|
498 | 502 | if numsnapdepth_nad[depth]: |
|
499 | 503 | pieces[-1] = count = count[:-1] # drop the final '\n' |
|
500 | 504 | more = b' non-ancestor-bases: ' |
|
501 | 505 | anc_count = fmt |
|
502 | 506 | anc_count %= pcfmt(numsnapdepth_nad[depth], numsnapdepth[depth]) |
|
503 | 507 | pieces.append(more) |
|
504 | 508 | pieces.append(anc_count) |
|
505 | 509 | ui.write(b''.join(pieces)) |
|
506 | 510 | ui.writenoi18n(b' deltas : ' + fmt % pcfmt(numdeltas, numrevs)) |
|
507 | 511 | ui.writenoi18n(b'revision size : ' + fmt2 % totalsize) |
|
508 | 512 | ui.writenoi18n( |
|
509 | 513 | b' snapshot : ' + fmt % pcfmt(fulltotal + semitotal, totalsize) |
|
510 | 514 | ) |
|
511 | 515 | for depth in sorted(numsnapdepth): |
|
512 | 516 | ui.write( |
|
513 | 517 | (b' lvl-%-3d : ' % depth) |
|
514 | 518 | + fmt % pcfmt(snaptotal[depth], totalsize) |
|
515 | 519 | ) |
|
516 | 520 | ui.writenoi18n(b' deltas : ' + fmt % pcfmt(deltatotal, totalsize)) |
|
517 | 521 | |
|
518 | 522 | letters = string.ascii_letters.encode('ascii') |
|
519 | 523 | |
|
520 | 524 | def fmtchunktype(chunktype): |
|
521 | 525 | if chunktype == b'empty': |
|
522 | 526 | return b' %s : ' % chunktype |
|
523 | 527 | elif chunktype in letters: |
|
524 | 528 | return b' 0x%s (%s) : ' % (nodemod.hex(chunktype), chunktype) |
|
525 | 529 | else: |
|
526 | 530 | return b' 0x%s : ' % nodemod.hex(chunktype) |
|
527 | 531 | |
|
528 | 532 | ui.write(b'\n') |
|
529 | 533 | ui.writenoi18n(b'chunks : ' + fmt2 % numrevs) |
|
530 | 534 | for chunktype in sorted(chunktypecounts): |
|
531 | 535 | ui.write(fmtchunktype(chunktype)) |
|
532 | 536 | ui.write(fmt % pcfmt(chunktypecounts[chunktype], numrevs)) |
|
533 | 537 | ui.writenoi18n(b'chunks size : ' + fmt2 % totalsize) |
|
534 | 538 | for chunktype in sorted(chunktypecounts): |
|
535 | 539 | ui.write(fmtchunktype(chunktype)) |
|
536 | 540 | ui.write(fmt % pcfmt(chunktypesizes[chunktype], totalsize)) |
|
537 | 541 | |
|
538 | 542 | ui.write(b'\n') |
|
543 | b_total = b"%d" % full_text_total_size | |
|
544 | p_total = [] | |
|
545 | while len(b_total) > 3: | |
|
546 | p_total.append(b_total[-3:]) | |
|
547 | b_total = b_total[:-3] | |
|
548 | p_total.append(b_total) | |
|
549 | p_total.reverse() | |
|
550 | b_total = b' '.join(p_total) | |
|
551 | ||
|
552 | ui.write(b'\n') | |
|
553 | ui.writenoi18n(b'total-stored-content: %s bytes\n' % b_total) | |
|
554 | ui.write(b'\n') | |
|
539 | 555 | fmt = dfmtstr(max(avgchainlen, maxchainlen, maxchainspan, compratio)) |
|
540 | 556 | ui.writenoi18n(b'avg chain length : ' + fmt % avgchainlen) |
|
541 | 557 | ui.writenoi18n(b'max chain length : ' + fmt % maxchainlen) |
|
542 | 558 | ui.writenoi18n(b'max chain reach : ' + fmt % maxchainspan) |
|
543 | 559 | ui.writenoi18n(b'compression ratio : ' + fmt % compratio) |
|
544 | 560 | |
|
545 | 561 | if format > 0: |
|
546 | 562 | ui.write(b'\n') |
|
547 | 563 | ui.writenoi18n( |
|
548 | 564 | b'uncompressed data size (min/max/avg) : %d / %d / %d\n' |
|
549 | 565 | % tuple(datasize) |
|
550 | 566 | ) |
|
551 | 567 | ui.writenoi18n( |
|
552 | 568 | b'full revision size (min/max/avg) : %d / %d / %d\n' |
|
553 | 569 | % tuple(fullsize) |
|
554 | 570 | ) |
|
555 | 571 | ui.writenoi18n( |
|
556 | 572 | b'inter-snapshot size (min/max/avg) : %d / %d / %d\n' |
|
557 | 573 | % tuple(semisize) |
|
558 | 574 | ) |
|
559 | 575 | for depth in sorted(snapsizedepth): |
|
560 | 576 | if depth == 0: |
|
561 | 577 | continue |
|
562 | 578 | ui.writenoi18n( |
|
563 | 579 | b' level-%-3d (min/max/avg) : %d / %d / %d\n' |
|
564 | 580 | % ((depth,) + tuple(snapsizedepth[depth])) |
|
565 | 581 | ) |
|
566 | 582 | ui.writenoi18n( |
|
567 | 583 | b'delta size (min/max/avg) : %d / %d / %d\n' |
|
568 | 584 | % tuple(deltasize) |
|
569 | 585 | ) |
|
570 | 586 | |
|
571 | 587 | if numdeltas > 0: |
|
572 | 588 | ui.write(b'\n') |
|
573 | 589 | fmt = pcfmtstr(numdeltas) |
|
574 | 590 | fmt2 = pcfmtstr(numdeltas, 4) |
|
575 | 591 | ui.writenoi18n( |
|
576 | 592 | b'deltas against prev : ' + fmt % pcfmt(numprev, numdeltas) |
|
577 | 593 | ) |
|
578 | 594 | if numprev > 0: |
|
579 | 595 | ui.writenoi18n( |
|
580 | 596 | b' where prev = p1 : ' + fmt2 % pcfmt(nump1prev, numprev) |
|
581 | 597 | ) |
|
582 | 598 | ui.writenoi18n( |
|
583 | 599 | b' where prev = p2 : ' + fmt2 % pcfmt(nump2prev, numprev) |
|
584 | 600 | ) |
|
585 | 601 | ui.writenoi18n( |
|
586 | 602 | b' other-ancestor : ' + fmt2 % pcfmt(numoprev, numprev) |
|
587 | 603 | ) |
|
588 | 604 | ui.writenoi18n( |
|
589 | 605 | b' unrelated : ' + fmt2 % pcfmt(numoprev, numprev) |
|
590 | 606 | ) |
|
591 | 607 | if gdelta: |
|
592 | 608 | ui.writenoi18n( |
|
593 | 609 | b'deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas) |
|
594 | 610 | ) |
|
595 | 611 | ui.writenoi18n( |
|
596 | 612 | b'deltas against p2 : ' + fmt % pcfmt(nump2, numdeltas) |
|
597 | 613 | ) |
|
598 | 614 | ui.writenoi18n( |
|
599 | 615 | b'deltas against ancs : ' |
|
600 | 616 | + fmt % pcfmt(num_other_ancestors, numdeltas) |
|
601 | 617 | ) |
|
602 | 618 | ui.writenoi18n( |
|
603 | 619 | b'deltas against other : ' |
|
604 | 620 | + fmt % pcfmt(numother_nad, numdeltas) |
|
605 | 621 | ) |
@@ -1,717 +1,726 b'' | |||
|
1 | 1 | $ cat << EOF >> $HGRCPATH |
|
2 | 2 | > [ui] |
|
3 | 3 | > interactive=yes |
|
4 | 4 | > EOF |
|
5 | 5 | |
|
6 | 6 | $ hg init debugrevlog |
|
7 | 7 | $ cd debugrevlog |
|
8 | 8 | $ echo a > a |
|
9 | 9 | $ hg ci -Am adda |
|
10 | 10 | adding a |
|
11 | 11 | $ hg rm . |
|
12 | 12 | removing a |
|
13 | 13 | $ hg ci -Am make-it-empty |
|
14 | 14 | $ hg revert --all -r 0 |
|
15 | 15 | adding a |
|
16 | 16 | $ hg ci -Am make-it-full |
|
17 | 17 | #if reporevlogstore |
|
18 | 18 | $ hg debugrevlog -c |
|
19 | 19 | format : 1 |
|
20 | 20 | flags : inline |
|
21 | 21 | |
|
22 | 22 | revisions : 3 |
|
23 | 23 | merges : 0 ( 0.00%) |
|
24 | 24 | normal : 3 (100.00%) |
|
25 | 25 | revisions : 3 |
|
26 | 26 | empty : 0 ( 0.00%) |
|
27 | 27 | text : 0 (100.00%) |
|
28 | 28 | delta : 0 (100.00%) |
|
29 | 29 | snapshot : 3 (100.00%) |
|
30 | 30 | lvl-0 : 3 (100.00%) |
|
31 | 31 | deltas : 0 ( 0.00%) |
|
32 | 32 | revision size : 191 |
|
33 | 33 | snapshot : 191 (100.00%) |
|
34 | 34 | lvl-0 : 191 (100.00%) |
|
35 | 35 | deltas : 0 ( 0.00%) |
|
36 | 36 | |
|
37 | 37 | chunks : 3 |
|
38 | 38 | 0x75 (u) : 3 (100.00%) |
|
39 | 39 | chunks size : 191 |
|
40 | 40 | 0x75 (u) : 191 (100.00%) |
|
41 | 41 | |
|
42 | ||
|
43 | total-stored-content: 188 bytes | |
|
44 | ||
|
42 | 45 | avg chain length : 0 |
|
43 | 46 | max chain length : 0 |
|
44 | 47 | max chain reach : 67 |
|
45 | 48 | compression ratio : 0 |
|
46 | 49 | |
|
47 | 50 | uncompressed data size (min/max/avg) : 57 / 66 / 62 |
|
48 | 51 | full revision size (min/max/avg) : 58 / 67 / 63 |
|
49 | 52 | inter-snapshot size (min/max/avg) : 0 / 0 / 0 |
|
50 | 53 | delta size (min/max/avg) : 0 / 0 / 0 |
|
51 | 54 | $ hg debugrevlog -m |
|
52 | 55 | format : 1 |
|
53 | 56 | flags : inline, generaldelta |
|
54 | 57 | |
|
55 | 58 | revisions : 3 |
|
56 | 59 | merges : 0 ( 0.00%) |
|
57 | 60 | normal : 3 (100.00%) |
|
58 | 61 | revisions : 3 |
|
59 | 62 | empty : 1 (33.33%) |
|
60 | 63 | text : 1 (100.00%) |
|
61 | 64 | delta : 0 ( 0.00%) |
|
62 | 65 | snapshot : 2 (66.67%) |
|
63 | 66 | lvl-0 : 2 (66.67%) |
|
64 | 67 | deltas : 0 ( 0.00%) |
|
65 | 68 | revision size : 88 |
|
66 | 69 | snapshot : 88 (100.00%) |
|
67 | 70 | lvl-0 : 88 (100.00%) |
|
68 | 71 | deltas : 0 ( 0.00%) |
|
69 | 72 | |
|
70 | 73 | chunks : 3 |
|
71 | 74 | empty : 1 (33.33%) |
|
72 | 75 | 0x75 (u) : 2 (66.67%) |
|
73 | 76 | chunks size : 88 |
|
74 | 77 | empty : 0 ( 0.00%) |
|
75 | 78 | 0x75 (u) : 88 (100.00%) |
|
76 | 79 | |
|
80 | ||
|
81 | total-stored-content: 86 bytes | |
|
82 | ||
|
77 | 83 | avg chain length : 0 |
|
78 | 84 | max chain length : 0 |
|
79 | 85 | max chain reach : 44 |
|
80 | 86 | compression ratio : 0 |
|
81 | 87 | |
|
82 | 88 | uncompressed data size (min/max/avg) : 0 / 43 / 28 |
|
83 | 89 | full revision size (min/max/avg) : 44 / 44 / 44 |
|
84 | 90 | inter-snapshot size (min/max/avg) : 0 / 0 / 0 |
|
85 | 91 | delta size (min/max/avg) : 0 / 0 / 0 |
|
86 | 92 | $ hg debugrevlog a |
|
87 | 93 | format : 1 |
|
88 | 94 | flags : inline, generaldelta |
|
89 | 95 | |
|
90 | 96 | revisions : 1 |
|
91 | 97 | merges : 0 ( 0.00%) |
|
92 | 98 | normal : 1 (100.00%) |
|
93 | 99 | revisions : 1 |
|
94 | 100 | empty : 0 ( 0.00%) |
|
95 | 101 | text : 0 (100.00%) |
|
96 | 102 | delta : 0 (100.00%) |
|
97 | 103 | snapshot : 1 (100.00%) |
|
98 | 104 | lvl-0 : 1 (100.00%) |
|
99 | 105 | deltas : 0 ( 0.00%) |
|
100 | 106 | revision size : 3 |
|
101 | 107 | snapshot : 3 (100.00%) |
|
102 | 108 | lvl-0 : 3 (100.00%) |
|
103 | 109 | deltas : 0 ( 0.00%) |
|
104 | 110 | |
|
105 | 111 | chunks : 1 |
|
106 | 112 | 0x75 (u) : 1 (100.00%) |
|
107 | 113 | chunks size : 3 |
|
108 | 114 | 0x75 (u) : 3 (100.00%) |
|
109 | 115 | |
|
116 | ||
|
117 | total-stored-content: 2 bytes | |
|
118 | ||
|
110 | 119 | avg chain length : 0 |
|
111 | 120 | max chain length : 0 |
|
112 | 121 | max chain reach : 3 |
|
113 | 122 | compression ratio : 0 |
|
114 | 123 | |
|
115 | 124 | uncompressed data size (min/max/avg) : 2 / 2 / 2 |
|
116 | 125 | full revision size (min/max/avg) : 3 / 3 / 3 |
|
117 | 126 | inter-snapshot size (min/max/avg) : 0 / 0 / 0 |
|
118 | 127 | delta size (min/max/avg) : 0 / 0 / 0 |
|
119 | 128 | #endif |
|
120 | 129 | |
|
121 | 130 | Test debugindex, with and without the --verbose/--debug flag |
|
122 | 131 | $ hg debugrevlogindex a |
|
123 | 132 | rev linkrev nodeid p1 p2 |
|
124 | 133 | 0 0 b789fdd96dc2 000000000000 000000000000 |
|
125 | 134 | |
|
126 | 135 | #if no-reposimplestore |
|
127 | 136 | $ hg --verbose debugrevlogindex a |
|
128 | 137 | rev offset length linkrev nodeid p1 p2 |
|
129 | 138 | 0 0 3 0 b789fdd96dc2 000000000000 000000000000 |
|
130 | 139 | |
|
131 | 140 | $ hg --debug debugrevlogindex a |
|
132 | 141 | rev offset length linkrev nodeid p1 p2 |
|
133 | 142 | 0 0 3 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
|
134 | 143 | #endif |
|
135 | 144 | |
|
136 | 145 | $ hg debugrevlogindex -f 1 a |
|
137 | 146 | rev flag size link p1 p2 nodeid |
|
138 | 147 | 0 0000 2 0 -1 -1 b789fdd96dc2 |
|
139 | 148 | |
|
140 | 149 | #if no-reposimplestore |
|
141 | 150 | $ hg --verbose debugrevlogindex -f 1 a |
|
142 | 151 | rev flag offset length size link p1 p2 nodeid |
|
143 | 152 | 0 0000 0 3 2 0 -1 -1 b789fdd96dc2 |
|
144 | 153 | |
|
145 | 154 | $ hg --debug debugrevlogindex -f 1 a |
|
146 | 155 | rev flag offset length size link p1 p2 nodeid |
|
147 | 156 | 0 0000 0 3 2 0 -1 -1 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
148 | 157 | #endif |
|
149 | 158 | |
|
150 | 159 | $ hg debugindex -c |
|
151 | 160 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
152 | 161 | 0 0 07f494440405 000000000000 000000000000 |
|
153 | 162 | 1 1 8cccb4b5fec2 07f494440405 000000000000 |
|
154 | 163 | 2 2 b1e228c512c5 8cccb4b5fec2 000000000000 |
|
155 | 164 | $ hg debugindex -c --debug |
|
156 | 165 | rev rank linkrev nodeid p1-rev p1-nodeid p2-rev p2-nodeid full-size delta-base flags comp-mode data-offset chunk-size sd-comp-mode sidedata-offset sd-chunk-size |
|
157 | 166 | 0 -1 0 07f4944404050f47db2e5c5071e0e84e7a27bba9 -1 0000000000000000000000000000000000000000 -1 0000000000000000000000000000000000000000 57 0 0 2 0 58 inline 0 0 |
|
158 | 167 | 1 -1 1 8cccb4b5fec20cafeb99dd01c26d4dee8ea4388a 0 07f4944404050f47db2e5c5071e0e84e7a27bba9 -1 0000000000000000000000000000000000000000 66 1 0 2 58 67 inline 0 0 |
|
159 | 168 | 2 -1 2 b1e228c512c5d7066d70562ed839c3323a62d6d2 1 8cccb4b5fec20cafeb99dd01c26d4dee8ea4388a -1 0000000000000000000000000000000000000000 65 2 0 2 125 66 inline 0 0 |
|
160 | 169 | $ hg debugindex -m |
|
161 | 170 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
162 | 171 | 0 0 a0c8bcbbb45c 000000000000 000000000000 |
|
163 | 172 | 1 1 57faf8a737ae a0c8bcbbb45c 000000000000 |
|
164 | 173 | 2 2 a35b10320954 57faf8a737ae 000000000000 |
|
165 | 174 | $ hg debugindex -m --debug |
|
166 | 175 | rev rank linkrev nodeid p1-rev p1-nodeid p2-rev p2-nodeid full-size delta-base flags comp-mode data-offset chunk-size sd-comp-mode sidedata-offset sd-chunk-size |
|
167 | 176 | 0 -1 0 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 -1 0000000000000000000000000000000000000000 -1 0000000000000000000000000000000000000000 43 0 0 2 0 44 inline 0 0 |
|
168 | 177 | 1 -1 1 57faf8a737ae7faf490582941a82319ba6529dca 0 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 -1 0000000000000000000000000000000000000000 0 1 0 2 44 0 inline 0 0 |
|
169 | 178 | 2 -1 2 a35b103209548032201c16c7688cb2657f037a38 1 57faf8a737ae7faf490582941a82319ba6529dca -1 0000000000000000000000000000000000000000 43 2 0 2 44 44 inline 0 0 |
|
170 | 179 | $ hg debugindex a |
|
171 | 180 | rev linkrev nodeid p1-nodeid p2-nodeid |
|
172 | 181 | 0 0 b789fdd96dc2 000000000000 000000000000 |
|
173 | 182 | $ hg debugindex --debug a |
|
174 | 183 | rev rank linkrev nodeid p1-rev p1-nodeid p2-rev p2-nodeid full-size delta-base flags comp-mode data-offset chunk-size sd-comp-mode sidedata-offset sd-chunk-size |
|
175 | 184 | 0 -1 0 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 -1 0000000000000000000000000000000000000000 -1 0000000000000000000000000000000000000000 2 0 0 2 0 3 inline 0 0 |
|
176 | 185 | |
|
177 | 186 | debugdelta chain basic output |
|
178 | 187 | |
|
179 | 188 | #if reporevlogstore pure |
|
180 | 189 | $ hg debugindexstats |
|
181 | 190 | abort: debugindexstats only works with native code |
|
182 | 191 | [255] |
|
183 | 192 | #endif |
|
184 | 193 | #if reporevlogstore no-pure |
|
185 | 194 | $ hg debugindexstats |
|
186 | 195 | node trie capacity: 4 |
|
187 | 196 | node trie count: 2 |
|
188 | 197 | node trie depth: 1 |
|
189 | 198 | node trie last rev scanned: -1 (no-rust !) |
|
190 | 199 | node trie last rev scanned: 3 (rust !) |
|
191 | 200 | node trie lookups: 4 (no-rust !) |
|
192 | 201 | node trie lookups: 2 (rust !) |
|
193 | 202 | node trie misses: 1 |
|
194 | 203 | node trie splits: 1 |
|
195 | 204 | revs in memory: 3 |
|
196 | 205 | #endif |
|
197 | 206 | |
|
198 | 207 | #if reporevlogstore no-pure |
|
199 | 208 | $ hg debugdeltachain -m |
|
200 | 209 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
201 | 210 | 0 -1 -1 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1 |
|
202 | 211 | 1 0 -1 2 1 -1 base 0 0 0 0.00000 0 0 0.00000 0 0 1.00000 1 |
|
203 | 212 | 2 1 -1 3 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1 |
|
204 | 213 | |
|
205 | 214 | $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n' |
|
206 | 215 | 0 1 1 |
|
207 | 216 | 1 2 1 |
|
208 | 217 | 2 3 1 |
|
209 | 218 | |
|
210 | 219 | $ hg debugdeltachain -m -Tjson |
|
211 | 220 | [ |
|
212 | 221 | { |
|
213 | 222 | "chainid": 1, |
|
214 | 223 | "chainlen": 1, |
|
215 | 224 | "chainratio": 1.0232558139534884, (py3 !) |
|
216 | 225 | "chainsize": 44, |
|
217 | 226 | "compsize": 44, |
|
218 | 227 | "deltatype": "base", |
|
219 | 228 | "extradist": 0, |
|
220 | 229 | "extraratio": 0.0, |
|
221 | 230 | "largestblock": 44, |
|
222 | 231 | "lindist": 44, |
|
223 | 232 | "p1": -1, |
|
224 | 233 | "p2": -1, |
|
225 | 234 | "prevrev": -1, |
|
226 | 235 | "readdensity": 1.0, |
|
227 | 236 | "readsize": 44, |
|
228 | 237 | "rev": 0, |
|
229 | 238 | "srchunks": 1, |
|
230 | 239 | "uncompsize": 43 |
|
231 | 240 | }, |
|
232 | 241 | { |
|
233 | 242 | "chainid": 2, |
|
234 | 243 | "chainlen": 1, |
|
235 | 244 | "chainratio": 0, |
|
236 | 245 | "chainsize": 0, |
|
237 | 246 | "compsize": 0, |
|
238 | 247 | "deltatype": "base", |
|
239 | 248 | "extradist": 0, |
|
240 | 249 | "extraratio": 0, |
|
241 | 250 | "largestblock": 0, |
|
242 | 251 | "lindist": 0, |
|
243 | 252 | "p1": 0, |
|
244 | 253 | "p2": -1, |
|
245 | 254 | "prevrev": -1, |
|
246 | 255 | "readdensity": 1, |
|
247 | 256 | "readsize": 0, |
|
248 | 257 | "rev": 1, |
|
249 | 258 | "srchunks": 1, |
|
250 | 259 | "uncompsize": 0 |
|
251 | 260 | }, |
|
252 | 261 | { |
|
253 | 262 | "chainid": 3, |
|
254 | 263 | "chainlen": 1, |
|
255 | 264 | "chainratio": 1.0232558139534884, (py3 !) |
|
256 | 265 | "chainsize": 44, |
|
257 | 266 | "compsize": 44, |
|
258 | 267 | "deltatype": "base", |
|
259 | 268 | "extradist": 0, |
|
260 | 269 | "extraratio": 0.0, |
|
261 | 270 | "largestblock": 44, |
|
262 | 271 | "lindist": 44, |
|
263 | 272 | "p1": 1, |
|
264 | 273 | "p2": -1, |
|
265 | 274 | "prevrev": -1, |
|
266 | 275 | "readdensity": 1.0, |
|
267 | 276 | "readsize": 44, |
|
268 | 277 | "rev": 2, |
|
269 | 278 | "srchunks": 1, |
|
270 | 279 | "uncompsize": 43 |
|
271 | 280 | } |
|
272 | 281 | ] |
|
273 | 282 | |
|
274 | 283 | debugdelta chain with sparse read enabled |
|
275 | 284 | |
|
276 | 285 | $ cat >> $HGRCPATH <<EOF |
|
277 | 286 | > [experimental] |
|
278 | 287 | > sparse-read = True |
|
279 | 288 | > EOF |
|
280 | 289 | $ hg debugdeltachain -m |
|
281 | 290 | rev p1 p2 chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
282 | 291 | 0 -1 -1 1 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1 |
|
283 | 292 | 1 0 -1 2 1 -1 base 0 0 0 0.00000 0 0 0.00000 0 0 1.00000 1 |
|
284 | 293 | 2 1 -1 3 1 -1 base 44 43 44 1.02326 44 0 0.00000 44 44 1.00000 1 |
|
285 | 294 | |
|
286 | 295 | $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen} {readsize} {largestblock} {readdensity}\n' |
|
287 | 296 | 0 1 1 44 44 1.0 |
|
288 | 297 | 1 2 1 0 0 1 |
|
289 | 298 | 2 3 1 44 44 1.0 |
|
290 | 299 | |
|
291 | 300 | $ hg debugdeltachain -m -Tjson |
|
292 | 301 | [ |
|
293 | 302 | { |
|
294 | 303 | "chainid": 1, |
|
295 | 304 | "chainlen": 1, |
|
296 | 305 | "chainratio": 1.0232558139534884, (py3 !) |
|
297 | 306 | "chainsize": 44, |
|
298 | 307 | "compsize": 44, |
|
299 | 308 | "deltatype": "base", |
|
300 | 309 | "extradist": 0, |
|
301 | 310 | "extraratio": 0.0, |
|
302 | 311 | "largestblock": 44, |
|
303 | 312 | "lindist": 44, |
|
304 | 313 | "p1": -1, |
|
305 | 314 | "p2": -1, |
|
306 | 315 | "prevrev": -1, |
|
307 | 316 | "readdensity": 1.0, |
|
308 | 317 | "readsize": 44, |
|
309 | 318 | "rev": 0, |
|
310 | 319 | "srchunks": 1, |
|
311 | 320 | "uncompsize": 43 |
|
312 | 321 | }, |
|
313 | 322 | { |
|
314 | 323 | "chainid": 2, |
|
315 | 324 | "chainlen": 1, |
|
316 | 325 | "chainratio": 0, |
|
317 | 326 | "chainsize": 0, |
|
318 | 327 | "compsize": 0, |
|
319 | 328 | "deltatype": "base", |
|
320 | 329 | "extradist": 0, |
|
321 | 330 | "extraratio": 0, |
|
322 | 331 | "largestblock": 0, |
|
323 | 332 | "lindist": 0, |
|
324 | 333 | "p1": 0, |
|
325 | 334 | "p2": -1, |
|
326 | 335 | "prevrev": -1, |
|
327 | 336 | "readdensity": 1, |
|
328 | 337 | "readsize": 0, |
|
329 | 338 | "rev": 1, |
|
330 | 339 | "srchunks": 1, |
|
331 | 340 | "uncompsize": 0 |
|
332 | 341 | }, |
|
333 | 342 | { |
|
334 | 343 | "chainid": 3, |
|
335 | 344 | "chainlen": 1, |
|
336 | 345 | "chainratio": 1.0232558139534884, (py3 !) |
|
337 | 346 | "chainsize": 44, |
|
338 | 347 | "compsize": 44, |
|
339 | 348 | "deltatype": "base", |
|
340 | 349 | "extradist": 0, |
|
341 | 350 | "extraratio": 0.0, |
|
342 | 351 | "largestblock": 44, |
|
343 | 352 | "lindist": 44, |
|
344 | 353 | "p1": 1, |
|
345 | 354 | "p2": -1, |
|
346 | 355 | "prevrev": -1, |
|
347 | 356 | "readdensity": 1.0, |
|
348 | 357 | "readsize": 44, |
|
349 | 358 | "rev": 2, |
|
350 | 359 | "srchunks": 1, |
|
351 | 360 | "uncompsize": 43 |
|
352 | 361 | } |
|
353 | 362 | ] |
|
354 | 363 | |
|
355 | 364 | $ printf "This test checks things.\n" >> a |
|
356 | 365 | $ hg ci -m a |
|
357 | 366 | $ hg branch other |
|
358 | 367 | marked working directory as branch other |
|
359 | 368 | (branches are permanent and global, did you want a bookmark?) |
|
360 | 369 | $ for i in `$TESTDIR/seq.py 5`; do |
|
361 | 370 | > printf "shorter ${i}" >> a |
|
362 | 371 | > hg ci -m "a other:$i" |
|
363 | 372 | > hg up -q default |
|
364 | 373 | > printf "for the branch default we want longer chains: ${i}" >> a |
|
365 | 374 | > hg ci -m "a default:$i" |
|
366 | 375 | > hg up -q other |
|
367 | 376 | > done |
|
368 | 377 | $ hg debugdeltachain a -T '{rev} {srchunks}\n' \ |
|
369 | 378 | > --config experimental.sparse-read.density-threshold=0.50 \ |
|
370 | 379 | > --config experimental.sparse-read.min-gap-size=0 |
|
371 | 380 | 0 1 |
|
372 | 381 | 1 1 |
|
373 | 382 | 2 1 |
|
374 | 383 | 3 1 |
|
375 | 384 | 4 1 |
|
376 | 385 | 5 1 |
|
377 | 386 | 6 1 |
|
378 | 387 | 7 1 |
|
379 | 388 | 8 1 |
|
380 | 389 | 9 1 |
|
381 | 390 | 10 2 (no-zstd !) |
|
382 | 391 | 10 1 (zstd !) |
|
383 | 392 | 11 1 |
|
384 | 393 | $ hg --config extensions.strip= strip --no-backup -r 1 |
|
385 | 394 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
386 | 395 | |
|
387 | 396 | Test max chain len |
|
388 | 397 | $ cat >> $HGRCPATH << EOF |
|
389 | 398 | > [format] |
|
390 | 399 | > maxchainlen=4 |
|
391 | 400 | > EOF |
|
392 | 401 | |
|
393 | 402 | $ printf "This test checks if maxchainlen config value is respected also it can serve as basic test for debugrevlog -d <file>.\n" >> a |
|
394 | 403 | $ hg ci -m a |
|
395 | 404 | $ printf "b\n" >> a |
|
396 | 405 | $ hg ci -m a |
|
397 | 406 | $ printf "c\n" >> a |
|
398 | 407 | $ hg ci -m a |
|
399 | 408 | $ printf "d\n" >> a |
|
400 | 409 | $ hg ci -m a |
|
401 | 410 | $ printf "e\n" >> a |
|
402 | 411 | $ hg ci -m a |
|
403 | 412 | $ printf "f\n" >> a |
|
404 | 413 | $ hg ci -m a |
|
405 | 414 | $ printf 'g\n' >> a |
|
406 | 415 | $ hg ci -m a |
|
407 | 416 | $ printf 'h\n' >> a |
|
408 | 417 | $ hg ci -m a |
|
409 | 418 | |
|
410 | 419 | $ hg debugrevlog -d a |
|
411 | 420 | # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen |
|
412 | 421 | 0 -1 -1 0 ??? 0 0 0 0 ??? ???? ? 1 0 (glob) |
|
413 | 422 | 1 0 -1 ??? ??? 0 0 0 0 ??? ???? ? 1 1 (glob) |
|
414 | 423 | 2 1 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) |
|
415 | 424 | 3 2 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) |
|
416 | 425 | 4 3 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 4 (glob) |
|
417 | 426 | 5 4 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 0 (glob) |
|
418 | 427 | 6 5 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 1 (glob) |
|
419 | 428 | 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob) |
|
420 | 429 | 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob) |
|
421 | 430 | #endif |
|
422 | 431 | |
|
423 | 432 | Test debuglocks command: |
|
424 | 433 | |
|
425 | 434 | $ hg debuglocks |
|
426 | 435 | lock: free |
|
427 | 436 | wlock: free |
|
428 | 437 | |
|
429 | 438 | * Test setting the lock |
|
430 | 439 | |
|
431 | 440 | waitlock <file> will wait for file to be created. If it isn't in a reasonable |
|
432 | 441 | amount of time, displays error message and returns 1 |
|
433 | 442 | $ waitlock() { |
|
434 | 443 | > start=`date +%s` |
|
435 | 444 | > timeout=5 |
|
436 | 445 | > while [ \( ! -f $1 \) -a \( ! -L $1 \) ]; do |
|
437 | 446 | > now=`date +%s` |
|
438 | 447 | > if [ "`expr $now - $start`" -gt $timeout ]; then |
|
439 | 448 | > echo "timeout: $1 was not created in $timeout seconds" |
|
440 | 449 | > return 1 |
|
441 | 450 | > fi |
|
442 | 451 | > sleep 0.1 |
|
443 | 452 | > done |
|
444 | 453 | > } |
|
445 | 454 | $ dolock() { |
|
446 | 455 | > { |
|
447 | 456 | > waitlock .hg/unlock |
|
448 | 457 | > rm -f .hg/unlock |
|
449 | 458 | > echo y |
|
450 | 459 | > } | hg debuglocks "$@" > /dev/null |
|
451 | 460 | > } |
|
452 | 461 | $ dolock -s & |
|
453 | 462 | $ waitlock .hg/store/lock |
|
454 | 463 | |
|
455 | 464 | $ hg debuglocks |
|
456 | 465 | lock: user *, process * (*s) (glob) |
|
457 | 466 | wlock: free |
|
458 | 467 | [1] |
|
459 | 468 | $ touch .hg/unlock |
|
460 | 469 | $ wait |
|
461 | 470 | $ [ -f .hg/store/lock ] || echo "There is no lock" |
|
462 | 471 | There is no lock |
|
463 | 472 | |
|
464 | 473 | * Test setting the wlock |
|
465 | 474 | |
|
466 | 475 | $ dolock -S & |
|
467 | 476 | $ waitlock .hg/wlock |
|
468 | 477 | |
|
469 | 478 | $ hg debuglocks |
|
470 | 479 | lock: free |
|
471 | 480 | wlock: user *, process * (*s) (glob) |
|
472 | 481 | [1] |
|
473 | 482 | $ touch .hg/unlock |
|
474 | 483 | $ wait |
|
475 | 484 | $ [ -f .hg/wlock ] || echo "There is no wlock" |
|
476 | 485 | There is no wlock |
|
477 | 486 | |
|
478 | 487 | * Test setting both locks |
|
479 | 488 | |
|
480 | 489 | $ dolock -Ss & |
|
481 | 490 | $ waitlock .hg/wlock && waitlock .hg/store/lock |
|
482 | 491 | |
|
483 | 492 | $ hg debuglocks |
|
484 | 493 | lock: user *, process * (*s) (glob) |
|
485 | 494 | wlock: user *, process * (*s) (glob) |
|
486 | 495 | [2] |
|
487 | 496 | |
|
488 | 497 | * Test failing to set a lock |
|
489 | 498 | |
|
490 | 499 | $ hg debuglocks -s |
|
491 | 500 | abort: lock is already held |
|
492 | 501 | [255] |
|
493 | 502 | |
|
494 | 503 | $ hg debuglocks -S |
|
495 | 504 | abort: wlock is already held |
|
496 | 505 | [255] |
|
497 | 506 | |
|
498 | 507 | $ touch .hg/unlock |
|
499 | 508 | $ wait |
|
500 | 509 | |
|
501 | 510 | $ hg debuglocks |
|
502 | 511 | lock: free |
|
503 | 512 | wlock: free |
|
504 | 513 | |
|
505 | 514 | * Test forcing the lock |
|
506 | 515 | |
|
507 | 516 | $ dolock -s & |
|
508 | 517 | $ waitlock .hg/store/lock |
|
509 | 518 | |
|
510 | 519 | $ hg debuglocks |
|
511 | 520 | lock: user *, process * (*s) (glob) |
|
512 | 521 | wlock: free |
|
513 | 522 | [1] |
|
514 | 523 | |
|
515 | 524 | $ hg debuglocks -L |
|
516 | 525 | |
|
517 | 526 | $ hg debuglocks |
|
518 | 527 | lock: free |
|
519 | 528 | wlock: free |
|
520 | 529 | |
|
521 | 530 | $ touch .hg/unlock |
|
522 | 531 | $ wait |
|
523 | 532 | |
|
524 | 533 | * Test forcing the wlock |
|
525 | 534 | |
|
526 | 535 | $ dolock -S & |
|
527 | 536 | $ waitlock .hg/wlock |
|
528 | 537 | |
|
529 | 538 | $ hg debuglocks |
|
530 | 539 | lock: free |
|
531 | 540 | wlock: user *, process * (*s) (glob) |
|
532 | 541 | [1] |
|
533 | 542 | |
|
534 | 543 | $ hg debuglocks -W |
|
535 | 544 | |
|
536 | 545 | $ hg debuglocks |
|
537 | 546 | lock: free |
|
538 | 547 | wlock: free |
|
539 | 548 | |
|
540 | 549 | $ touch .hg/unlock |
|
541 | 550 | $ wait |
|
542 | 551 | |
|
543 | 552 | Test WdirUnsupported exception |
|
544 | 553 | |
|
545 | 554 | $ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff |
|
546 | 555 | abort: working directory revision cannot be specified |
|
547 | 556 | [255] |
|
548 | 557 | |
|
549 | 558 | Test cache warming command |
|
550 | 559 | |
|
551 | 560 | $ rm -rf .hg/cache/ |
|
552 | 561 | $ hg debugupdatecaches --debug |
|
553 | 562 | updating the branch cache |
|
554 | 563 | $ ls -r .hg/cache/* |
|
555 | 564 | .hg/cache/tags2-served |
|
556 | 565 | .hg/cache/tags2 |
|
557 | 566 | .hg/cache/rbc-revs-v1 |
|
558 | 567 | .hg/cache/rbc-names-v1 |
|
559 | 568 | .hg/cache/hgtagsfnodes1 |
|
560 | 569 | .hg/cache/branch2-visible-hidden |
|
561 | 570 | .hg/cache/branch2-visible |
|
562 | 571 | .hg/cache/branch2-served.hidden |
|
563 | 572 | .hg/cache/branch2-served |
|
564 | 573 | .hg/cache/branch2-immutable |
|
565 | 574 | .hg/cache/branch2-base |
|
566 | 575 | |
|
567 | 576 | Test debugcolor |
|
568 | 577 | |
|
569 | 578 | #if no-windows |
|
570 | 579 | $ hg debugcolor --style --color always | egrep 'mode|style|log\.' |
|
571 | 580 | color mode: 'ansi' |
|
572 | 581 | available style: |
|
573 | 582 | \x1b[0;33mlog.changeset\x1b[0m: \x1b[0;33myellow\x1b[0m (esc) |
|
574 | 583 | #endif |
|
575 | 584 | |
|
576 | 585 | $ hg debugcolor --style --color never |
|
577 | 586 | color mode: None |
|
578 | 587 | available style: |
|
579 | 588 | |
|
580 | 589 | $ cd .. |
|
581 | 590 | |
|
582 | 591 | Test internal debugstacktrace command |
|
583 | 592 | |
|
584 | 593 | $ cat > debugstacktrace.py << EOF |
|
585 | 594 | > from mercurial import ( |
|
586 | 595 | > util, |
|
587 | 596 | > ) |
|
588 | 597 | > from mercurial.utils import ( |
|
589 | 598 | > procutil, |
|
590 | 599 | > ) |
|
591 | 600 | > def f(): |
|
592 | 601 | > util.debugstacktrace(f=procutil.stdout) |
|
593 | 602 | > g() |
|
594 | 603 | > def g(): |
|
595 | 604 | > util.dst(b'hello from g\\n', skip=1) |
|
596 | 605 | > h() |
|
597 | 606 | > def h(): |
|
598 | 607 | > util.dst(b'hi ...\\nfrom h hidden in g', 1, depth=2) |
|
599 | 608 | > f() |
|
600 | 609 | > EOF |
|
601 | 610 | $ "$PYTHON" debugstacktrace.py |
|
602 | 611 | stacktrace at: |
|
603 | 612 | *debugstacktrace.py:15 in * (glob) |
|
604 | 613 | *debugstacktrace.py:8 in f (glob) |
|
605 | 614 | hello from g at: |
|
606 | 615 | *debugstacktrace.py:15 in * (glob) |
|
607 | 616 | *debugstacktrace.py:9 in f (glob) |
|
608 | 617 | hi ... |
|
609 | 618 | from h hidden in g at: |
|
610 | 619 | *debugstacktrace.py:9 in f (glob) |
|
611 | 620 | *debugstacktrace.py:12 in g (glob) |
|
612 | 621 | |
|
613 | 622 | Test debugcapabilities command: |
|
614 | 623 | |
|
615 | 624 | $ hg debugcapabilities ./debugrevlog/ |
|
616 | 625 | Main capabilities: |
|
617 | 626 | branchmap |
|
618 | 627 | $USUAL_BUNDLE2_CAPS$ |
|
619 | 628 | getbundle |
|
620 | 629 | known |
|
621 | 630 | lookup |
|
622 | 631 | pushkey |
|
623 | 632 | unbundle |
|
624 | 633 | Bundle2 capabilities: |
|
625 | 634 | HG20 |
|
626 | 635 | bookmarks |
|
627 | 636 | changegroup |
|
628 | 637 | 01 |
|
629 | 638 | 02 |
|
630 | 639 | checkheads |
|
631 | 640 | related |
|
632 | 641 | digests |
|
633 | 642 | md5 |
|
634 | 643 | sha1 |
|
635 | 644 | sha512 |
|
636 | 645 | error |
|
637 | 646 | abort |
|
638 | 647 | unsupportedcontent |
|
639 | 648 | pushraced |
|
640 | 649 | pushkey |
|
641 | 650 | hgtagsfnodes |
|
642 | 651 | listkeys |
|
643 | 652 | phases |
|
644 | 653 | heads |
|
645 | 654 | pushkey |
|
646 | 655 | remote-changegroup |
|
647 | 656 | http |
|
648 | 657 | https |
|
649 | 658 | stream |
|
650 | 659 | v2 |
|
651 | 660 | |
|
652 | 661 | Test debugpeer |
|
653 | 662 | |
|
654 | 663 | $ hg debugpeer ssh://user@dummy/debugrevlog |
|
655 | 664 | url: ssh://user@dummy/debugrevlog |
|
656 | 665 | local: no |
|
657 | 666 | pushable: yes |
|
658 | 667 | |
|
659 | 668 | #if rust |
|
660 | 669 | |
|
661 | 670 | $ hg --debug debugpeer ssh://user@dummy/debugrevlog |
|
662 | 671 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re) |
|
663 | 672 | devel-peer-request: hello+between |
|
664 | 673 | devel-peer-request: pairs: 81 bytes |
|
665 | 674 | sending hello command |
|
666 | 675 | sending between command |
|
667 | 676 | remote: 468 |
|
668 | 677 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlog-compression-zstd,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
669 | 678 | remote: 1 |
|
670 | 679 | devel-peer-request: protocaps |
|
671 | 680 | devel-peer-request: caps: * bytes (glob) |
|
672 | 681 | sending protocaps command |
|
673 | 682 | url: ssh://user@dummy/debugrevlog |
|
674 | 683 | local: no |
|
675 | 684 | pushable: yes |
|
676 | 685 | |
|
677 | 686 | #endif |
|
678 | 687 | |
|
679 | 688 | #if no-rust zstd |
|
680 | 689 | |
|
681 | 690 | $ hg --debug debugpeer ssh://user@dummy/debugrevlog |
|
682 | 691 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re) |
|
683 | 692 | devel-peer-request: hello+between |
|
684 | 693 | devel-peer-request: pairs: 81 bytes |
|
685 | 694 | sending hello command |
|
686 | 695 | sending between command |
|
687 | 696 | remote: 468 |
|
688 | 697 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlog-compression-zstd,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
689 | 698 | remote: 1 |
|
690 | 699 | devel-peer-request: protocaps |
|
691 | 700 | devel-peer-request: caps: * bytes (glob) |
|
692 | 701 | sending protocaps command |
|
693 | 702 | url: ssh://user@dummy/debugrevlog |
|
694 | 703 | local: no |
|
695 | 704 | pushable: yes |
|
696 | 705 | |
|
697 | 706 | #endif |
|
698 | 707 | |
|
699 | 708 | #if no-rust no-zstd |
|
700 | 709 | |
|
701 | 710 | $ hg --debug debugpeer ssh://user@dummy/debugrevlog |
|
702 | 711 | running .* ".*[/\\]dummyssh" ['"]user@dummy['"] ['"]hg -R debugrevlog serve --stdio['"] (re) |
|
703 | 712 | devel-peer-request: hello+between |
|
704 | 713 | devel-peer-request: pairs: 81 bytes |
|
705 | 714 | sending hello command |
|
706 | 715 | sending between command |
|
707 | 716 | remote: 444 |
|
708 | 717 | remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
709 | 718 | remote: 1 |
|
710 | 719 | devel-peer-request: protocaps |
|
711 | 720 | devel-peer-request: caps: * bytes (glob) |
|
712 | 721 | sending protocaps command |
|
713 | 722 | url: ssh://user@dummy/debugrevlog |
|
714 | 723 | local: no |
|
715 | 724 | pushable: yes |
|
716 | 725 | |
|
717 | 726 | #endif |
@@ -1,323 +1,326 b'' | |||
|
1 | 1 | ==================================== |
|
2 | 2 | Test delta choice with sparse revlog |
|
3 | 3 | ==================================== |
|
4 | 4 | |
|
5 | 5 | Sparse-revlog usually shows the most gain on Manifest. However, it is simpler |
|
6 | 6 | to general an appropriate file, so we test with a single file instead. The |
|
7 | 7 | goal is to observe intermediate snapshot being created. |
|
8 | 8 | |
|
9 | 9 | We need a large enough file. Part of the content needs to be replaced |
|
10 | 10 | repeatedly while some of it changes rarely. |
|
11 | 11 | |
|
12 | 12 | $ bundlepath="$TESTDIR/artifacts/cache/big-file-churn.hg" |
|
13 | 13 | |
|
14 | 14 | $ expectedhash=`cat "$bundlepath".md5` |
|
15 | 15 | |
|
16 | 16 | #if slow |
|
17 | 17 | |
|
18 | 18 | $ if [ ! -f "$bundlepath" ]; then |
|
19 | 19 | > "$TESTDIR"/artifacts/scripts/generate-churning-bundle.py > /dev/null |
|
20 | 20 | > fi |
|
21 | 21 | |
|
22 | 22 | #else |
|
23 | 23 | |
|
24 | 24 | $ if [ ! -f "$bundlepath" ]; then |
|
25 | 25 | > echo 'skipped: missing artifact, run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"' |
|
26 | 26 | > exit 80 |
|
27 | 27 | > fi |
|
28 | 28 | |
|
29 | 29 | #endif |
|
30 | 30 | |
|
31 | 31 | $ currenthash=`f -M "$bundlepath" | cut -d = -f 2` |
|
32 | 32 | $ if [ "$currenthash" != "$expectedhash" ]; then |
|
33 | 33 | > echo 'skipped: outdated artifact, md5 "'"$currenthash"'" expected "'"$expectedhash"'" run "'"$TESTDIR"'/artifacts/scripts/generate-churning-bundle.py"' |
|
34 | 34 | > exit 80 |
|
35 | 35 | > fi |
|
36 | 36 | |
|
37 | 37 | $ cat >> $HGRCPATH << EOF |
|
38 | 38 | > [format] |
|
39 | 39 | > sparse-revlog = yes |
|
40 | 40 | > maxchainlen = 15 |
|
41 | 41 | > [storage] |
|
42 | 42 | > revlog.optimize-delta-parent-choice = yes |
|
43 | 43 | > revlog.reuse-external-delta = no |
|
44 | 44 | > EOF |
|
45 | 45 | $ hg init sparse-repo |
|
46 | 46 | $ cd sparse-repo |
|
47 | 47 | $ hg unbundle $bundlepath |
|
48 | 48 | adding changesets |
|
49 | 49 | adding manifests |
|
50 | 50 | adding file changes |
|
51 | 51 | added 5001 changesets with 5001 changes to 1 files (+89 heads) |
|
52 | 52 | new changesets 9706f5af64f4:d9032adc8114 (5001 drafts) |
|
53 | 53 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
54 | 54 | $ hg up |
|
55 | 55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
56 | 56 | updated to "d9032adc8114: commit #5000" |
|
57 | 57 | 89 other heads for branch "default" |
|
58 | 58 | |
|
59 | 59 | $ hg log --stat -r 0:3 |
|
60 | 60 | changeset: 0:9706f5af64f4 |
|
61 | 61 | user: test |
|
62 | 62 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
63 | 63 | summary: initial commit |
|
64 | 64 | |
|
65 | 65 | SPARSE-REVLOG-TEST-FILE | 10500 ++++++++++++++++++++++++++++++++++++++++++++++ |
|
66 | 66 | 1 files changed, 10500 insertions(+), 0 deletions(-) |
|
67 | 67 | |
|
68 | 68 | changeset: 1:724907deaa5e |
|
69 | 69 | user: test |
|
70 | 70 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
71 | 71 | summary: commit #1 |
|
72 | 72 | |
|
73 | 73 | SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++----------------------- |
|
74 | 74 | 1 files changed, 534 insertions(+), 534 deletions(-) |
|
75 | 75 | |
|
76 | 76 | changeset: 2:62c41bce3e5d |
|
77 | 77 | user: test |
|
78 | 78 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
79 | 79 | summary: commit #2 |
|
80 | 80 | |
|
81 | 81 | SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++----------------------- |
|
82 | 82 | 1 files changed, 534 insertions(+), 534 deletions(-) |
|
83 | 83 | |
|
84 | 84 | changeset: 3:348a9cbd6959 |
|
85 | 85 | user: test |
|
86 | 86 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
87 | 87 | summary: commit #3 |
|
88 | 88 | |
|
89 | 89 | SPARSE-REVLOG-TEST-FILE | 1068 +++++++++++++++++++++++----------------------- |
|
90 | 90 | 1 files changed, 534 insertions(+), 534 deletions(-) |
|
91 | 91 | |
|
92 | 92 | |
|
93 | 93 | $ f -s .hg/store/data/*.d |
|
94 | 94 | .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=58616973 |
|
95 | 95 | $ hg debugrevlog * |
|
96 | 96 | format : 1 |
|
97 | 97 | flags : generaldelta |
|
98 | 98 | |
|
99 | 99 | revisions : 5001 |
|
100 | 100 | merges : 625 (12.50%) |
|
101 | 101 | normal : 4376 (87.50%) |
|
102 | 102 | revisions : 5001 |
|
103 | 103 | empty : 0 ( 0.00%) |
|
104 | 104 | text : 0 (100.00%) |
|
105 | 105 | delta : 0 (100.00%) |
|
106 | 106 | snapshot : 383 ( 7.66%) |
|
107 | 107 | lvl-0 : 3 ( 0.06%) |
|
108 | 108 | lvl-1 : 18 ( 0.36%) non-ancestor-bases: 9 (50.00%) |
|
109 | 109 | lvl-2 : 62 ( 1.24%) non-ancestor-bases: 58 (93.55%) |
|
110 | 110 | lvl-3 : 108 ( 2.16%) non-ancestor-bases: 108 (100.00%) |
|
111 | 111 | lvl-4 : 191 ( 3.82%) non-ancestor-bases: 180 (94.24%) |
|
112 | 112 | lvl-5 : 1 ( 0.02%) non-ancestor-bases: 1 (100.00%) |
|
113 | 113 | deltas : 4618 (92.34%) |
|
114 | 114 | revision size : 58616973 |
|
115 | 115 | snapshot : 9247844 (15.78%) |
|
116 | 116 | lvl-0 : 539532 ( 0.92%) |
|
117 | 117 | lvl-1 : 1467743 ( 2.50%) |
|
118 | 118 | lvl-2 : 1873820 ( 3.20%) |
|
119 | 119 | lvl-3 : 2326874 ( 3.97%) |
|
120 | 120 | lvl-4 : 3029118 ( 5.17%) |
|
121 | 121 | lvl-5 : 10757 ( 0.02%) |
|
122 | 122 | deltas : 49369129 (84.22%) |
|
123 | 123 | |
|
124 | 124 | chunks : 5001 |
|
125 | 125 | 0x28 : 5001 (100.00%) |
|
126 | 126 | chunks size : 58616973 |
|
127 | 127 | 0x28 : 58616973 (100.00%) |
|
128 | 128 | |
|
129 | ||
|
130 | total-stored-content: 1 732 705 361 bytes | |
|
131 | ||
|
129 | 132 | avg chain length : 9 |
|
130 | 133 | max chain length : 15 |
|
131 | 134 | max chain reach : 27366701 |
|
132 | 135 | compression ratio : 29 |
|
133 | 136 | |
|
134 | 137 | uncompressed data size (min/max/avg) : 346468 / 346472 / 346471 |
|
135 | 138 | full revision size (min/max/avg) : 179288 / 180786 / 179844 |
|
136 | 139 | inter-snapshot size (min/max/avg) : 10757 / 169507 / 22916 |
|
137 | 140 | level-1 (min/max/avg) : 13905 / 169507 / 81541 |
|
138 | 141 | level-2 (min/max/avg) : 10887 / 83873 / 30222 |
|
139 | 142 | level-3 (min/max/avg) : 10911 / 43047 / 21545 |
|
140 | 143 | level-4 (min/max/avg) : 10838 / 21390 / 15859 |
|
141 | 144 | level-5 (min/max/avg) : 10757 / 10757 / 10757 |
|
142 | 145 | delta size (min/max/avg) : 9672 / 108072 / 10690 |
|
143 | 146 | |
|
144 | 147 | deltas against prev : 3906 (84.58%) |
|
145 | 148 | where prev = p1 : 3906 (100.00%) |
|
146 | 149 | where prev = p2 : 0 ( 0.00%) |
|
147 | 150 | other-ancestor : 0 ( 0.00%) |
|
148 | 151 | unrelated : 0 ( 0.00%) |
|
149 | 152 | deltas against p1 : 649 (14.05%) |
|
150 | 153 | deltas against p2 : 63 ( 1.36%) |
|
151 | 154 | deltas against ancs : 0 ( 0.00%) |
|
152 | 155 | deltas against other : 0 ( 0.00%) |
|
153 | 156 | |
|
154 | 157 | |
|
155 | 158 | Test `debug-delta-find` |
|
156 | 159 | ----------------------- |
|
157 | 160 | |
|
158 | 161 | $ ls -1 |
|
159 | 162 | SPARSE-REVLOG-TEST-FILE |
|
160 | 163 | $ hg debugdeltachain SPARSE-REVLOG-TEST-FILE | grep snap | tail -1 |
|
161 | 164 | 4971 4970 -1 3 5 4930 snap 19179 346472 427596 1.23414 15994877 15567281 36.40652 427596 179288 1.00000 5 |
|
162 | 165 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 |
|
163 | 166 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
164 | 167 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down |
|
165 | 168 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4962 |
|
166 | 169 | DBG-DELTAS-SEARCH: type=snapshot-4 |
|
167 | 170 | DBG-DELTAS-SEARCH: size=18296 |
|
168 | 171 | DBG-DELTAS-SEARCH: base=4930 |
|
169 | 172 | DBG-DELTAS-SEARCH: uncompressed-delta-size=30377 |
|
170 | 173 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
171 | 174 | DBG-DELTAS-SEARCH: DELTA: length=16872 (BAD) |
|
172 | 175 | DBG-DELTAS-SEARCH: ROUND #2 - 1 candidates - search-down |
|
173 | 176 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
174 | 177 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
175 | 178 | DBG-DELTAS-SEARCH: size=39228 |
|
176 | 179 | DBG-DELTAS-SEARCH: base=4799 |
|
177 | 180 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
178 | 181 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
179 | 182 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
180 | 183 | DBG-DELTAS-SEARCH: ROUND #3 - 1 candidates - refine-down |
|
181 | 184 | DBG-DELTAS-SEARCH: CONTENDER: rev=4930 - length=19179 |
|
182 | 185 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4799 |
|
183 | 186 | DBG-DELTAS-SEARCH: type=snapshot-2 |
|
184 | 187 | DBG-DELTAS-SEARCH: size=50213 |
|
185 | 188 | DBG-DELTAS-SEARCH: base=4623 |
|
186 | 189 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
187 | 190 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
188 | 191 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
189 | 192 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=0 - search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
190 | 193 | |
|
191 | 194 | $ cat << EOF >>.hg/hgrc |
|
192 | 195 | > [storage] |
|
193 | 196 | > revlog.optimize-delta-parent-choice = no |
|
194 | 197 | > revlog.reuse-external-delta = yes |
|
195 | 198 | > EOF |
|
196 | 199 | |
|
197 | 200 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --quiet |
|
198 | 201 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=0 - search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
199 | 202 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source full |
|
200 | 203 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
201 | 204 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down |
|
202 | 205 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4962 |
|
203 | 206 | DBG-DELTAS-SEARCH: type=snapshot-4 |
|
204 | 207 | DBG-DELTAS-SEARCH: size=18296 |
|
205 | 208 | DBG-DELTAS-SEARCH: base=4930 |
|
206 | 209 | DBG-DELTAS-SEARCH: uncompressed-delta-size=30377 |
|
207 | 210 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
208 | 211 | DBG-DELTAS-SEARCH: DELTA: length=16872 (BAD) |
|
209 | 212 | DBG-DELTAS-SEARCH: ROUND #2 - 1 candidates - search-down |
|
210 | 213 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
211 | 214 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
212 | 215 | DBG-DELTAS-SEARCH: size=39228 |
|
213 | 216 | DBG-DELTAS-SEARCH: base=4799 |
|
214 | 217 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
215 | 218 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
216 | 219 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
217 | 220 | DBG-DELTAS-SEARCH: ROUND #3 - 1 candidates - refine-down |
|
218 | 221 | DBG-DELTAS-SEARCH: CONTENDER: rev=4930 - length=19179 |
|
219 | 222 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4799 |
|
220 | 223 | DBG-DELTAS-SEARCH: type=snapshot-2 |
|
221 | 224 | DBG-DELTAS-SEARCH: size=50213 |
|
222 | 225 | DBG-DELTAS-SEARCH: base=4623 |
|
223 | 226 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
224 | 227 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
225 | 228 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
226 | 229 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=0 - search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
227 | 230 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source storage |
|
228 | 231 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
229 | 232 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - cached-delta |
|
230 | 233 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
231 | 234 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
232 | 235 | DBG-DELTAS-SEARCH: size=39228 |
|
233 | 236 | DBG-DELTAS-SEARCH: base=4799 |
|
234 | 237 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
235 | 238 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
236 | 239 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
237 | 240 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=1 - search-rounds=1 try-count=1 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
238 | 241 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source p1 |
|
239 | 242 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
240 | 243 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down |
|
241 | 244 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4962 |
|
242 | 245 | DBG-DELTAS-SEARCH: type=snapshot-4 |
|
243 | 246 | DBG-DELTAS-SEARCH: size=18296 |
|
244 | 247 | DBG-DELTAS-SEARCH: base=4930 |
|
245 | 248 | DBG-DELTAS-SEARCH: uncompressed-delta-size=30377 |
|
246 | 249 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
247 | 250 | DBG-DELTAS-SEARCH: DELTA: length=16872 (BAD) |
|
248 | 251 | DBG-DELTAS-SEARCH: ROUND #2 - 1 candidates - search-down |
|
249 | 252 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
250 | 253 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
251 | 254 | DBG-DELTAS-SEARCH: size=39228 |
|
252 | 255 | DBG-DELTAS-SEARCH: base=4799 |
|
253 | 256 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
254 | 257 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
255 | 258 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
256 | 259 | DBG-DELTAS-SEARCH: ROUND #3 - 1 candidates - refine-down |
|
257 | 260 | DBG-DELTAS-SEARCH: CONTENDER: rev=4930 - length=19179 |
|
258 | 261 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4799 |
|
259 | 262 | DBG-DELTAS-SEARCH: type=snapshot-2 |
|
260 | 263 | DBG-DELTAS-SEARCH: size=50213 |
|
261 | 264 | DBG-DELTAS-SEARCH: base=4623 |
|
262 | 265 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
263 | 266 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
264 | 267 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
265 | 268 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=0 - search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
266 | 269 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source p2 |
|
267 | 270 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
268 | 271 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down |
|
269 | 272 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4962 |
|
270 | 273 | DBG-DELTAS-SEARCH: type=snapshot-4 |
|
271 | 274 | DBG-DELTAS-SEARCH: size=18296 |
|
272 | 275 | DBG-DELTAS-SEARCH: base=4930 |
|
273 | 276 | DBG-DELTAS-SEARCH: uncompressed-delta-size=30377 |
|
274 | 277 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
275 | 278 | DBG-DELTAS-SEARCH: DELTA: length=16872 (BAD) |
|
276 | 279 | DBG-DELTAS-SEARCH: ROUND #2 - 1 candidates - search-down |
|
277 | 280 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
278 | 281 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
279 | 282 | DBG-DELTAS-SEARCH: size=39228 |
|
280 | 283 | DBG-DELTAS-SEARCH: base=4799 |
|
281 | 284 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
282 | 285 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
283 | 286 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
284 | 287 | DBG-DELTAS-SEARCH: ROUND #3 - 1 candidates - refine-down |
|
285 | 288 | DBG-DELTAS-SEARCH: CONTENDER: rev=4930 - length=19179 |
|
286 | 289 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4799 |
|
287 | 290 | DBG-DELTAS-SEARCH: type=snapshot-2 |
|
288 | 291 | DBG-DELTAS-SEARCH: size=50213 |
|
289 | 292 | DBG-DELTAS-SEARCH: base=4623 |
|
290 | 293 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
291 | 294 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
292 | 295 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
293 | 296 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=0 - search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
294 | 297 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source prev |
|
295 | 298 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
296 | 299 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - search-down |
|
297 | 300 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4962 |
|
298 | 301 | DBG-DELTAS-SEARCH: type=snapshot-4 |
|
299 | 302 | DBG-DELTAS-SEARCH: size=18296 |
|
300 | 303 | DBG-DELTAS-SEARCH: base=4930 |
|
301 | 304 | DBG-DELTAS-SEARCH: uncompressed-delta-size=30377 |
|
302 | 305 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
303 | 306 | DBG-DELTAS-SEARCH: DELTA: length=16872 (BAD) |
|
304 | 307 | DBG-DELTAS-SEARCH: ROUND #2 - 1 candidates - search-down |
|
305 | 308 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
306 | 309 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
307 | 310 | DBG-DELTAS-SEARCH: size=39228 |
|
308 | 311 | DBG-DELTAS-SEARCH: base=4799 |
|
309 | 312 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
310 | 313 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
311 | 314 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
312 | 315 | DBG-DELTAS-SEARCH: ROUND #3 - 1 candidates - refine-down |
|
313 | 316 | DBG-DELTAS-SEARCH: CONTENDER: rev=4930 - length=19179 |
|
314 | 317 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4799 |
|
315 | 318 | DBG-DELTAS-SEARCH: type=snapshot-2 |
|
316 | 319 | DBG-DELTAS-SEARCH: size=50213 |
|
317 | 320 | DBG-DELTAS-SEARCH: base=4623 |
|
318 | 321 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
319 | 322 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
320 | 323 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
321 | 324 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: delta-base=4930 is-cached=0 - search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) |
|
322 | 325 | |
|
323 | 326 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now