Show More
@@ -1147,7 +1147,13 b' class deltacomputer:' | |||
|
1147 | 1147 | if deltainfo is not None: |
|
1148 | 1148 | prev = deltainfo.base |
|
1149 | 1149 | |
|
1150 | if p1 in candidaterevs or p2 in candidaterevs: | |
|
1150 | if ( | |
|
1151 | cachedelta is not None | |
|
1152 | and len(candidaterevs) == 1 | |
|
1153 | and cachedelta[0] in candidaterevs | |
|
1154 | ): | |
|
1155 | round_type = b"cached-delta" | |
|
1156 | elif p1 in candidaterevs or p2 in candidaterevs: | |
|
1151 | 1157 | round_type = b"parents" |
|
1152 | 1158 | elif prev is not None and all(c < prev for c in candidaterevs): |
|
1153 | 1159 | round_type = b"refine-down" |
@@ -1246,10 +1252,19 b' class deltacomputer:' | |||
|
1246 | 1252 | |
|
1247 | 1253 | if self._write_debug is not None: |
|
1248 | 1254 | end = util.timer() |
|
1255 | assert deltainfo is not None # please pytype | |
|
1256 | used_cached = ( | |
|
1257 | cachedelta is not None | |
|
1258 | and dbg_try_rounds == 1 | |
|
1259 | and dbg_try_count == 1 | |
|
1260 | and deltainfo.base == cachedelta[0] | |
|
1261 | ) | |
|
1249 | 1262 | dbg = { |
|
1250 | 1263 | 'duration': end - start, |
|
1251 | 1264 | 'revision': target_rev, |
|
1265 | 'delta-base': deltainfo.base, | |
|
1252 | 1266 | 'search_round_count': dbg_try_rounds, |
|
1267 | 'using-cached-base': used_cached, | |
|
1253 | 1268 | 'delta_try_count': dbg_try_count, |
|
1254 | 1269 | 'type': dbg_type, |
|
1255 | 1270 | 'p1-chain-len': p1_chain_len, |
@@ -1283,7 +1298,9 b' class deltacomputer:' | |||
|
1283 | 1298 | b"DBG-DELTAS:" |
|
1284 | 1299 | b" %-12s" |
|
1285 | 1300 | b" rev=%d:" |
|
1286 |
b" |
|
|
1301 | b" delta-base=%d" | |
|
1302 | b" is-cached=%d" | |
|
1303 | b" - search-rounds=%d" | |
|
1287 | 1304 | b" try-count=%d" |
|
1288 | 1305 | b" - delta-type=%-6s" |
|
1289 | 1306 | b" snap-depth=%d" |
@@ -1295,6 +1312,8 b' class deltacomputer:' | |||
|
1295 | 1312 | msg %= ( |
|
1296 | 1313 | dbg["target-revlog"], |
|
1297 | 1314 | dbg["revision"], |
|
1315 | dbg["delta-base"], | |
|
1316 | dbg["using-cached-base"], | |
|
1298 | 1317 | dbg["search_round_count"], |
|
1299 | 1318 | dbg["delta_try_count"], |
|
1300 | 1319 | dbg["type"], |
@@ -1048,17 +1048,17 b' Test the debug output when applying delt' | |||
|
1048 | 1048 | > --config storage.revlog.reuse-external-delta=no \ |
|
1049 | 1049 | > --config storage.revlog.reuse-external-delta-parent=no |
|
1050 | 1050 | adding changesets |
|
1051 | DBG-DELTAS: CHANGELOG: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1052 | DBG-DELTAS: CHANGELOG: rev=1: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) | |
|
1053 | DBG-DELTAS: CHANGELOG: rev=2: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) | |
|
1051 | DBG-DELTAS: CHANGELOG: rev=0: delta-base=0 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1052 | DBG-DELTAS: CHANGELOG: rev=1: delta-base=1 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) | |
|
1053 | DBG-DELTAS: CHANGELOG: rev=2: delta-base=2 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) | |
|
1054 | 1054 | adding manifests |
|
1055 | DBG-DELTAS: MANIFESTLOG: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1056 | DBG-DELTAS: MANIFESTLOG: rev=1: search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) | |
|
1057 | DBG-DELTAS: MANIFESTLOG: rev=2: search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=1 p2-chain-length=-1 - duration=* (glob) | |
|
1055 | DBG-DELTAS: MANIFESTLOG: rev=0: delta-base=0 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1056 | DBG-DELTAS: MANIFESTLOG: rev=1: delta-base=0 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob) | |
|
1057 | DBG-DELTAS: MANIFESTLOG: rev=2: delta-base=1 is-cached=1 - search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=1 p2-chain-length=-1 - duration=* (glob) | |
|
1058 | 1058 | adding file changes |
|
1059 | DBG-DELTAS: FILELOG:a: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1060 | DBG-DELTAS: FILELOG:b: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1061 | DBG-DELTAS: FILELOG:c: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1059 | DBG-DELTAS: FILELOG:a: rev=0: delta-base=0 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1060 | DBG-DELTAS: FILELOG:b: rev=0: delta-base=0 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1061 | DBG-DELTAS: FILELOG:c: rev=0: delta-base=0 is-cached=0 - search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob) | |
|
1062 | 1062 | added 3 changesets with 3 changes to 3 files |
|
1063 | 1063 | new changesets 4fe08cd4693e:4652c276ac4f (3 drafts) |
|
1064 | 1064 | (run 'hg update' to get a working copy) |
@@ -189,7 +189,7 b' Test `debug-delta-find`' | |||
|
189 | 189 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
190 | 190 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
191 | 191 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
192 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
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) | |
|
193 | 193 | |
|
194 | 194 | $ cat << EOF >>.hg/hgrc |
|
195 | 195 | > [storage] |
@@ -198,7 +198,7 b' Test `debug-delta-find`' | |||
|
198 | 198 | > EOF |
|
199 | 199 | |
|
200 | 200 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --quiet |
|
201 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
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) | |
|
202 | 202 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source full |
|
203 | 203 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
204 | 204 | DBG-DELTAS-SEARCH: ROUND #1 - 2 candidates - search-down |
@@ -231,10 +231,10 b' Test `debug-delta-find`' | |||
|
231 | 231 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
232 | 232 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
233 | 233 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
234 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
234 | 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) | |
|
235 | 235 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source storage |
|
236 | 236 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
237 |
DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - |
|
|
237 | DBG-DELTAS-SEARCH: ROUND #1 - 1 candidates - cached-delta | |
|
238 | 238 | DBG-DELTAS-SEARCH: CANDIDATE: rev=4930 |
|
239 | 239 | DBG-DELTAS-SEARCH: type=snapshot-3 |
|
240 | 240 | DBG-DELTAS-SEARCH: size=39228 |
@@ -242,7 +242,7 b' Test `debug-delta-find`' | |||
|
242 | 242 | DBG-DELTAS-SEARCH: uncompressed-delta-size=33050 |
|
243 | 243 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
244 | 244 | DBG-DELTAS-SEARCH: DELTA: length=19179 (GOOD) |
|
245 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=1 try-count=1 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
245 | 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) | |
|
246 | 246 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source p1 |
|
247 | 247 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
248 | 248 | DBG-DELTAS-SEARCH: ROUND #1 - 2 candidates - search-down |
@@ -275,7 +275,7 b' Test `debug-delta-find`' | |||
|
275 | 275 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
276 | 276 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
277 | 277 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
278 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
278 | 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) | |
|
279 | 279 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source p2 |
|
280 | 280 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
281 | 281 | DBG-DELTAS-SEARCH: ROUND #1 - 2 candidates - search-down |
@@ -308,7 +308,7 b' Test `debug-delta-find`' | |||
|
308 | 308 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
309 | 309 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
310 | 310 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
311 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
311 | 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) | |
|
312 | 312 | $ hg debug-delta-find SPARSE-REVLOG-TEST-FILE 4971 --source prev |
|
313 | 313 | DBG-DELTAS-SEARCH: SEARCH rev=4971 |
|
314 | 314 | DBG-DELTAS-SEARCH: ROUND #1 - 2 candidates - search-down |
@@ -341,6 +341,6 b' Test `debug-delta-find`' | |||
|
341 | 341 | DBG-DELTAS-SEARCH: uncompressed-delta-size=82661 |
|
342 | 342 | DBG-DELTAS-SEARCH: delta-search-time=* (glob) |
|
343 | 343 | DBG-DELTAS-SEARCH: DELTA: length=49132 (BAD) |
|
344 | DBG-DELTAS: FILELOG:SPARSE-REVLOG-TEST-FILE: rev=4971: search-rounds=3 try-count=3 - delta-type=snapshot snap-depth=4 - p1-chain-length=15 p2-chain-length=-1 - duration=* (glob) | |
|
344 | 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) | |
|
345 | 345 | |
|
346 | 346 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now