Show More
@@ -1,745 +1,746 b'' | |||
|
1 | 1 | test-abort-checkin.t |
|
2 | 2 | test-absorb-edit-lines.t |
|
3 | 3 | test-absorb-filefixupstate.py |
|
4 | 4 | test-absorb-phase.t |
|
5 | 5 | test-absorb-rename.t |
|
6 | 6 | test-absorb-strip.t |
|
7 | 7 | test-absorb.t |
|
8 | 8 | test-add.t |
|
9 | 9 | test-addremove-similar.t |
|
10 | 10 | test-addremove.t |
|
11 | 11 | test-alias.t |
|
12 | 12 | test-amend-subrepo.t |
|
13 | 13 | test-amend.t |
|
14 | 14 | test-ancestor.py |
|
15 | 15 | test-annotate.py |
|
16 | 16 | test-annotate.t |
|
17 | 17 | test-arbitraryfilectx.t |
|
18 | 18 | test-archive-symlinks.t |
|
19 | 19 | test-archive.t |
|
20 | 20 | test-atomictempfile.py |
|
21 | 21 | test-audit-path.t |
|
22 | 22 | test-audit-subrepo.t |
|
23 | 23 | test-automv.t |
|
24 | 24 | test-backout.t |
|
25 | 25 | test-backwards-remove.t |
|
26 | 26 | test-bad-extension.t |
|
27 | 27 | test-bad-pull.t |
|
28 | 28 | test-basic.t |
|
29 | 29 | test-batching.py |
|
30 | 30 | test-bdiff.py |
|
31 | 31 | test-bheads.t |
|
32 | 32 | test-bisect.t |
|
33 | 33 | test-bisect2.t |
|
34 | 34 | test-bisect3.t |
|
35 | 35 | test-blackbox.t |
|
36 | 36 | test-bookflow.t |
|
37 | 37 | test-bookmarks-current.t |
|
38 | 38 | test-bookmarks-merge.t |
|
39 | 39 | test-bookmarks-pushpull.t |
|
40 | 40 | test-bookmarks-rebase.t |
|
41 | 41 | test-bookmarks-strip.t |
|
42 | 42 | test-bookmarks.t |
|
43 | 43 | test-branch-change.t |
|
44 | 44 | test-branch-option.t |
|
45 | 45 | test-branch-tag-confict.t |
|
46 | 46 | test-branches.t |
|
47 | 47 | test-bugzilla.t |
|
48 | 48 | test-bundle-phases.t |
|
49 | 49 | test-bundle-r.t |
|
50 | 50 | test-bundle-type.t |
|
51 | 51 | test-bundle-vs-outgoing.t |
|
52 | 52 | test-bundle.t |
|
53 | 53 | test-bundle2-exchange.t |
|
54 | 54 | test-bundle2-format.t |
|
55 | 55 | test-bundle2-multiple-changegroups.t |
|
56 | 56 | test-bundle2-pushback.t |
|
57 | 57 | test-bundle2-remote-changegroup.t |
|
58 | 58 | test-cache-abuse.t |
|
59 | 59 | test-cappedreader.py |
|
60 | 60 | test-casecollision-merge.t |
|
61 | 61 | test-casecollision.t |
|
62 | 62 | test-casefolding.t |
|
63 | 63 | test-cat.t |
|
64 | 64 | test-cbor.py |
|
65 | 65 | test-censor.t |
|
66 | 66 | test-changelog-exec.t |
|
67 | 67 | test-check-code.t |
|
68 | 68 | test-check-commit.t |
|
69 | 69 | test-check-config.py |
|
70 | 70 | test-check-config.t |
|
71 | 71 | test-check-execute.t |
|
72 | 72 | test-check-help.t |
|
73 | 73 | test-check-interfaces.py |
|
74 | 74 | test-check-module-imports.t |
|
75 | 75 | test-check-py3-compat.t |
|
76 | 76 | test-check-pyflakes.t |
|
77 | 77 | test-check-pylint.t |
|
78 | 78 | test-check-shbang.t |
|
79 | 79 | test-children.t |
|
80 | 80 | test-churn.t |
|
81 | 81 | test-clone-cgi.t |
|
82 | 82 | test-clone-pull-corruption.t |
|
83 | 83 | test-clone-r.t |
|
84 | 84 | test-clone-uncompressed.t |
|
85 | 85 | test-clone-update-order.t |
|
86 | 86 | test-clone.t |
|
87 | 87 | test-clonebundles.t |
|
88 | 88 | test-close-head.t |
|
89 | 89 | test-commandserver.t |
|
90 | 90 | test-commit-amend.t |
|
91 | 91 | test-commit-interactive.t |
|
92 | 92 | test-commit-multiple.t |
|
93 | 93 | test-commit-unresolved.t |
|
94 | 94 | test-commit.t |
|
95 | 95 | test-committer.t |
|
96 | 96 | test-completion.t |
|
97 | 97 | test-config-env.py |
|
98 | 98 | test-config.t |
|
99 | 99 | test-conflict.t |
|
100 | 100 | test-confused-revert.t |
|
101 | 101 | test-context-metadata.t |
|
102 | 102 | test-context.py |
|
103 | 103 | test-contrib-check-code.t |
|
104 | 104 | test-contrib-check-commit.t |
|
105 | 105 | test-contrib-dumprevlog.t |
|
106 | 106 | test-contrib-perf.t |
|
107 | 107 | test-contrib-relnotes.t |
|
108 | 108 | test-contrib-testparseutil.t |
|
109 | 109 | test-contrib.t |
|
110 | 110 | test-convert-authormap.t |
|
111 | 111 | test-convert-clonebranches.t |
|
112 | 112 | test-convert-cvs-branch.t |
|
113 | 113 | test-convert-cvs-detectmerge.t |
|
114 | 114 | test-convert-cvs-synthetic.t |
|
115 | 115 | test-convert-cvs.t |
|
116 | 116 | test-convert-cvsnt-mergepoints.t |
|
117 | 117 | test-convert-datesort.t |
|
118 | 118 | test-convert-filemap.t |
|
119 | 119 | test-convert-hg-sink.t |
|
120 | 120 | test-convert-hg-source.t |
|
121 | 121 | test-convert-hg-startrev.t |
|
122 | 122 | test-convert-splicemap.t |
|
123 | 123 | test-convert-svn-sink.t |
|
124 | 124 | test-convert-tagsbranch-topology.t |
|
125 | 125 | test-convert.t |
|
126 | 126 | test-copy-move-merge.t |
|
127 | 127 | test-copy.t |
|
128 | 128 | test-copytrace-heuristics.t |
|
129 | 129 | test-custom-filters.t |
|
130 | 130 | test-debugbuilddag.t |
|
131 | 131 | test-debugbundle.t |
|
132 | 132 | test-debugcommands.t |
|
133 | 133 | test-debugextensions.t |
|
134 | 134 | test-debugindexdot.t |
|
135 | 135 | test-debugrename.t |
|
136 | 136 | test-default-push.t |
|
137 | 137 | test-diff-antipatience.t |
|
138 | 138 | test-diff-binary-file.t |
|
139 | 139 | test-diff-change.t |
|
140 | 140 | test-diff-color.t |
|
141 | 141 | test-diff-copy-depth.t |
|
142 | 142 | test-diff-hashes.t |
|
143 | 143 | test-diff-ignore-whitespace.t |
|
144 | 144 | test-diff-indent-heuristic.t |
|
145 | 145 | test-diff-issue2761.t |
|
146 | 146 | test-diff-newlines.t |
|
147 | 147 | test-diff-reverse.t |
|
148 | 148 | test-diff-subdir.t |
|
149 | 149 | test-diff-unified.t |
|
150 | 150 | test-diff-upgrade.t |
|
151 | 151 | test-diffdir.t |
|
152 | 152 | test-diffstat.t |
|
153 | 153 | test-directaccess.t |
|
154 | 154 | test-dirstate-backup.t |
|
155 | 155 | test-dirstate-nonnormalset.t |
|
156 | 156 | test-dirstate-race.t |
|
157 | 157 | test-dirstate.t |
|
158 | 158 | test-dispatch.py |
|
159 | 159 | test-dispatch.t |
|
160 | 160 | test-doctest.py |
|
161 | 161 | test-double-merge.t |
|
162 | 162 | test-drawdag.t |
|
163 | 163 | test-duplicateoptions.py |
|
164 | 164 | test-editor-filename.t |
|
165 | 165 | test-empty-dir.t |
|
166 | 166 | test-empty-file.t |
|
167 | 167 | test-empty-group.t |
|
168 | 168 | test-empty.t |
|
169 | 169 | test-encode.t |
|
170 | 170 | test-encoding-align.t |
|
171 | 171 | test-encoding-func.py |
|
172 | 172 | test-encoding-textwrap.t |
|
173 | 173 | test-encoding.t |
|
174 | 174 | test-eol-add.t |
|
175 | 175 | test-eol-clone.t |
|
176 | 176 | test-eol-hook.t |
|
177 | 177 | test-eol-patch.t |
|
178 | 178 | test-eol-tag.t |
|
179 | 179 | test-eol-update.t |
|
180 | 180 | test-eol.t |
|
181 | 181 | test-eolfilename.t |
|
182 | 182 | test-excessive-merge.t |
|
183 | 183 | test-exchange-obsmarkers-case-A1.t |
|
184 | 184 | test-exchange-obsmarkers-case-A2.t |
|
185 | 185 | test-exchange-obsmarkers-case-A3.t |
|
186 | 186 | test-exchange-obsmarkers-case-A4.t |
|
187 | 187 | test-exchange-obsmarkers-case-A5.t |
|
188 | 188 | test-exchange-obsmarkers-case-A6.t |
|
189 | 189 | test-exchange-obsmarkers-case-A7.t |
|
190 | 190 | test-exchange-obsmarkers-case-B1.t |
|
191 | 191 | test-exchange-obsmarkers-case-B2.t |
|
192 | 192 | test-exchange-obsmarkers-case-B3.t |
|
193 | 193 | test-exchange-obsmarkers-case-B4.t |
|
194 | 194 | test-exchange-obsmarkers-case-B5.t |
|
195 | 195 | test-exchange-obsmarkers-case-B6.t |
|
196 | 196 | test-exchange-obsmarkers-case-B7.t |
|
197 | 197 | test-exchange-obsmarkers-case-C1.t |
|
198 | 198 | test-exchange-obsmarkers-case-C2.t |
|
199 | 199 | test-exchange-obsmarkers-case-C3.t |
|
200 | 200 | test-exchange-obsmarkers-case-C4.t |
|
201 | 201 | test-exchange-obsmarkers-case-D1.t |
|
202 | 202 | test-exchange-obsmarkers-case-D2.t |
|
203 | 203 | test-exchange-obsmarkers-case-D3.t |
|
204 | 204 | test-exchange-obsmarkers-case-D4.t |
|
205 | 205 | test-execute-bit.t |
|
206 | 206 | test-export.t |
|
207 | 207 | test-extdata.t |
|
208 | 208 | test-extdiff.t |
|
209 | 209 | test-extension-timing.t |
|
210 | 210 | test-extensions-afterloaded.t |
|
211 | 211 | test-extensions-wrapfunction.py |
|
212 | 212 | test-extra-filelog-entry.t |
|
213 | 213 | test-fastannotate-corrupt.t |
|
214 | 214 | test-fastannotate-diffopts.t |
|
215 | 215 | test-fastannotate-hg.t |
|
216 | 216 | test-fastannotate-perfhack.t |
|
217 | 217 | test-fastannotate-protocol.t |
|
218 | 218 | test-fastannotate-renames.t |
|
219 | 219 | test-fastannotate-revmap.py |
|
220 | 220 | test-fastannotate.t |
|
221 | 221 | test-fetch.t |
|
222 | 222 | test-filebranch.t |
|
223 | 223 | test-filecache.py |
|
224 | 224 | test-filelog.py |
|
225 | 225 | test-fileset-generated.t |
|
226 | 226 | test-fileset.t |
|
227 | 227 | test-fix-topology.t |
|
228 | 228 | test-fix.t |
|
229 | 229 | test-flags.t |
|
230 | 230 | test-fncache.t |
|
231 | 231 | test-gendoc-da.t |
|
232 | 232 | test-gendoc-de.t |
|
233 | 233 | test-gendoc-el.t |
|
234 | 234 | test-gendoc-fr.t |
|
235 | 235 | test-gendoc-it.t |
|
236 | 236 | test-gendoc-ja.t |
|
237 | 237 | test-gendoc-pt_BR.t |
|
238 | 238 | test-gendoc-ro.t |
|
239 | 239 | test-gendoc-ru.t |
|
240 | 240 | test-gendoc-sv.t |
|
241 | 241 | test-gendoc-zh_CN.t |
|
242 | 242 | test-gendoc-zh_TW.t |
|
243 | 243 | test-gendoc.t |
|
244 | 244 | test-generaldelta.t |
|
245 | 245 | test-getbundle.t |
|
246 | 246 | test-git-export.t |
|
247 | 247 | test-githelp.t |
|
248 | 248 | test-globalopts.t |
|
249 | 249 | test-glog-beautifygraph.t |
|
250 | 250 | test-glog-topological.t |
|
251 | 251 | test-glog.t |
|
252 | 252 | test-gpg.t |
|
253 | 253 | test-graft.t |
|
254 | 254 | test-grep.t |
|
255 | 255 | test-hardlinks.t |
|
256 | 256 | test-help-hide.t |
|
257 | 257 | test-help.t |
|
258 | 258 | test-hg-parseurl.py |
|
259 | 259 | test-hghave.t |
|
260 | 260 | test-hgignore.t |
|
261 | 261 | test-hgk.t |
|
262 | 262 | test-hgrc.t |
|
263 | 263 | test-hgweb-annotate-whitespace.t |
|
264 | 264 | test-hgweb-auth.py |
|
265 | 265 | test-hgweb-bundle.t |
|
266 | 266 | test-hgweb-commands.t |
|
267 | 267 | test-hgweb-csp.t |
|
268 | 268 | test-hgweb-descend-empties.t |
|
269 | 269 | test-hgweb-diffs.t |
|
270 | 270 | test-hgweb-empty.t |
|
271 | 271 | test-hgweb-filelog.t |
|
272 | 272 | test-hgweb-no-path-info.t |
|
273 | 273 | test-hgweb-no-request-uri.t |
|
274 | 274 | test-hgweb-non-interactive.t |
|
275 | 275 | test-hgweb-raw.t |
|
276 | 276 | test-hgweb-removed.t |
|
277 | 277 | test-hgweb-symrev.t |
|
278 | 278 | test-hgweb.t |
|
279 | 279 | test-hgwebdir-paths.py |
|
280 | 280 | test-hgwebdir.t |
|
281 | 281 | test-hgwebdirsym.t |
|
282 | 282 | test-histedit-arguments.t |
|
283 | 283 | test-histedit-base.t |
|
284 | 284 | test-histedit-bookmark-motion.t |
|
285 | 285 | test-histedit-commute.t |
|
286 | 286 | test-histedit-drop.t |
|
287 | 287 | test-histedit-edit.t |
|
288 | 288 | test-histedit-fold-non-commute.t |
|
289 | 289 | test-histedit-fold.t |
|
290 | 290 | test-histedit-no-backup.t |
|
291 | 291 | test-histedit-no-change.t |
|
292 | 292 | test-histedit-non-commute-abort.t |
|
293 | 293 | test-histedit-non-commute.t |
|
294 | 294 | test-histedit-obsolete.t |
|
295 | 295 | test-histedit-outgoing.t |
|
296 | 296 | test-histedit-templates.t |
|
297 | 297 | test-http-api-httpv2.t |
|
298 | 298 | test-http-api.t |
|
299 | 299 | test-http-bad-server.t |
|
300 | 300 | test-http-branchmap.t |
|
301 | 301 | test-http-bundle1.t |
|
302 | 302 | test-http-clone-r.t |
|
303 | 303 | test-http-permissions.t |
|
304 | 304 | test-http-protocol.t |
|
305 | 305 | test-http.t |
|
306 | 306 | test-hybridencode.py |
|
307 | 307 | test-i18n.t |
|
308 | 308 | test-identify.t |
|
309 | 309 | test-impexp-branch.t |
|
310 | 310 | test-import-bypass.t |
|
311 | 311 | test-import-context.t |
|
312 | 312 | test-import-eol.t |
|
313 | 313 | test-import-merge.t |
|
314 | 314 | test-import-unknown.t |
|
315 | 315 | test-import.t |
|
316 | 316 | test-imports-checker.t |
|
317 | 317 | test-incoming-outgoing.t |
|
318 | 318 | test-infinitepush-bundlestore.t |
|
319 | 319 | test-infinitepush-ci.t |
|
320 | 320 | test-infinitepush.t |
|
321 | 321 | test-inherit-mode.t |
|
322 | 322 | test-init.t |
|
323 | 323 | test-install.t |
|
324 | 324 | test-issue1089.t |
|
325 | 325 | test-issue1102.t |
|
326 | 326 | test-issue1175.t |
|
327 | 327 | test-issue1306.t |
|
328 | 328 | test-issue1438.t |
|
329 | 329 | test-issue1502.t |
|
330 | 330 | test-issue1802.t |
|
331 | 331 | test-issue1877.t |
|
332 | 332 | test-issue1993.t |
|
333 | 333 | test-issue2137.t |
|
334 | 334 | test-issue3084.t |
|
335 | 335 | test-issue4074.t |
|
336 | 336 | test-issue522.t |
|
337 | 337 | test-issue586.t |
|
338 | 338 | test-issue5979.t |
|
339 | 339 | test-issue612.t |
|
340 | 340 | test-issue619.t |
|
341 | 341 | test-issue660.t |
|
342 | 342 | test-issue672.t |
|
343 | 343 | test-issue842.t |
|
344 | 344 | test-journal-exists.t |
|
345 | 345 | test-journal-share.t |
|
346 | 346 | test-journal.t |
|
347 | 347 | test-keyword.t |
|
348 | 348 | test-known.t |
|
349 | 349 | test-largefiles-cache.t |
|
350 | 350 | test-largefiles-misc.t |
|
351 | 351 | test-largefiles-small-disk.t |
|
352 | 352 | test-largefiles-update.t |
|
353 | 353 | test-largefiles-wireproto.t |
|
354 | 354 | test-largefiles.t |
|
355 | 355 | test-lfconvert.t |
|
356 | 356 | test-lfs-bundle.t |
|
357 | 357 | test-lfs-largefiles.t |
|
358 | 358 | test-lfs-pointer.py |
|
359 | 359 | test-lfs-test-server.t |
|
360 | 360 | test-lfs.t |
|
361 | 361 | test-linelog.py |
|
362 | 362 | test-linerange.py |
|
363 | 363 | test-locate.t |
|
364 | 364 | test-lock-badness.t |
|
365 | 365 | test-log-exthook.t |
|
366 | 366 | test-log-linerange.t |
|
367 | 367 | test-log.t |
|
368 | 368 | test-logexchange.t |
|
369 | 369 | test-logtoprocess.t |
|
370 | 370 | test-lrucachedict.py |
|
371 | 371 | test-mactext.t |
|
372 | 372 | test-mailmap.t |
|
373 | 373 | test-manifest-merging.t |
|
374 | 374 | test-manifest.py |
|
375 | 375 | test-manifest.t |
|
376 | 376 | test-match.py |
|
377 | 377 | test-mdiff.py |
|
378 | 378 | test-merge-changedelete.t |
|
379 | 379 | test-merge-closedheads.t |
|
380 | 380 | test-merge-commit.t |
|
381 | 381 | test-merge-criss-cross.t |
|
382 | 382 | test-merge-default.t |
|
383 | 383 | test-merge-force.t |
|
384 | 384 | test-merge-halt.t |
|
385 | 385 | test-merge-internal-tools-pattern.t |
|
386 | 386 | test-merge-local.t |
|
387 | 387 | test-merge-no-file-change.t |
|
388 | 388 | test-merge-remove.t |
|
389 | 389 | test-merge-revert.t |
|
390 | 390 | test-merge-revert2.t |
|
391 | 391 | test-merge-subrepos.t |
|
392 | 392 | test-merge-symlinks.t |
|
393 | 393 | test-merge-tools.t |
|
394 | 394 | test-merge-types.t |
|
395 | 395 | test-merge1.t |
|
396 | 396 | test-merge10.t |
|
397 | 397 | test-merge2.t |
|
398 | 398 | test-merge4.t |
|
399 | 399 | test-merge5.t |
|
400 | 400 | test-merge6.t |
|
401 | 401 | test-merge7.t |
|
402 | 402 | test-merge8.t |
|
403 | 403 | test-merge9.t |
|
404 | 404 | test-minifileset.py |
|
405 | 405 | test-minirst.py |
|
406 | 406 | test-missing-capability.t |
|
407 | 407 | test-mq-eol.t |
|
408 | 408 | test-mq-git.t |
|
409 | 409 | test-mq-guards.t |
|
410 | 410 | test-mq-header-date.t |
|
411 | 411 | test-mq-header-from.t |
|
412 | 412 | test-mq-merge.t |
|
413 | 413 | test-mq-missingfiles.t |
|
414 | 414 | test-mq-pull-from-bundle.t |
|
415 | 415 | test-mq-qclone-http.t |
|
416 | 416 | test-mq-qdelete.t |
|
417 | 417 | test-mq-qdiff.t |
|
418 | 418 | test-mq-qfold.t |
|
419 | 419 | test-mq-qgoto.t |
|
420 | 420 | test-mq-qimport-fail-cleanup.t |
|
421 | 421 | test-mq-qimport.t |
|
422 | 422 | test-mq-qnew.t |
|
423 | 423 | test-mq-qpush-exact.t |
|
424 | 424 | test-mq-qpush-fail.t |
|
425 | 425 | test-mq-qqueue.t |
|
426 | 426 | test-mq-qrefresh-interactive.t |
|
427 | 427 | test-mq-qrefresh-replace-log-message.t |
|
428 | 428 | test-mq-qrefresh.t |
|
429 | 429 | test-mq-qrename.t |
|
430 | 430 | test-mq-qsave.t |
|
431 | 431 | test-mq-safety.t |
|
432 | 432 | test-mq-subrepo.t |
|
433 | 433 | test-mq-symlinks.t |
|
434 | 434 | test-mq.t |
|
435 | 435 | test-mv-cp-st-diff.t |
|
436 | 436 | test-narrow-acl.t |
|
437 | 437 | test-narrow-archive.t |
|
438 | 438 | test-narrow-clone-no-ellipsis.t |
|
439 | 439 | test-narrow-clone-non-narrow-server.t |
|
440 | 440 | test-narrow-clone-nonlinear.t |
|
441 | 441 | test-narrow-clone-stream.t |
|
442 | 442 | test-narrow-clone.t |
|
443 | 443 | test-narrow-commit.t |
|
444 | 444 | test-narrow-copies.t |
|
445 | 445 | test-narrow-debugcommands.t |
|
446 | 446 | test-narrow-debugrebuilddirstate.t |
|
447 | 447 | test-narrow-exchange-merges.t |
|
448 | 448 | test-narrow-exchange.t |
|
449 | 449 | test-narrow-expanddirstate.t |
|
450 | 450 | test-narrow-merge.t |
|
451 | 451 | test-narrow-patch.t |
|
452 | 452 | test-narrow-patterns.t |
|
453 | 453 | test-narrow-pull.t |
|
454 | 454 | test-narrow-rebase.t |
|
455 | 455 | test-narrow-shallow-merges.t |
|
456 | 456 | test-narrow-shallow.t |
|
457 | 457 | test-narrow-share.t |
|
458 | 458 | test-narrow-sparse.t |
|
459 | 459 | test-narrow-strip.t |
|
460 | 460 | test-narrow-trackedcmd.t |
|
461 | 461 | test-narrow-update.t |
|
462 | 462 | test-narrow-widen-no-ellipsis.t |
|
463 | 463 | test-narrow-widen.t |
|
464 | 464 | test-narrow.t |
|
465 | 465 | test-nested-repo.t |
|
466 | 466 | test-newbranch.t |
|
467 | 467 | test-newcgi.t |
|
468 | 468 | test-newercgi.t |
|
469 | 469 | test-nointerrupt.t |
|
470 | 470 | test-notify-changegroup.t |
|
471 | 471 | test-obshistory.t |
|
472 | 472 | test-obsmarker-template.t |
|
473 | 473 | test-obsmarkers-effectflag.t |
|
474 | 474 | test-obsolete-bounds-checking.t |
|
475 | 475 | test-obsolete-bundle-strip.t |
|
476 | 476 | test-obsolete-changeset-exchange.t |
|
477 | 477 | test-obsolete-checkheads.t |
|
478 | 478 | test-obsolete-distributed.t |
|
479 | 479 | test-obsolete-divergent.t |
|
480 | 480 | test-obsolete-tag-cache.t |
|
481 | 481 | test-obsolete.t |
|
482 | 482 | test-oldcgi.t |
|
483 | 483 | test-origbackup-conflict.t |
|
484 | 484 | test-pager-legacy.t |
|
485 | 485 | test-pager.t |
|
486 | 486 | test-parents.t |
|
487 | 487 | test-parse-date.t |
|
488 | 488 | test-parseindex.t |
|
489 | 489 | test-parseindex2.py |
|
490 | 490 | test-patch-offset.t |
|
491 | 491 | test-patch.t |
|
492 | 492 | test-patchbomb-bookmark.t |
|
493 | 493 | test-patchbomb-tls.t |
|
494 | 494 | test-patchbomb.t |
|
495 | 495 | test-pathconflicts-basic.t |
|
496 | 496 | test-pathconflicts-merge.t |
|
497 | 497 | test-pathconflicts-update.t |
|
498 | 498 | test-pathencode.py |
|
499 | 499 | test-pending.t |
|
500 | 500 | test-permissions.t |
|
501 | 501 | test-phases-exchange.t |
|
502 | 502 | test-phases.t |
|
503 | 503 | test-profile.t |
|
504 | 504 | test-progress.t |
|
505 | 505 | test-propertycache.py |
|
506 | 506 | test-pull-branch.t |
|
507 | 507 | test-pull-bundle.t |
|
508 | 508 | test-pull-http.t |
|
509 | 509 | test-pull-permission.t |
|
510 | 510 | test-pull-pull-corruption.t |
|
511 | 511 | test-pull-r.t |
|
512 | 512 | test-pull-update.t |
|
513 | 513 | test-pull.t |
|
514 | 514 | test-purge.t |
|
515 | 515 | test-push-cgi.t |
|
516 | 516 | test-push-checkheads-partial-C1.t |
|
517 | 517 | test-push-checkheads-partial-C2.t |
|
518 | 518 | test-push-checkheads-partial-C3.t |
|
519 | 519 | test-push-checkheads-partial-C4.t |
|
520 | 520 | test-push-checkheads-pruned-B1.t |
|
521 | 521 | test-push-checkheads-pruned-B2.t |
|
522 | 522 | test-push-checkheads-pruned-B3.t |
|
523 | 523 | test-push-checkheads-pruned-B4.t |
|
524 | 524 | test-push-checkheads-pruned-B5.t |
|
525 | 525 | test-push-checkheads-pruned-B6.t |
|
526 | 526 | test-push-checkheads-pruned-B7.t |
|
527 | 527 | test-push-checkheads-pruned-B8.t |
|
528 | 528 | test-push-checkheads-superceed-A1.t |
|
529 | 529 | test-push-checkheads-superceed-A2.t |
|
530 | 530 | test-push-checkheads-superceed-A3.t |
|
531 | 531 | test-push-checkheads-superceed-A4.t |
|
532 | 532 | test-push-checkheads-superceed-A5.t |
|
533 | 533 | test-push-checkheads-superceed-A6.t |
|
534 | 534 | test-push-checkheads-superceed-A7.t |
|
535 | 535 | test-push-checkheads-superceed-A8.t |
|
536 | 536 | test-push-checkheads-unpushed-D1.t |
|
537 | 537 | test-push-checkheads-unpushed-D2.t |
|
538 | 538 | test-push-checkheads-unpushed-D3.t |
|
539 | 539 | test-push-checkheads-unpushed-D4.t |
|
540 | 540 | test-push-checkheads-unpushed-D5.t |
|
541 | 541 | test-push-checkheads-unpushed-D6.t |
|
542 | 542 | test-push-checkheads-unpushed-D7.t |
|
543 | 543 | test-push-http.t |
|
544 | 544 | test-push-race.t |
|
545 | 545 | test-push-warn.t |
|
546 | 546 | test-push.t |
|
547 | 547 | test-pushvars.t |
|
548 | 548 | test-qrecord.t |
|
549 | 549 | test-rebase-abort.t |
|
550 | 550 | test-rebase-backup.t |
|
551 | 551 | test-rebase-base-flag.t |
|
552 | 552 | test-rebase-bookmarks.t |
|
553 | 553 | test-rebase-brute-force.t |
|
554 | 554 | test-rebase-cache.t |
|
555 | 555 | test-rebase-check-restore.t |
|
556 | 556 | test-rebase-collapse.t |
|
557 | 557 | test-rebase-conflicts.t |
|
558 | 558 | test-rebase-dest.t |
|
559 | 559 | test-rebase-detach.t |
|
560 | 560 | test-rebase-emptycommit.t |
|
561 | 561 | test-rebase-inmemory.t |
|
562 | 562 | test-rebase-interruptions.t |
|
563 | 563 | test-rebase-issue-noparam-single-rev.t |
|
564 | 564 | test-rebase-legacy.t |
|
565 | 565 | test-rebase-mq-skip.t |
|
566 | 566 | test-rebase-mq.t |
|
567 | 567 | test-rebase-named-branches.t |
|
568 | 568 | test-rebase-newancestor.t |
|
569 | 569 | test-rebase-obsolete.t |
|
570 | 570 | test-rebase-parameters.t |
|
571 | 571 | test-rebase-partial.t |
|
572 | 572 | test-rebase-pull.t |
|
573 | 573 | test-rebase-rename.t |
|
574 | 574 | test-rebase-scenario-global.t |
|
575 | 575 | test-rebase-templates.t |
|
576 | 576 | test-rebase-transaction.t |
|
577 | 577 | test-rebuildstate.t |
|
578 | 578 | test-record.t |
|
579 | 579 | test-releasenotes-formatting.t |
|
580 | 580 | test-releasenotes-merging.t |
|
581 | 581 | test-releasenotes-parsing.t |
|
582 | 582 | test-relink.t |
|
583 | 583 | test-remotefilelog-bad-configs.t |
|
584 | 584 | test-remotefilelog-bgprefetch.t |
|
585 | 585 | test-remotefilelog-blame.t |
|
586 | 586 | test-remotefilelog-bundle2.t |
|
587 | 587 | test-remotefilelog-bundles.t |
|
588 | 588 | test-remotefilelog-cacheprocess.t |
|
589 | 589 | test-remotefilelog-clone-tree.t |
|
590 | 590 | test-remotefilelog-clone.t |
|
591 | test-remotefilelog-datapack.py | |
|
591 | 592 | test-remotefilelog-gcrepack.t |
|
592 | 593 | test-remotefilelog-histpack.py |
|
593 | 594 | test-remotefilelog-http.t |
|
594 | 595 | test-remotefilelog-keepset.t |
|
595 | 596 | test-remotefilelog-local.t |
|
596 | 597 | test-remotefilelog-log.t |
|
597 | 598 | test-remotefilelog-partial-shallow.t |
|
598 | 599 | test-remotefilelog-permissions.t |
|
599 | 600 | test-remotefilelog-permisssions.t |
|
600 | 601 | test-remotefilelog-prefetch.t |
|
601 | 602 | test-remotefilelog-pull-noshallow.t |
|
602 | 603 | test-remotefilelog-share.t |
|
603 | 604 | test-remotefilelog-sparse.t |
|
604 | 605 | test-remotefilelog-tags.t |
|
605 | 606 | test-remotefilelog-wireproto.t |
|
606 | 607 | test-remove.t |
|
607 | 608 | test-removeemptydirs.t |
|
608 | 609 | test-rename-after-merge.t |
|
609 | 610 | test-rename-dir-merge.t |
|
610 | 611 | test-rename-merge1.t |
|
611 | 612 | test-rename-merge2.t |
|
612 | 613 | test-rename.t |
|
613 | 614 | test-repair-strip.t |
|
614 | 615 | test-repo-compengines.t |
|
615 | 616 | test-requires.t |
|
616 | 617 | test-resolve.t |
|
617 | 618 | test-revert-flags.t |
|
618 | 619 | test-revert-interactive.t |
|
619 | 620 | test-revert-unknown.t |
|
620 | 621 | test-revert.t |
|
621 | 622 | test-revisions.t |
|
622 | 623 | test-revlog-ancestry.py |
|
623 | 624 | test-revlog-group-emptyiter.t |
|
624 | 625 | test-revlog-mmapindex.t |
|
625 | 626 | test-revlog-packentry.t |
|
626 | 627 | test-revlog-raw.py |
|
627 | 628 | test-revlog-v2.t |
|
628 | 629 | test-revlog.t |
|
629 | 630 | test-revset-dirstate-parents.t |
|
630 | 631 | test-revset-legacy-lookup.t |
|
631 | 632 | test-revset-outgoing.t |
|
632 | 633 | test-rollback.t |
|
633 | 634 | test-run-tests.py |
|
634 | 635 | test-run-tests.t |
|
635 | 636 | test-rust-ancestor.py |
|
636 | 637 | test-schemes.t |
|
637 | 638 | test-serve.t |
|
638 | 639 | test-setdiscovery.t |
|
639 | 640 | test-share.t |
|
640 | 641 | test-shelve.t |
|
641 | 642 | test-shelve2.t |
|
642 | 643 | test-show-stack.t |
|
643 | 644 | test-show-work.t |
|
644 | 645 | test-show.t |
|
645 | 646 | test-simple-update.t |
|
646 | 647 | test-simplekeyvaluefile.py |
|
647 | 648 | test-simplemerge.py |
|
648 | 649 | test-single-head.t |
|
649 | 650 | test-sparse-clear.t |
|
650 | 651 | test-sparse-clone.t |
|
651 | 652 | test-sparse-import.t |
|
652 | 653 | test-sparse-merges.t |
|
653 | 654 | test-sparse-profiles.t |
|
654 | 655 | test-sparse-requirement.t |
|
655 | 656 | test-sparse-verbose-json.t |
|
656 | 657 | test-sparse.t |
|
657 | 658 | test-split.t |
|
658 | 659 | test-ssh-bundle1.t |
|
659 | 660 | test-ssh-clone-r.t |
|
660 | 661 | test-ssh-proto-unbundle.t |
|
661 | 662 | test-ssh-proto.t |
|
662 | 663 | test-ssh-repoerror.t |
|
663 | 664 | test-ssh.t |
|
664 | 665 | test-sshserver.py |
|
665 | 666 | test-stack.t |
|
666 | 667 | test-static-http.t |
|
667 | 668 | test-status-color.t |
|
668 | 669 | test-status-inprocess.py |
|
669 | 670 | test-status-rev.t |
|
670 | 671 | test-status-terse.t |
|
671 | 672 | test-status.t |
|
672 | 673 | test-storage.py |
|
673 | 674 | test-stream-bundle-v2.t |
|
674 | 675 | test-strict.t |
|
675 | 676 | test-strip-cross.t |
|
676 | 677 | test-strip.t |
|
677 | 678 | test-subrepo-deep-nested-change.t |
|
678 | 679 | test-subrepo-missing.t |
|
679 | 680 | test-subrepo-paths.t |
|
680 | 681 | test-subrepo-recursion.t |
|
681 | 682 | test-subrepo-relative-path.t |
|
682 | 683 | test-subrepo.t |
|
683 | 684 | test-symlink-os-yes-fs-no.py |
|
684 | 685 | test-symlink-placeholder.t |
|
685 | 686 | test-symlinks.t |
|
686 | 687 | test-tag.t |
|
687 | 688 | test-tags.t |
|
688 | 689 | test-template-basic.t |
|
689 | 690 | test-template-functions.t |
|
690 | 691 | test-template-keywords.t |
|
691 | 692 | test-template-map.t |
|
692 | 693 | test-tools.t |
|
693 | 694 | test-transplant.t |
|
694 | 695 | test-treediscovery-legacy.t |
|
695 | 696 | test-treediscovery.t |
|
696 | 697 | test-treemanifest.t |
|
697 | 698 | test-ui-color.py |
|
698 | 699 | test-ui-config.py |
|
699 | 700 | test-ui-verbosity.py |
|
700 | 701 | test-unamend.t |
|
701 | 702 | test-unbundlehash.t |
|
702 | 703 | test-uncommit.t |
|
703 | 704 | test-unified-test.t |
|
704 | 705 | test-unionrepo.t |
|
705 | 706 | test-unrelated-pull.t |
|
706 | 707 | test-up-local-change.t |
|
707 | 708 | test-update-atomic.t |
|
708 | 709 | test-update-branches.t |
|
709 | 710 | test-update-dest.t |
|
710 | 711 | test-update-issue1456.t |
|
711 | 712 | test-update-names.t |
|
712 | 713 | test-update-reverse.t |
|
713 | 714 | test-upgrade-repo.t |
|
714 | 715 | test-url-download.t |
|
715 | 716 | test-url-rev.t |
|
716 | 717 | test-url.py |
|
717 | 718 | test-username-newline.t |
|
718 | 719 | test-util.py |
|
719 | 720 | test-verify.t |
|
720 | 721 | test-walk.t |
|
721 | 722 | test-walkrepo.py |
|
722 | 723 | test-websub.t |
|
723 | 724 | test-win32text.t |
|
724 | 725 | test-wireproto-caching.t |
|
725 | 726 | test-wireproto-clientreactor.py |
|
726 | 727 | test-wireproto-command-branchmap.t |
|
727 | 728 | test-wireproto-command-capabilities.t |
|
728 | 729 | test-wireproto-command-changesetdata.t |
|
729 | 730 | test-wireproto-command-filedata.t |
|
730 | 731 | test-wireproto-command-filesdata.t |
|
731 | 732 | test-wireproto-command-heads.t |
|
732 | 733 | test-wireproto-command-known.t |
|
733 | 734 | test-wireproto-command-listkeys.t |
|
734 | 735 | test-wireproto-command-lookup.t |
|
735 | 736 | test-wireproto-command-manifestdata.t |
|
736 | 737 | test-wireproto-command-pushkey.t |
|
737 | 738 | test-wireproto-command-rawstorefiledata.t |
|
738 | 739 | test-wireproto-content-redirects.t |
|
739 | 740 | test-wireproto-exchangev2.t |
|
740 | 741 | test-wireproto-framing.py |
|
741 | 742 | test-wireproto-serverreactor.py |
|
742 | 743 | test-wireproto.py |
|
743 | 744 | test-wireproto.t |
|
744 | 745 | test-wsgirequest.py |
|
745 | 746 | test-xdg.t |
@@ -1,458 +1,458 b'' | |||
|
1 | 1 | from __future__ import absolute_import |
|
2 | 2 | |
|
3 | 3 | import struct |
|
4 | 4 | import zlib |
|
5 | 5 | |
|
6 | 6 | from mercurial.node import hex, nullid |
|
7 | 7 | from mercurial.i18n import _ |
|
8 | 8 | from mercurial import ( |
|
9 | 9 | pycompat, |
|
10 | 10 | util, |
|
11 | 11 | ) |
|
12 | 12 | from . import ( |
|
13 | 13 | basepack, |
|
14 | 14 | constants, |
|
15 | 15 | shallowutil, |
|
16 | 16 | ) |
|
17 | 17 | |
|
18 | 18 | NODELENGTH = 20 |
|
19 | 19 | |
|
20 | 20 | # The indicator value in the index for a fulltext entry. |
|
21 | 21 | FULLTEXTINDEXMARK = -1 |
|
22 | 22 | NOBASEINDEXMARK = -2 |
|
23 | 23 | |
|
24 | 24 | INDEXSUFFIX = '.dataidx' |
|
25 | 25 | PACKSUFFIX = '.datapack' |
|
26 | 26 | |
|
27 | 27 | class datapackstore(basepack.basepackstore): |
|
28 | 28 | INDEXSUFFIX = INDEXSUFFIX |
|
29 | 29 | PACKSUFFIX = PACKSUFFIX |
|
30 | 30 | |
|
31 | 31 | def __init__(self, ui, path): |
|
32 | 32 | super(datapackstore, self).__init__(ui, path) |
|
33 | 33 | |
|
34 | 34 | def getpack(self, path): |
|
35 | 35 | return datapack(path) |
|
36 | 36 | |
|
37 | 37 | def get(self, name, node): |
|
38 | 38 | raise RuntimeError("must use getdeltachain with datapackstore") |
|
39 | 39 | |
|
40 | 40 | def getmeta(self, name, node): |
|
41 | 41 | for pack in self.packs: |
|
42 | 42 | try: |
|
43 | 43 | return pack.getmeta(name, node) |
|
44 | 44 | except KeyError: |
|
45 | 45 | pass |
|
46 | 46 | |
|
47 | 47 | for pack in self.refresh(): |
|
48 | 48 | try: |
|
49 | 49 | return pack.getmeta(name, node) |
|
50 | 50 | except KeyError: |
|
51 | 51 | pass |
|
52 | 52 | |
|
53 | 53 | raise KeyError((name, hex(node))) |
|
54 | 54 | |
|
55 | 55 | def getdelta(self, name, node): |
|
56 | 56 | for pack in self.packs: |
|
57 | 57 | try: |
|
58 | 58 | return pack.getdelta(name, node) |
|
59 | 59 | except KeyError: |
|
60 | 60 | pass |
|
61 | 61 | |
|
62 | 62 | for pack in self.refresh(): |
|
63 | 63 | try: |
|
64 | 64 | return pack.getdelta(name, node) |
|
65 | 65 | except KeyError: |
|
66 | 66 | pass |
|
67 | 67 | |
|
68 | 68 | raise KeyError((name, hex(node))) |
|
69 | 69 | |
|
70 | 70 | def getdeltachain(self, name, node): |
|
71 | 71 | for pack in self.packs: |
|
72 | 72 | try: |
|
73 | 73 | return pack.getdeltachain(name, node) |
|
74 | 74 | except KeyError: |
|
75 | 75 | pass |
|
76 | 76 | |
|
77 | 77 | for pack in self.refresh(): |
|
78 | 78 | try: |
|
79 | 79 | return pack.getdeltachain(name, node) |
|
80 | 80 | except KeyError: |
|
81 | 81 | pass |
|
82 | 82 | |
|
83 | 83 | raise KeyError((name, hex(node))) |
|
84 | 84 | |
|
85 | 85 | def add(self, name, node, data): |
|
86 | 86 | raise RuntimeError("cannot add to datapackstore") |
|
87 | 87 | |
|
88 | 88 | class datapack(basepack.basepack): |
|
89 | 89 | INDEXSUFFIX = INDEXSUFFIX |
|
90 | 90 | PACKSUFFIX = PACKSUFFIX |
|
91 | 91 | |
|
92 | 92 | # Format is <node><delta offset><pack data offset><pack data size> |
|
93 | 93 | # See the mutabledatapack doccomment for more details. |
|
94 | 94 | INDEXFORMAT = '!20siQQ' |
|
95 | 95 | INDEXENTRYLENGTH = 40 |
|
96 | 96 | |
|
97 | 97 | SUPPORTED_VERSIONS = [2] |
|
98 | 98 | |
|
99 | 99 | def getmissing(self, keys): |
|
100 | 100 | missing = [] |
|
101 | 101 | for name, node in keys: |
|
102 | 102 | value = self._find(node) |
|
103 | 103 | if not value: |
|
104 | 104 | missing.append((name, node)) |
|
105 | 105 | |
|
106 | 106 | return missing |
|
107 | 107 | |
|
108 | 108 | def get(self, name, node): |
|
109 | 109 | raise RuntimeError("must use getdeltachain with datapack (%s:%s)" |
|
110 | 110 | % (name, hex(node))) |
|
111 | 111 | |
|
112 | 112 | def getmeta(self, name, node): |
|
113 | 113 | value = self._find(node) |
|
114 | 114 | if value is None: |
|
115 | 115 | raise KeyError((name, hex(node))) |
|
116 | 116 | |
|
117 | 117 | node, deltabaseoffset, offset, size = value |
|
118 | 118 | rawentry = self._data[offset:offset + size] |
|
119 | 119 | |
|
120 | 120 | # see docstring of mutabledatapack for the format |
|
121 | 121 | offset = 0 |
|
122 | 122 | offset += struct.unpack_from('!H', rawentry, offset)[0] + 2 # filename |
|
123 | 123 | offset += 40 # node, deltabase node |
|
124 | 124 | offset += struct.unpack_from('!Q', rawentry, offset)[0] + 8 # delta |
|
125 | 125 | |
|
126 | 126 | metalen = struct.unpack_from('!I', rawentry, offset)[0] |
|
127 | 127 | offset += 4 |
|
128 | 128 | |
|
129 | 129 | meta = shallowutil.parsepackmeta(rawentry[offset:offset + metalen]) |
|
130 | 130 | |
|
131 | 131 | return meta |
|
132 | 132 | |
|
133 | 133 | def getdelta(self, name, node): |
|
134 | 134 | value = self._find(node) |
|
135 | 135 | if value is None: |
|
136 | 136 | raise KeyError((name, hex(node))) |
|
137 | 137 | |
|
138 | 138 | node, deltabaseoffset, offset, size = value |
|
139 | 139 | entry = self._readentry(offset, size, getmeta=True) |
|
140 | 140 | filename, node, deltabasenode, delta, meta = entry |
|
141 | 141 | |
|
142 | 142 | # If we've read a lot of data from the mmap, free some memory. |
|
143 | 143 | self.freememory() |
|
144 | 144 | |
|
145 | 145 | return delta, filename, deltabasenode, meta |
|
146 | 146 | |
|
147 | 147 | def getdeltachain(self, name, node): |
|
148 | 148 | value = self._find(node) |
|
149 | 149 | if value is None: |
|
150 | 150 | raise KeyError((name, hex(node))) |
|
151 | 151 | |
|
152 | 152 | params = self.params |
|
153 | 153 | |
|
154 | 154 | # Precompute chains |
|
155 | 155 | chain = [value] |
|
156 | 156 | deltabaseoffset = value[1] |
|
157 | 157 | entrylen = self.INDEXENTRYLENGTH |
|
158 | 158 | while (deltabaseoffset != FULLTEXTINDEXMARK |
|
159 | 159 | and deltabaseoffset != NOBASEINDEXMARK): |
|
160 | 160 | loc = params.indexstart + deltabaseoffset |
|
161 | 161 | value = struct.unpack(self.INDEXFORMAT, |
|
162 | 162 | self._index[loc:loc + entrylen]) |
|
163 | 163 | deltabaseoffset = value[1] |
|
164 | 164 | chain.append(value) |
|
165 | 165 | |
|
166 | 166 | # Read chain data |
|
167 | 167 | deltachain = [] |
|
168 | 168 | for node, deltabaseoffset, offset, size in chain: |
|
169 | 169 | filename, node, deltabasenode, delta = self._readentry(offset, size) |
|
170 | 170 | deltachain.append((filename, node, filename, deltabasenode, delta)) |
|
171 | 171 | |
|
172 | 172 | # If we've read a lot of data from the mmap, free some memory. |
|
173 | 173 | self.freememory() |
|
174 | 174 | |
|
175 | 175 | return deltachain |
|
176 | 176 | |
|
177 | 177 | def _readentry(self, offset, size, getmeta=False): |
|
178 | 178 | rawentry = self._data[offset:offset + size] |
|
179 | 179 | self._pagedin += len(rawentry) |
|
180 | 180 | |
|
181 | 181 | # <2 byte len> + <filename> |
|
182 | 182 | lengthsize = 2 |
|
183 | 183 | filenamelen = struct.unpack('!H', rawentry[:2])[0] |
|
184 | 184 | filename = rawentry[lengthsize:lengthsize + filenamelen] |
|
185 | 185 | |
|
186 | 186 | # <20 byte node> + <20 byte deltabase> |
|
187 | 187 | nodestart = lengthsize + filenamelen |
|
188 | 188 | deltabasestart = nodestart + NODELENGTH |
|
189 | 189 | node = rawentry[nodestart:deltabasestart] |
|
190 | 190 | deltabasenode = rawentry[deltabasestart:deltabasestart + NODELENGTH] |
|
191 | 191 | |
|
192 | 192 | # <8 byte len> + <delta> |
|
193 | 193 | deltastart = deltabasestart + NODELENGTH |
|
194 | 194 | rawdeltalen = rawentry[deltastart:deltastart + 8] |
|
195 | 195 | deltalen = struct.unpack('!Q', rawdeltalen)[0] |
|
196 | 196 | |
|
197 | 197 | delta = rawentry[deltastart + 8:deltastart + 8 + deltalen] |
|
198 | 198 | delta = self._decompress(delta) |
|
199 | 199 | |
|
200 | 200 | if getmeta: |
|
201 | 201 | metastart = deltastart + 8 + deltalen |
|
202 | 202 | metalen = struct.unpack_from('!I', rawentry, metastart)[0] |
|
203 | 203 | |
|
204 | 204 | rawmeta = rawentry[metastart + 4:metastart + 4 + metalen] |
|
205 | 205 | meta = shallowutil.parsepackmeta(rawmeta) |
|
206 | 206 | return filename, node, deltabasenode, delta, meta |
|
207 | 207 | else: |
|
208 | 208 | return filename, node, deltabasenode, delta |
|
209 | 209 | |
|
210 | 210 | def _decompress(self, data): |
|
211 | 211 | return zlib.decompress(data) |
|
212 | 212 | |
|
213 | 213 | def add(self, name, node, data): |
|
214 | 214 | raise RuntimeError("cannot add to datapack (%s:%s)" % (name, node)) |
|
215 | 215 | |
|
216 | 216 | def _find(self, node): |
|
217 | 217 | params = self.params |
|
218 | 218 | fanoutkey = struct.unpack(params.fanoutstruct, |
|
219 | 219 | node[:params.fanoutprefix])[0] |
|
220 | 220 | fanout = self._fanouttable |
|
221 | 221 | |
|
222 | 222 | start = fanout[fanoutkey] + params.indexstart |
|
223 | 223 | indexend = self._indexend |
|
224 | 224 | |
|
225 | 225 | # Scan forward to find the first non-same entry, which is the upper |
|
226 | 226 | # bound. |
|
227 | 227 | for i in pycompat.xrange(fanoutkey + 1, params.fanoutcount): |
|
228 | 228 | end = fanout[i] + params.indexstart |
|
229 | 229 | if end != start: |
|
230 | 230 | break |
|
231 | 231 | else: |
|
232 | 232 | end = indexend |
|
233 | 233 | |
|
234 | 234 | # Bisect between start and end to find node |
|
235 | 235 | index = self._index |
|
236 | 236 | startnode = index[start:start + NODELENGTH] |
|
237 | 237 | endnode = index[end:end + NODELENGTH] |
|
238 | 238 | entrylen = self.INDEXENTRYLENGTH |
|
239 | 239 | if startnode == node: |
|
240 | 240 | entry = index[start:start + entrylen] |
|
241 | 241 | elif endnode == node: |
|
242 | 242 | entry = index[end:end + entrylen] |
|
243 | 243 | else: |
|
244 | 244 | while start < end - entrylen: |
|
245 | 245 | mid = start + (end - start) / 2 |
|
246 | mid = mid - ((mid - params.indexstart) % entrylen) | |
|
246 | mid = int(mid - ((mid - params.indexstart) % entrylen)) | |
|
247 | 247 | midnode = index[mid:mid + NODELENGTH] |
|
248 | 248 | if midnode == node: |
|
249 | 249 | entry = index[mid:mid + entrylen] |
|
250 | 250 | break |
|
251 | 251 | if node > midnode: |
|
252 | 252 | start = mid |
|
253 | 253 | elif node < midnode: |
|
254 | 254 | end = mid |
|
255 | 255 | else: |
|
256 | 256 | return None |
|
257 | 257 | |
|
258 | 258 | return struct.unpack(self.INDEXFORMAT, entry) |
|
259 | 259 | |
|
260 | 260 | def markledger(self, ledger, options=None): |
|
261 | 261 | for filename, node in self: |
|
262 | 262 | ledger.markdataentry(self, filename, node) |
|
263 | 263 | |
|
264 | 264 | def cleanup(self, ledger): |
|
265 | 265 | entries = ledger.sources.get(self, []) |
|
266 | 266 | allkeys = set(self) |
|
267 | 267 | repackedkeys = set((e.filename, e.node) for e in entries if |
|
268 | 268 | e.datarepacked or e.gced) |
|
269 | 269 | |
|
270 | 270 | if len(allkeys - repackedkeys) == 0: |
|
271 | 271 | if self.path not in ledger.created: |
|
272 | 272 | util.unlinkpath(self.indexpath, ignoremissing=True) |
|
273 | 273 | util.unlinkpath(self.packpath, ignoremissing=True) |
|
274 | 274 | |
|
275 | 275 | def __iter__(self): |
|
276 | 276 | for f, n, deltabase, deltalen in self.iterentries(): |
|
277 | 277 | yield f, n |
|
278 | 278 | |
|
279 | 279 | def iterentries(self): |
|
280 | 280 | # Start at 1 to skip the header |
|
281 | 281 | offset = 1 |
|
282 | 282 | data = self._data |
|
283 | 283 | while offset < self.datasize: |
|
284 | 284 | oldoffset = offset |
|
285 | 285 | |
|
286 | 286 | # <2 byte len> + <filename> |
|
287 | 287 | filenamelen = struct.unpack('!H', data[offset:offset + 2])[0] |
|
288 | 288 | offset += 2 |
|
289 | 289 | filename = data[offset:offset + filenamelen] |
|
290 | 290 | offset += filenamelen |
|
291 | 291 | |
|
292 | 292 | # <20 byte node> |
|
293 | 293 | node = data[offset:offset + constants.NODESIZE] |
|
294 | 294 | offset += constants.NODESIZE |
|
295 | 295 | # <20 byte deltabase> |
|
296 | 296 | deltabase = data[offset:offset + constants.NODESIZE] |
|
297 | 297 | offset += constants.NODESIZE |
|
298 | 298 | |
|
299 | 299 | # <8 byte len> + <delta> |
|
300 | 300 | rawdeltalen = data[offset:offset + 8] |
|
301 | 301 | deltalen = struct.unpack('!Q', rawdeltalen)[0] |
|
302 | 302 | offset += 8 |
|
303 | 303 | |
|
304 | 304 | # TODO(augie): we should store a header that is the |
|
305 | 305 | # uncompressed size. |
|
306 | 306 | uncompressedlen = len(self._decompress( |
|
307 | 307 | data[offset:offset + deltalen])) |
|
308 | 308 | offset += deltalen |
|
309 | 309 | |
|
310 | 310 | # <4 byte len> + <metadata-list> |
|
311 | 311 | metalen = struct.unpack_from('!I', data, offset)[0] |
|
312 | 312 | offset += 4 + metalen |
|
313 | 313 | |
|
314 | 314 | yield (filename, node, deltabase, uncompressedlen) |
|
315 | 315 | |
|
316 | 316 | # If we've read a lot of data from the mmap, free some memory. |
|
317 | 317 | self._pagedin += offset - oldoffset |
|
318 | 318 | if self.freememory(): |
|
319 | 319 | data = self._data |
|
320 | 320 | |
|
321 | 321 | class mutabledatapack(basepack.mutablebasepack): |
|
322 | 322 | """A class for constructing and serializing a datapack file and index. |
|
323 | 323 | |
|
324 | 324 | A datapack is a pair of files that contain the revision contents for various |
|
325 | 325 | file revisions in Mercurial. It contains only revision contents (like file |
|
326 | 326 | contents), not any history information. |
|
327 | 327 | |
|
328 | 328 | It consists of two files, with the following format. All bytes are in |
|
329 | 329 | network byte order (big endian). |
|
330 | 330 | |
|
331 | 331 | .datapack |
|
332 | 332 | The pack itself is a series of revision deltas with some basic header |
|
333 | 333 | information on each. A revision delta may be a fulltext, represented by |
|
334 | 334 | a deltabasenode equal to the nullid. |
|
335 | 335 | |
|
336 | 336 | datapack = <version: 1 byte> |
|
337 | 337 | [<revision>,...] |
|
338 | 338 | revision = <filename len: 2 byte unsigned int> |
|
339 | 339 | <filename> |
|
340 | 340 | <node: 20 byte> |
|
341 | 341 | <deltabasenode: 20 byte> |
|
342 | 342 | <delta len: 8 byte unsigned int> |
|
343 | 343 | <delta> |
|
344 | 344 | <metadata-list len: 4 byte unsigned int> [1] |
|
345 | 345 | <metadata-list> [1] |
|
346 | 346 | metadata-list = [<metadata-item>, ...] |
|
347 | 347 | metadata-item = <metadata-key: 1 byte> |
|
348 | 348 | <metadata-value len: 2 byte unsigned> |
|
349 | 349 | <metadata-value> |
|
350 | 350 | |
|
351 | 351 | metadata-key could be METAKEYFLAG or METAKEYSIZE or other single byte |
|
352 | 352 | value in the future. |
|
353 | 353 | |
|
354 | 354 | .dataidx |
|
355 | 355 | The index file consists of two parts, the fanout and the index. |
|
356 | 356 | |
|
357 | 357 | The index is a list of index entries, sorted by node (one per revision |
|
358 | 358 | in the pack). Each entry has: |
|
359 | 359 | |
|
360 | 360 | - node (The 20 byte node of the entry; i.e. the commit hash, file node |
|
361 | 361 | hash, etc) |
|
362 | 362 | - deltabase index offset (The location in the index of the deltabase for |
|
363 | 363 | this entry. The deltabase is the next delta in |
|
364 | 364 | the chain, with the chain eventually |
|
365 | 365 | terminating in a full-text, represented by a |
|
366 | 366 | deltabase offset of -1. This lets us compute |
|
367 | 367 | delta chains from the index, then do |
|
368 | 368 | sequential reads from the pack if the revision |
|
369 | 369 | are nearby on disk.) |
|
370 | 370 | - pack entry offset (The location of this entry in the datapack) |
|
371 | 371 | - pack content size (The on-disk length of this entry's pack data) |
|
372 | 372 | |
|
373 | 373 | The fanout is a quick lookup table to reduce the number of steps for |
|
374 | 374 | bisecting the index. It is a series of 4 byte pointers to positions |
|
375 | 375 | within the index. It has 2^16 entries, which corresponds to hash |
|
376 | 376 | prefixes [0000, 0001,..., FFFE, FFFF]. Example: the pointer in slot |
|
377 | 377 | 4F0A points to the index position of the first revision whose node |
|
378 | 378 | starts with 4F0A. This saves log(2^16)=16 bisect steps. |
|
379 | 379 | |
|
380 | 380 | dataidx = <fanouttable> |
|
381 | 381 | <index> |
|
382 | 382 | fanouttable = [<index offset: 4 byte unsigned int>,...] (2^16 entries) |
|
383 | 383 | index = [<index entry>,...] |
|
384 | 384 | indexentry = <node: 20 byte> |
|
385 | 385 | <deltabase location: 4 byte signed int> |
|
386 | 386 | <pack entry offset: 8 byte unsigned int> |
|
387 | 387 | <pack entry size: 8 byte unsigned int> |
|
388 | 388 | |
|
389 | 389 | [1]: new in version 1. |
|
390 | 390 | """ |
|
391 | 391 | INDEXSUFFIX = INDEXSUFFIX |
|
392 | 392 | PACKSUFFIX = PACKSUFFIX |
|
393 | 393 | |
|
394 | 394 | # v[01] index format: <node><delta offset><pack data offset><pack data size> |
|
395 | 395 | INDEXFORMAT = datapack.INDEXFORMAT |
|
396 | 396 | INDEXENTRYLENGTH = datapack.INDEXENTRYLENGTH |
|
397 | 397 | |
|
398 | 398 | # v1 has metadata support |
|
399 | 399 | SUPPORTED_VERSIONS = [2] |
|
400 | 400 | |
|
401 | 401 | def _compress(self, data): |
|
402 | 402 | return zlib.compress(data) |
|
403 | 403 | |
|
404 | 404 | def add(self, name, node, deltabasenode, delta, metadata=None): |
|
405 | 405 | # metadata is a dict, ex. {METAKEYFLAG: flag} |
|
406 | 406 | if len(name) > 2**16: |
|
407 | 407 | raise RuntimeError(_("name too long %s") % name) |
|
408 | 408 | if len(node) != 20: |
|
409 | 409 | raise RuntimeError(_("node should be 20 bytes %s") % node) |
|
410 | 410 | |
|
411 | 411 | if node in self.entries: |
|
412 | 412 | # The revision has already been added |
|
413 | 413 | return |
|
414 | 414 | |
|
415 | 415 | # TODO: allow configurable compression |
|
416 | 416 | delta = self._compress(delta) |
|
417 | 417 | |
|
418 | 418 | rawdata = ''.join(( |
|
419 | 419 | struct.pack('!H', len(name)), # unsigned 2 byte int |
|
420 | 420 | name, |
|
421 | 421 | node, |
|
422 | 422 | deltabasenode, |
|
423 | 423 | struct.pack('!Q', len(delta)), # unsigned 8 byte int |
|
424 | 424 | delta, |
|
425 | 425 | )) |
|
426 | 426 | |
|
427 | 427 | # v1 support metadata |
|
428 | 428 | rawmeta = shallowutil.buildpackmeta(metadata) |
|
429 | 429 | rawdata += struct.pack('!I', len(rawmeta)) # unsigned 4 byte |
|
430 | 430 | rawdata += rawmeta |
|
431 | 431 | |
|
432 | 432 | offset = self.packfp.tell() |
|
433 | 433 | |
|
434 | 434 | size = len(rawdata) |
|
435 | 435 | |
|
436 | 436 | self.entries[node] = (deltabasenode, offset, size) |
|
437 | 437 | |
|
438 | 438 | self.writeraw(rawdata) |
|
439 | 439 | |
|
440 | 440 | def createindex(self, nodelocations, indexoffset): |
|
441 | 441 | entries = sorted((n, db, o, s) for n, (db, o, s) |
|
442 | 442 | in self.entries.iteritems()) |
|
443 | 443 | |
|
444 | 444 | rawindex = '' |
|
445 | 445 | fmt = self.INDEXFORMAT |
|
446 | 446 | for node, deltabase, offset, size in entries: |
|
447 | 447 | if deltabase == nullid: |
|
448 | 448 | deltabaselocation = FULLTEXTINDEXMARK |
|
449 | 449 | else: |
|
450 | 450 | # Instead of storing the deltabase node in the index, let's |
|
451 | 451 | # store a pointer directly to the index entry for the deltabase. |
|
452 | 452 | deltabaselocation = nodelocations.get(deltabase, |
|
453 | 453 | NOBASEINDEXMARK) |
|
454 | 454 | |
|
455 | 455 | entry = struct.pack(fmt, node, deltabaselocation, offset, size) |
|
456 | 456 | rawindex += entry |
|
457 | 457 | |
|
458 | 458 | return rawindex |
General Comments 0
You need to be logged in to leave comments.
Login now