Show More
@@ -1,765 +1,766 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-acl.t |
|
9 | 9 | test-add.t |
|
10 | 10 | test-addremove-similar.t |
|
11 | 11 | test-addremove.t |
|
12 | 12 | test-alias.t |
|
13 | 13 | test-amend-subrepo.t |
|
14 | 14 | test-amend.t |
|
15 | 15 | test-ancestor.py |
|
16 | 16 | test-annotate.py |
|
17 | 17 | test-annotate.t |
|
18 | 18 | test-arbitraryfilectx.t |
|
19 | 19 | test-archive-symlinks.t |
|
20 | 20 | test-archive.t |
|
21 | 21 | test-atomictempfile.py |
|
22 | 22 | test-audit-path.t |
|
23 | 23 | test-audit-subrepo.t |
|
24 | 24 | test-automv.t |
|
25 | 25 | test-backout.t |
|
26 | 26 | test-backwards-remove.t |
|
27 | 27 | test-bad-extension.t |
|
28 | 28 | test-bad-pull.t |
|
29 | 29 | test-basic.t |
|
30 | 30 | test-batching.py |
|
31 | 31 | test-bdiff.py |
|
32 | 32 | test-bheads.t |
|
33 | 33 | test-bisect.t |
|
34 | 34 | test-bisect2.t |
|
35 | 35 | test-bisect3.t |
|
36 | 36 | test-blackbox.t |
|
37 | 37 | test-bookflow.t |
|
38 | 38 | test-bookmarks-current.t |
|
39 | 39 | test-bookmarks-merge.t |
|
40 | 40 | test-bookmarks-pushpull.t |
|
41 | 41 | test-bookmarks-rebase.t |
|
42 | 42 | test-bookmarks-strip.t |
|
43 | 43 | test-bookmarks.t |
|
44 | 44 | test-branch-change.t |
|
45 | 45 | test-branch-option.t |
|
46 | 46 | test-branch-tag-confict.t |
|
47 | 47 | test-branches.t |
|
48 | 48 | test-bugzilla.t |
|
49 | 49 | test-bundle-phases.t |
|
50 | 50 | test-bundle-r.t |
|
51 | 51 | test-bundle-type.t |
|
52 | 52 | test-bundle-vs-outgoing.t |
|
53 | 53 | test-bundle.t |
|
54 | 54 | test-bundle2-exchange.t |
|
55 | 55 | test-bundle2-format.t |
|
56 | 56 | test-bundle2-multiple-changegroups.t |
|
57 | 57 | test-bundle2-pushback.t |
|
58 | 58 | test-bundle2-remote-changegroup.t |
|
59 | 59 | test-cache-abuse.t |
|
60 | 60 | test-cappedreader.py |
|
61 | 61 | test-casecollision-merge.t |
|
62 | 62 | test-casecollision.t |
|
63 | 63 | test-casefolding.t |
|
64 | 64 | test-cat.t |
|
65 | 65 | test-cbor.py |
|
66 | 66 | test-censor.t |
|
67 | 67 | test-changelog-exec.t |
|
68 | 68 | test-check-code.t |
|
69 | 69 | test-check-commit.t |
|
70 | 70 | test-check-config.py |
|
71 | 71 | test-check-config.t |
|
72 | 72 | test-check-execute.t |
|
73 | 73 | test-check-help.t |
|
74 | 74 | test-check-interfaces.py |
|
75 | 75 | test-check-module-imports.t |
|
76 | 76 | test-check-py3-compat.t |
|
77 | 77 | test-check-pyflakes.t |
|
78 | 78 | test-check-pylint.t |
|
79 | 79 | test-check-shbang.t |
|
80 | 80 | test-children.t |
|
81 | 81 | test-churn.t |
|
82 | 82 | test-clone-cgi.t |
|
83 | 83 | test-clone-pull-corruption.t |
|
84 | 84 | test-clone-r.t |
|
85 | 85 | test-clone-uncompressed.t |
|
86 | 86 | test-clone-update-order.t |
|
87 | 87 | test-clone.t |
|
88 | 88 | test-clonebundles.t |
|
89 | 89 | test-close-head.t |
|
90 | 90 | test-commandserver.t |
|
91 | 91 | test-commit-amend.t |
|
92 | 92 | test-commit-interactive.t |
|
93 | 93 | test-commit-multiple.t |
|
94 | 94 | test-commit-unresolved.t |
|
95 | 95 | test-commit.t |
|
96 | 96 | test-committer.t |
|
97 | 97 | test-completion.t |
|
98 | 98 | test-config-env.py |
|
99 | 99 | test-config.t |
|
100 | 100 | test-conflict.t |
|
101 | 101 | test-confused-revert.t |
|
102 | 102 | test-context-metadata.t |
|
103 | 103 | test-context.py |
|
104 | 104 | test-contrib-check-code.t |
|
105 | 105 | test-contrib-check-commit.t |
|
106 | 106 | test-contrib-dumprevlog.t |
|
107 | 107 | test-contrib-perf.t |
|
108 | 108 | test-contrib-relnotes.t |
|
109 | 109 | test-contrib-testparseutil.t |
|
110 | 110 | test-contrib.t |
|
111 | 111 | test-convert-authormap.t |
|
112 | 112 | test-convert-clonebranches.t |
|
113 | 113 | test-convert-cvs-branch.t |
|
114 | 114 | test-convert-cvs-detectmerge.t |
|
115 | 115 | test-convert-cvs-synthetic.t |
|
116 | 116 | test-convert-cvs.t |
|
117 | 117 | test-convert-cvsnt-mergepoints.t |
|
118 | 118 | test-convert-datesort.t |
|
119 | 119 | test-convert-filemap.t |
|
120 | 120 | test-convert-git.t |
|
121 | 121 | test-convert-hg-sink.t |
|
122 | 122 | test-convert-hg-source.t |
|
123 | 123 | test-convert-hg-startrev.t |
|
124 | test-convert-mtn.t | |
|
124 | 125 | test-convert-splicemap.t |
|
125 | 126 | test-convert-svn-sink.t |
|
126 | 127 | test-convert-tagsbranch-topology.t |
|
127 | 128 | test-convert.t |
|
128 | 129 | test-copy-move-merge.t |
|
129 | 130 | test-copy.t |
|
130 | 131 | test-copytrace-heuristics.t |
|
131 | 132 | test-custom-filters.t |
|
132 | 133 | test-debugbuilddag.t |
|
133 | 134 | test-debugbundle.t |
|
134 | 135 | test-debugcommands.t |
|
135 | 136 | test-debugextensions.t |
|
136 | 137 | test-debugindexdot.t |
|
137 | 138 | test-debugrename.t |
|
138 | 139 | test-default-push.t |
|
139 | 140 | test-demandimport.py |
|
140 | 141 | test-diff-antipatience.t |
|
141 | 142 | test-diff-binary-file.t |
|
142 | 143 | test-diff-change.t |
|
143 | 144 | test-diff-color.t |
|
144 | 145 | test-diff-copy-depth.t |
|
145 | 146 | test-diff-hashes.t |
|
146 | 147 | test-diff-ignore-whitespace.t |
|
147 | 148 | test-diff-indent-heuristic.t |
|
148 | 149 | test-diff-issue2761.t |
|
149 | 150 | test-diff-newlines.t |
|
150 | 151 | test-diff-reverse.t |
|
151 | 152 | test-diff-subdir.t |
|
152 | 153 | test-diff-unified.t |
|
153 | 154 | test-diff-upgrade.t |
|
154 | 155 | test-diffdir.t |
|
155 | 156 | test-diffstat.t |
|
156 | 157 | test-directaccess.t |
|
157 | 158 | test-dirstate-backup.t |
|
158 | 159 | test-dirstate-nonnormalset.t |
|
159 | 160 | test-dirstate-race.t |
|
160 | 161 | test-dirstate.t |
|
161 | 162 | test-dispatch.py |
|
162 | 163 | test-dispatch.t |
|
163 | 164 | test-doctest.py |
|
164 | 165 | test-double-merge.t |
|
165 | 166 | test-drawdag.t |
|
166 | 167 | test-duplicateoptions.py |
|
167 | 168 | test-editor-filename.t |
|
168 | 169 | test-empty-dir.t |
|
169 | 170 | test-empty-file.t |
|
170 | 171 | test-empty-group.t |
|
171 | 172 | test-empty.t |
|
172 | 173 | test-encode.t |
|
173 | 174 | test-encoding-align.t |
|
174 | 175 | test-encoding-func.py |
|
175 | 176 | test-encoding-textwrap.t |
|
176 | 177 | test-encoding.t |
|
177 | 178 | test-eol-add.t |
|
178 | 179 | test-eol-clone.t |
|
179 | 180 | test-eol-hook.t |
|
180 | 181 | test-eol-patch.t |
|
181 | 182 | test-eol-tag.t |
|
182 | 183 | test-eol-update.t |
|
183 | 184 | test-eol.t |
|
184 | 185 | test-eolfilename.t |
|
185 | 186 | test-excessive-merge.t |
|
186 | 187 | test-exchange-obsmarkers-case-A1.t |
|
187 | 188 | test-exchange-obsmarkers-case-A2.t |
|
188 | 189 | test-exchange-obsmarkers-case-A3.t |
|
189 | 190 | test-exchange-obsmarkers-case-A4.t |
|
190 | 191 | test-exchange-obsmarkers-case-A5.t |
|
191 | 192 | test-exchange-obsmarkers-case-A6.t |
|
192 | 193 | test-exchange-obsmarkers-case-A7.t |
|
193 | 194 | test-exchange-obsmarkers-case-B1.t |
|
194 | 195 | test-exchange-obsmarkers-case-B2.t |
|
195 | 196 | test-exchange-obsmarkers-case-B3.t |
|
196 | 197 | test-exchange-obsmarkers-case-B4.t |
|
197 | 198 | test-exchange-obsmarkers-case-B5.t |
|
198 | 199 | test-exchange-obsmarkers-case-B6.t |
|
199 | 200 | test-exchange-obsmarkers-case-B7.t |
|
200 | 201 | test-exchange-obsmarkers-case-C1.t |
|
201 | 202 | test-exchange-obsmarkers-case-C2.t |
|
202 | 203 | test-exchange-obsmarkers-case-C3.t |
|
203 | 204 | test-exchange-obsmarkers-case-C4.t |
|
204 | 205 | test-exchange-obsmarkers-case-D1.t |
|
205 | 206 | test-exchange-obsmarkers-case-D2.t |
|
206 | 207 | test-exchange-obsmarkers-case-D3.t |
|
207 | 208 | test-exchange-obsmarkers-case-D4.t |
|
208 | 209 | test-execute-bit.t |
|
209 | 210 | test-export.t |
|
210 | 211 | test-extdata.t |
|
211 | 212 | test-extdiff.t |
|
212 | 213 | test-extension-timing.t |
|
213 | 214 | test-extension.t |
|
214 | 215 | test-extensions-afterloaded.t |
|
215 | 216 | test-extensions-wrapfunction.py |
|
216 | 217 | test-extra-filelog-entry.t |
|
217 | 218 | test-fastannotate-corrupt.t |
|
218 | 219 | test-fastannotate-diffopts.t |
|
219 | 220 | test-fastannotate-hg.t |
|
220 | 221 | test-fastannotate-perfhack.t |
|
221 | 222 | test-fastannotate-protocol.t |
|
222 | 223 | test-fastannotate-renames.t |
|
223 | 224 | test-fastannotate-revmap.py |
|
224 | 225 | test-fastannotate.t |
|
225 | 226 | test-fetch.t |
|
226 | 227 | test-filebranch.t |
|
227 | 228 | test-filecache.py |
|
228 | 229 | test-filelog.py |
|
229 | 230 | test-fileset-generated.t |
|
230 | 231 | test-fileset.t |
|
231 | 232 | test-fix-topology.t |
|
232 | 233 | test-fix.t |
|
233 | 234 | test-flagprocessor.t |
|
234 | 235 | test-flags.t |
|
235 | 236 | test-fncache.t |
|
236 | 237 | test-gendoc-da.t |
|
237 | 238 | test-gendoc-de.t |
|
238 | 239 | test-gendoc-el.t |
|
239 | 240 | test-gendoc-fr.t |
|
240 | 241 | test-gendoc-it.t |
|
241 | 242 | test-gendoc-ja.t |
|
242 | 243 | test-gendoc-pt_BR.t |
|
243 | 244 | test-gendoc-ro.t |
|
244 | 245 | test-gendoc-ru.t |
|
245 | 246 | test-gendoc-sv.t |
|
246 | 247 | test-gendoc-zh_CN.t |
|
247 | 248 | test-gendoc-zh_TW.t |
|
248 | 249 | test-gendoc.t |
|
249 | 250 | test-generaldelta.t |
|
250 | 251 | test-getbundle.t |
|
251 | 252 | test-git-export.t |
|
252 | 253 | test-githelp.t |
|
253 | 254 | test-globalopts.t |
|
254 | 255 | test-glog-beautifygraph.t |
|
255 | 256 | test-glog-topological.t |
|
256 | 257 | test-glog.t |
|
257 | 258 | test-gpg.t |
|
258 | 259 | test-graft.t |
|
259 | 260 | test-grep.t |
|
260 | 261 | test-hardlinks.t |
|
261 | 262 | test-help-hide.t |
|
262 | 263 | test-help.t |
|
263 | 264 | test-hg-parseurl.py |
|
264 | 265 | test-hghave.t |
|
265 | 266 | test-hgignore.t |
|
266 | 267 | test-hgk.t |
|
267 | 268 | test-hgrc.t |
|
268 | 269 | test-hgweb-annotate-whitespace.t |
|
269 | 270 | test-hgweb-auth.py |
|
270 | 271 | test-hgweb-bundle.t |
|
271 | 272 | test-hgweb-commands.t |
|
272 | 273 | test-hgweb-csp.t |
|
273 | 274 | test-hgweb-descend-empties.t |
|
274 | 275 | test-hgweb-diffs.t |
|
275 | 276 | test-hgweb-empty.t |
|
276 | 277 | test-hgweb-filelog.t |
|
277 | 278 | test-hgweb-json.t |
|
278 | 279 | test-hgweb-no-path-info.t |
|
279 | 280 | test-hgweb-no-request-uri.t |
|
280 | 281 | test-hgweb-non-interactive.t |
|
281 | 282 | test-hgweb-raw.t |
|
282 | 283 | test-hgweb-removed.t |
|
283 | 284 | test-hgweb-symrev.t |
|
284 | 285 | test-hgweb.t |
|
285 | 286 | test-hgwebdir-paths.py |
|
286 | 287 | test-hgwebdir.t |
|
287 | 288 | test-hgwebdirsym.t |
|
288 | 289 | test-histedit-arguments.t |
|
289 | 290 | test-histedit-base.t |
|
290 | 291 | test-histedit-bookmark-motion.t |
|
291 | 292 | test-histedit-commute.t |
|
292 | 293 | test-histedit-drop.t |
|
293 | 294 | test-histedit-edit.t |
|
294 | 295 | test-histedit-fold-non-commute.t |
|
295 | 296 | test-histedit-fold.t |
|
296 | 297 | test-histedit-no-backup.t |
|
297 | 298 | test-histedit-no-change.t |
|
298 | 299 | test-histedit-non-commute-abort.t |
|
299 | 300 | test-histedit-non-commute.t |
|
300 | 301 | test-histedit-obsolete.t |
|
301 | 302 | test-histedit-outgoing.t |
|
302 | 303 | test-histedit-templates.t |
|
303 | 304 | test-http-api-httpv2.t |
|
304 | 305 | test-http-api.t |
|
305 | 306 | test-http-bad-server.t |
|
306 | 307 | test-http-branchmap.t |
|
307 | 308 | test-http-bundle1.t |
|
308 | 309 | test-http-clone-r.t |
|
309 | 310 | test-http-permissions.t |
|
310 | 311 | test-http-protocol.t |
|
311 | 312 | test-http.t |
|
312 | 313 | test-https.t |
|
313 | 314 | test-hybridencode.py |
|
314 | 315 | test-i18n.t |
|
315 | 316 | test-identify.t |
|
316 | 317 | test-impexp-branch.t |
|
317 | 318 | test-import-bypass.t |
|
318 | 319 | test-import-context.t |
|
319 | 320 | test-import-eol.t |
|
320 | 321 | test-import-git.t |
|
321 | 322 | test-import-merge.t |
|
322 | 323 | test-import-unknown.t |
|
323 | 324 | test-import.t |
|
324 | 325 | test-imports-checker.t |
|
325 | 326 | test-incoming-outgoing.t |
|
326 | 327 | test-infinitepush-bundlestore.t |
|
327 | 328 | test-infinitepush-ci.t |
|
328 | 329 | test-infinitepush.t |
|
329 | 330 | test-inherit-mode.t |
|
330 | 331 | test-init.t |
|
331 | 332 | test-install.t |
|
332 | 333 | test-issue1089.t |
|
333 | 334 | test-issue1102.t |
|
334 | 335 | test-issue1175.t |
|
335 | 336 | test-issue1306.t |
|
336 | 337 | test-issue1438.t |
|
337 | 338 | test-issue1502.t |
|
338 | 339 | test-issue1802.t |
|
339 | 340 | test-issue1877.t |
|
340 | 341 | test-issue1993.t |
|
341 | 342 | test-issue2137.t |
|
342 | 343 | test-issue3084.t |
|
343 | 344 | test-issue4074.t |
|
344 | 345 | test-issue522.t |
|
345 | 346 | test-issue586.t |
|
346 | 347 | test-issue5979.t |
|
347 | 348 | test-issue612.t |
|
348 | 349 | test-issue619.t |
|
349 | 350 | test-issue660.t |
|
350 | 351 | test-issue672.t |
|
351 | 352 | test-issue842.t |
|
352 | 353 | test-journal-exists.t |
|
353 | 354 | test-journal-share.t |
|
354 | 355 | test-journal.t |
|
355 | 356 | test-keyword.t |
|
356 | 357 | test-known.t |
|
357 | 358 | test-largefiles-cache.t |
|
358 | 359 | test-largefiles-misc.t |
|
359 | 360 | test-largefiles-small-disk.t |
|
360 | 361 | test-largefiles-update.t |
|
361 | 362 | test-largefiles-wireproto.t |
|
362 | 363 | test-largefiles.t |
|
363 | 364 | test-lfconvert.t |
|
364 | 365 | test-lfs-bundle.t |
|
365 | 366 | test-lfs-largefiles.t |
|
366 | 367 | test-lfs-pointer.py |
|
367 | 368 | test-lfs-test-server.t |
|
368 | 369 | test-lfs.t |
|
369 | 370 | test-linelog.py |
|
370 | 371 | test-linerange.py |
|
371 | 372 | test-locate.t |
|
372 | 373 | test-lock-badness.t |
|
373 | 374 | test-lock.py |
|
374 | 375 | test-log-exthook.t |
|
375 | 376 | test-log-linerange.t |
|
376 | 377 | test-log.t |
|
377 | 378 | test-logexchange.t |
|
378 | 379 | test-logtoprocess.t |
|
379 | 380 | test-lrucachedict.py |
|
380 | 381 | test-mactext.t |
|
381 | 382 | test-mailmap.t |
|
382 | 383 | test-manifest-merging.t |
|
383 | 384 | test-manifest.py |
|
384 | 385 | test-manifest.t |
|
385 | 386 | test-match.py |
|
386 | 387 | test-mdiff.py |
|
387 | 388 | test-merge-changedelete.t |
|
388 | 389 | test-merge-closedheads.t |
|
389 | 390 | test-merge-commit.t |
|
390 | 391 | test-merge-criss-cross.t |
|
391 | 392 | test-merge-default.t |
|
392 | 393 | test-merge-force.t |
|
393 | 394 | test-merge-halt.t |
|
394 | 395 | test-merge-internal-tools-pattern.t |
|
395 | 396 | test-merge-local.t |
|
396 | 397 | test-merge-no-file-change.t |
|
397 | 398 | test-merge-remove.t |
|
398 | 399 | test-merge-revert.t |
|
399 | 400 | test-merge-revert2.t |
|
400 | 401 | test-merge-subrepos.t |
|
401 | 402 | test-merge-symlinks.t |
|
402 | 403 | test-merge-tools.t |
|
403 | 404 | test-merge-types.t |
|
404 | 405 | test-merge1.t |
|
405 | 406 | test-merge10.t |
|
406 | 407 | test-merge2.t |
|
407 | 408 | test-merge4.t |
|
408 | 409 | test-merge5.t |
|
409 | 410 | test-merge6.t |
|
410 | 411 | test-merge7.t |
|
411 | 412 | test-merge8.t |
|
412 | 413 | test-merge9.t |
|
413 | 414 | test-minifileset.py |
|
414 | 415 | test-minirst.py |
|
415 | 416 | test-missing-capability.t |
|
416 | 417 | test-mq-eol.t |
|
417 | 418 | test-mq-git.t |
|
418 | 419 | test-mq-guards.t |
|
419 | 420 | test-mq-header-date.t |
|
420 | 421 | test-mq-header-from.t |
|
421 | 422 | test-mq-merge.t |
|
422 | 423 | test-mq-missingfiles.t |
|
423 | 424 | test-mq-pull-from-bundle.t |
|
424 | 425 | test-mq-qclone-http.t |
|
425 | 426 | test-mq-qdelete.t |
|
426 | 427 | test-mq-qdiff.t |
|
427 | 428 | test-mq-qfold.t |
|
428 | 429 | test-mq-qgoto.t |
|
429 | 430 | test-mq-qimport-fail-cleanup.t |
|
430 | 431 | test-mq-qimport.t |
|
431 | 432 | test-mq-qnew.t |
|
432 | 433 | test-mq-qpush-exact.t |
|
433 | 434 | test-mq-qpush-fail.t |
|
434 | 435 | test-mq-qqueue.t |
|
435 | 436 | test-mq-qrefresh-interactive.t |
|
436 | 437 | test-mq-qrefresh-replace-log-message.t |
|
437 | 438 | test-mq-qrefresh.t |
|
438 | 439 | test-mq-qrename.t |
|
439 | 440 | test-mq-qsave.t |
|
440 | 441 | test-mq-safety.t |
|
441 | 442 | test-mq-subrepo-svn.t |
|
442 | 443 | test-mq-subrepo.t |
|
443 | 444 | test-mq-symlinks.t |
|
444 | 445 | test-mq.t |
|
445 | 446 | test-mv-cp-st-diff.t |
|
446 | 447 | test-narrow-acl.t |
|
447 | 448 | test-narrow-archive.t |
|
448 | 449 | test-narrow-clone-no-ellipsis.t |
|
449 | 450 | test-narrow-clone-non-narrow-server.t |
|
450 | 451 | test-narrow-clone-nonlinear.t |
|
451 | 452 | test-narrow-clone-stream.t |
|
452 | 453 | test-narrow-clone.t |
|
453 | 454 | test-narrow-commit.t |
|
454 | 455 | test-narrow-copies.t |
|
455 | 456 | test-narrow-debugcommands.t |
|
456 | 457 | test-narrow-debugrebuilddirstate.t |
|
457 | 458 | test-narrow-exchange-merges.t |
|
458 | 459 | test-narrow-exchange.t |
|
459 | 460 | test-narrow-expanddirstate.t |
|
460 | 461 | test-narrow-merge.t |
|
461 | 462 | test-narrow-patch.t |
|
462 | 463 | test-narrow-patterns.t |
|
463 | 464 | test-narrow-pull.t |
|
464 | 465 | test-narrow-rebase.t |
|
465 | 466 | test-narrow-shallow-merges.t |
|
466 | 467 | test-narrow-shallow.t |
|
467 | 468 | test-narrow-share.t |
|
468 | 469 | test-narrow-sparse.t |
|
469 | 470 | test-narrow-strip.t |
|
470 | 471 | test-narrow-trackedcmd.t |
|
471 | 472 | test-narrow-update.t |
|
472 | 473 | test-narrow-widen-no-ellipsis.t |
|
473 | 474 | test-narrow-widen.t |
|
474 | 475 | test-narrow.t |
|
475 | 476 | test-nested-repo.t |
|
476 | 477 | test-newbranch.t |
|
477 | 478 | test-newcgi.t |
|
478 | 479 | test-newercgi.t |
|
479 | 480 | test-nointerrupt.t |
|
480 | 481 | test-notify-changegroup.t |
|
481 | 482 | test-obshistory.t |
|
482 | 483 | test-obsmarker-template.t |
|
483 | 484 | test-obsmarkers-effectflag.t |
|
484 | 485 | test-obsolete-bounds-checking.t |
|
485 | 486 | test-obsolete-bundle-strip.t |
|
486 | 487 | test-obsolete-changeset-exchange.t |
|
487 | 488 | test-obsolete-checkheads.t |
|
488 | 489 | test-obsolete-distributed.t |
|
489 | 490 | test-obsolete-divergent.t |
|
490 | 491 | test-obsolete-tag-cache.t |
|
491 | 492 | test-obsolete.t |
|
492 | 493 | test-oldcgi.t |
|
493 | 494 | test-origbackup-conflict.t |
|
494 | 495 | test-pager-legacy.t |
|
495 | 496 | test-pager.t |
|
496 | 497 | test-parents.t |
|
497 | 498 | test-parse-date.t |
|
498 | 499 | test-parseindex.t |
|
499 | 500 | test-parseindex2.py |
|
500 | 501 | test-patch-offset.t |
|
501 | 502 | test-patch.t |
|
502 | 503 | test-patchbomb-bookmark.t |
|
503 | 504 | test-patchbomb-tls.t |
|
504 | 505 | test-patchbomb.t |
|
505 | 506 | test-pathconflicts-basic.t |
|
506 | 507 | test-pathconflicts-merge.t |
|
507 | 508 | test-pathconflicts-update.t |
|
508 | 509 | test-pathencode.py |
|
509 | 510 | test-pending.t |
|
510 | 511 | test-permissions.t |
|
511 | 512 | test-phases-exchange.t |
|
512 | 513 | test-phases.t |
|
513 | 514 | test-profile.t |
|
514 | 515 | test-progress.t |
|
515 | 516 | test-propertycache.py |
|
516 | 517 | test-pull-branch.t |
|
517 | 518 | test-pull-bundle.t |
|
518 | 519 | test-pull-http.t |
|
519 | 520 | test-pull-permission.t |
|
520 | 521 | test-pull-pull-corruption.t |
|
521 | 522 | test-pull-r.t |
|
522 | 523 | test-pull-update.t |
|
523 | 524 | test-pull.t |
|
524 | 525 | test-purge.t |
|
525 | 526 | test-push-cgi.t |
|
526 | 527 | test-push-checkheads-partial-C1.t |
|
527 | 528 | test-push-checkheads-partial-C2.t |
|
528 | 529 | test-push-checkheads-partial-C3.t |
|
529 | 530 | test-push-checkheads-partial-C4.t |
|
530 | 531 | test-push-checkheads-pruned-B1.t |
|
531 | 532 | test-push-checkheads-pruned-B2.t |
|
532 | 533 | test-push-checkheads-pruned-B3.t |
|
533 | 534 | test-push-checkheads-pruned-B4.t |
|
534 | 535 | test-push-checkheads-pruned-B5.t |
|
535 | 536 | test-push-checkheads-pruned-B6.t |
|
536 | 537 | test-push-checkheads-pruned-B7.t |
|
537 | 538 | test-push-checkheads-pruned-B8.t |
|
538 | 539 | test-push-checkheads-superceed-A1.t |
|
539 | 540 | test-push-checkheads-superceed-A2.t |
|
540 | 541 | test-push-checkheads-superceed-A3.t |
|
541 | 542 | test-push-checkheads-superceed-A4.t |
|
542 | 543 | test-push-checkheads-superceed-A5.t |
|
543 | 544 | test-push-checkheads-superceed-A6.t |
|
544 | 545 | test-push-checkheads-superceed-A7.t |
|
545 | 546 | test-push-checkheads-superceed-A8.t |
|
546 | 547 | test-push-checkheads-unpushed-D1.t |
|
547 | 548 | test-push-checkheads-unpushed-D2.t |
|
548 | 549 | test-push-checkheads-unpushed-D3.t |
|
549 | 550 | test-push-checkheads-unpushed-D4.t |
|
550 | 551 | test-push-checkheads-unpushed-D5.t |
|
551 | 552 | test-push-checkheads-unpushed-D6.t |
|
552 | 553 | test-push-checkheads-unpushed-D7.t |
|
553 | 554 | test-push-http.t |
|
554 | 555 | test-push-race.t |
|
555 | 556 | test-push-warn.t |
|
556 | 557 | test-push.t |
|
557 | 558 | test-pushvars.t |
|
558 | 559 | test-qrecord.t |
|
559 | 560 | test-rebase-abort.t |
|
560 | 561 | test-rebase-backup.t |
|
561 | 562 | test-rebase-base-flag.t |
|
562 | 563 | test-rebase-bookmarks.t |
|
563 | 564 | test-rebase-brute-force.t |
|
564 | 565 | test-rebase-cache.t |
|
565 | 566 | test-rebase-check-restore.t |
|
566 | 567 | test-rebase-collapse.t |
|
567 | 568 | test-rebase-conflicts.t |
|
568 | 569 | test-rebase-dest.t |
|
569 | 570 | test-rebase-detach.t |
|
570 | 571 | test-rebase-emptycommit.t |
|
571 | 572 | test-rebase-inmemory.t |
|
572 | 573 | test-rebase-interruptions.t |
|
573 | 574 | test-rebase-issue-noparam-single-rev.t |
|
574 | 575 | test-rebase-legacy.t |
|
575 | 576 | test-rebase-mq-skip.t |
|
576 | 577 | test-rebase-mq.t |
|
577 | 578 | test-rebase-named-branches.t |
|
578 | 579 | test-rebase-newancestor.t |
|
579 | 580 | test-rebase-obsolete.t |
|
580 | 581 | test-rebase-parameters.t |
|
581 | 582 | test-rebase-partial.t |
|
582 | 583 | test-rebase-pull.t |
|
583 | 584 | test-rebase-rename.t |
|
584 | 585 | test-rebase-scenario-global.t |
|
585 | 586 | test-rebase-templates.t |
|
586 | 587 | test-rebase-transaction.t |
|
587 | 588 | test-rebuildstate.t |
|
588 | 589 | test-record.t |
|
589 | 590 | test-releasenotes-formatting.t |
|
590 | 591 | test-releasenotes-merging.t |
|
591 | 592 | test-releasenotes-parsing.t |
|
592 | 593 | test-relink.t |
|
593 | 594 | test-remotefilelog-bad-configs.t |
|
594 | 595 | test-remotefilelog-bgprefetch.t |
|
595 | 596 | test-remotefilelog-blame.t |
|
596 | 597 | test-remotefilelog-bundle2.t |
|
597 | 598 | test-remotefilelog-bundles.t |
|
598 | 599 | test-remotefilelog-cacheprocess.t |
|
599 | 600 | test-remotefilelog-clone-tree.t |
|
600 | 601 | test-remotefilelog-clone.t |
|
601 | 602 | test-remotefilelog-corrupt-cache.t |
|
602 | 603 | test-remotefilelog-datapack.py |
|
603 | 604 | test-remotefilelog-gc.t |
|
604 | 605 | test-remotefilelog-gcrepack.t |
|
605 | 606 | test-remotefilelog-histpack.py |
|
606 | 607 | test-remotefilelog-http.t |
|
607 | 608 | test-remotefilelog-keepset.t |
|
608 | 609 | test-remotefilelog-local.t |
|
609 | 610 | test-remotefilelog-log.t |
|
610 | 611 | test-remotefilelog-partial-shallow.t |
|
611 | 612 | test-remotefilelog-permissions.t |
|
612 | 613 | test-remotefilelog-permisssions.t |
|
613 | 614 | test-remotefilelog-prefetch.t |
|
614 | 615 | test-remotefilelog-pull-noshallow.t |
|
615 | 616 | test-remotefilelog-repack-fast.t |
|
616 | 617 | test-remotefilelog-repack.t |
|
617 | 618 | test-remotefilelog-share.t |
|
618 | 619 | test-remotefilelog-sparse.t |
|
619 | 620 | test-remotefilelog-tags.t |
|
620 | 621 | test-remotefilelog-wireproto.t |
|
621 | 622 | test-remove.t |
|
622 | 623 | test-removeemptydirs.t |
|
623 | 624 | test-rename-after-merge.t |
|
624 | 625 | test-rename-dir-merge.t |
|
625 | 626 | test-rename-merge1.t |
|
626 | 627 | test-rename-merge2.t |
|
627 | 628 | test-rename.t |
|
628 | 629 | test-repair-strip.t |
|
629 | 630 | test-repo-compengines.t |
|
630 | 631 | test-requires.t |
|
631 | 632 | test-resolve.t |
|
632 | 633 | test-revert-flags.t |
|
633 | 634 | test-revert-interactive.t |
|
634 | 635 | test-revert-unknown.t |
|
635 | 636 | test-revert.t |
|
636 | 637 | test-revisions.t |
|
637 | 638 | test-revlog-ancestry.py |
|
638 | 639 | test-revlog-group-emptyiter.t |
|
639 | 640 | test-revlog-mmapindex.t |
|
640 | 641 | test-revlog-packentry.t |
|
641 | 642 | test-revlog-raw.py |
|
642 | 643 | test-revlog-v2.t |
|
643 | 644 | test-revlog.t |
|
644 | 645 | test-revset-dirstate-parents.t |
|
645 | 646 | test-revset-legacy-lookup.t |
|
646 | 647 | test-revset-outgoing.t |
|
647 | 648 | test-revset2.t |
|
648 | 649 | test-rollback.t |
|
649 | 650 | test-run-tests.py |
|
650 | 651 | test-run-tests.t |
|
651 | 652 | test-rust-ancestor.py |
|
652 | 653 | test-schemes.t |
|
653 | 654 | test-serve.t |
|
654 | 655 | test-setdiscovery.t |
|
655 | 656 | test-share.t |
|
656 | 657 | test-shelve.t |
|
657 | 658 | test-shelve2.t |
|
658 | 659 | test-show-stack.t |
|
659 | 660 | test-show-work.t |
|
660 | 661 | test-show.t |
|
661 | 662 | test-simple-update.t |
|
662 | 663 | test-simplekeyvaluefile.py |
|
663 | 664 | test-simplemerge.py |
|
664 | 665 | test-single-head.t |
|
665 | 666 | test-sparse-clear.t |
|
666 | 667 | test-sparse-clone.t |
|
667 | 668 | test-sparse-import.t |
|
668 | 669 | test-sparse-merges.t |
|
669 | 670 | test-sparse-profiles.t |
|
670 | 671 | test-sparse-requirement.t |
|
671 | 672 | test-sparse-verbose-json.t |
|
672 | 673 | test-sparse.t |
|
673 | 674 | test-split.t |
|
674 | 675 | test-ssh-bundle1.t |
|
675 | 676 | test-ssh-clone-r.t |
|
676 | 677 | test-ssh-proto-unbundle.t |
|
677 | 678 | test-ssh-proto.t |
|
678 | 679 | test-ssh-repoerror.t |
|
679 | 680 | test-ssh.t |
|
680 | 681 | test-sshserver.py |
|
681 | 682 | test-stack.t |
|
682 | 683 | test-static-http.t |
|
683 | 684 | test-status-color.t |
|
684 | 685 | test-status-inprocess.py |
|
685 | 686 | test-status-rev.t |
|
686 | 687 | test-status-terse.t |
|
687 | 688 | test-status.t |
|
688 | 689 | test-storage.py |
|
689 | 690 | test-stream-bundle-v2.t |
|
690 | 691 | test-strict.t |
|
691 | 692 | test-strip-cross.t |
|
692 | 693 | test-strip.t |
|
693 | 694 | test-subrepo-deep-nested-change.t |
|
694 | 695 | test-subrepo-git.t |
|
695 | 696 | test-subrepo-missing.t |
|
696 | 697 | test-subrepo-paths.t |
|
697 | 698 | test-subrepo-recursion.t |
|
698 | 699 | test-subrepo-relative-path.t |
|
699 | 700 | test-subrepo-svn.t |
|
700 | 701 | test-subrepo.t |
|
701 | 702 | test-symlink-os-yes-fs-no.py |
|
702 | 703 | test-symlink-placeholder.t |
|
703 | 704 | test-symlinks.t |
|
704 | 705 | test-tag.t |
|
705 | 706 | test-tags.t |
|
706 | 707 | test-template-basic.t |
|
707 | 708 | test-template-functions.t |
|
708 | 709 | test-template-keywords.t |
|
709 | 710 | test-template-map.t |
|
710 | 711 | test-tools.t |
|
711 | 712 | test-transplant.t |
|
712 | 713 | test-treediscovery-legacy.t |
|
713 | 714 | test-treediscovery.t |
|
714 | 715 | test-treemanifest.t |
|
715 | 716 | test-trusted.py |
|
716 | 717 | test-ui-color.py |
|
717 | 718 | test-ui-config.py |
|
718 | 719 | test-ui-verbosity.py |
|
719 | 720 | test-unamend.t |
|
720 | 721 | test-unbundlehash.t |
|
721 | 722 | test-uncommit.t |
|
722 | 723 | test-unified-test.t |
|
723 | 724 | test-unionrepo.t |
|
724 | 725 | test-unrelated-pull.t |
|
725 | 726 | test-up-local-change.t |
|
726 | 727 | test-update-atomic.t |
|
727 | 728 | test-update-branches.t |
|
728 | 729 | test-update-dest.t |
|
729 | 730 | test-update-issue1456.t |
|
730 | 731 | test-update-names.t |
|
731 | 732 | test-update-reverse.t |
|
732 | 733 | test-upgrade-repo.t |
|
733 | 734 | test-url-download.t |
|
734 | 735 | test-url-rev.t |
|
735 | 736 | test-url.py |
|
736 | 737 | test-username-newline.t |
|
737 | 738 | test-util.py |
|
738 | 739 | test-verify.t |
|
739 | 740 | test-walk.t |
|
740 | 741 | test-walkrepo.py |
|
741 | 742 | test-websub.t |
|
742 | 743 | test-win32text.t |
|
743 | 744 | test-wireproto-caching.t |
|
744 | 745 | test-wireproto-clientreactor.py |
|
745 | 746 | test-wireproto-command-branchmap.t |
|
746 | 747 | test-wireproto-command-capabilities.t |
|
747 | 748 | test-wireproto-command-changesetdata.t |
|
748 | 749 | test-wireproto-command-filedata.t |
|
749 | 750 | test-wireproto-command-filesdata.t |
|
750 | 751 | test-wireproto-command-heads.t |
|
751 | 752 | test-wireproto-command-known.t |
|
752 | 753 | test-wireproto-command-listkeys.t |
|
753 | 754 | test-wireproto-command-lookup.t |
|
754 | 755 | test-wireproto-command-manifestdata.t |
|
755 | 756 | test-wireproto-command-pushkey.t |
|
756 | 757 | test-wireproto-command-rawstorefiledata.t |
|
757 | 758 | test-wireproto-content-redirects.t |
|
758 | 759 | test-wireproto-exchangev2.t |
|
759 | 760 | test-wireproto-framing.py |
|
760 | 761 | test-wireproto-serverreactor.py |
|
761 | 762 | test-wireproto.py |
|
762 | 763 | test-wireproto.t |
|
763 | 764 | test-worker.t |
|
764 | 765 | test-wsgirequest.py |
|
765 | 766 | test-xdg.t |
@@ -1,555 +1,558 b'' | |||
|
1 | 1 | # changelog.py - changelog class for mercurial |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
4 | 4 | # |
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | from .i18n import _ |
|
11 | 11 | from .node import ( |
|
12 | 12 | bin, |
|
13 | 13 | hex, |
|
14 | 14 | nullid, |
|
15 | 15 | ) |
|
16 | 16 | from .thirdparty import ( |
|
17 | 17 | attr, |
|
18 | 18 | ) |
|
19 | 19 | |
|
20 | 20 | from . import ( |
|
21 | 21 | encoding, |
|
22 | 22 | error, |
|
23 | 23 | pycompat, |
|
24 | 24 | revlog, |
|
25 | 25 | ) |
|
26 | 26 | from .utils import ( |
|
27 | 27 | dateutil, |
|
28 | 28 | stringutil, |
|
29 | 29 | ) |
|
30 | 30 | |
|
31 | 31 | _defaultextra = {'branch': 'default'} |
|
32 | 32 | |
|
33 | 33 | def _string_escape(text): |
|
34 | 34 | """ |
|
35 | 35 | >>> from .pycompat import bytechr as chr |
|
36 | 36 | >>> d = {b'nl': chr(10), b'bs': chr(92), b'cr': chr(13), b'nul': chr(0)} |
|
37 | 37 | >>> s = b"ab%(nl)scd%(bs)s%(bs)sn%(nul)sab%(cr)scd%(bs)s%(nl)s" % d |
|
38 | 38 | >>> s |
|
39 | 39 | 'ab\\ncd\\\\\\\\n\\x00ab\\rcd\\\\\\n' |
|
40 | 40 | >>> res = _string_escape(s) |
|
41 | 41 | >>> s == stringutil.unescapestr(res) |
|
42 | 42 | True |
|
43 | 43 | """ |
|
44 | 44 | # subset of the string_escape codec |
|
45 | 45 | text = text.replace('\\', '\\\\').replace('\n', '\\n').replace('\r', '\\r') |
|
46 | 46 | return text.replace('\0', '\\0') |
|
47 | 47 | |
|
48 | 48 | def decodeextra(text): |
|
49 | 49 | """ |
|
50 | 50 | >>> from .pycompat import bytechr as chr |
|
51 | 51 | >>> sorted(decodeextra(encodeextra({b'foo': b'bar', b'baz': chr(0) + b'2'}) |
|
52 | 52 | ... ).items()) |
|
53 | 53 | [('baz', '\\x002'), ('branch', 'default'), ('foo', 'bar')] |
|
54 | 54 | >>> sorted(decodeextra(encodeextra({b'foo': b'bar', |
|
55 | 55 | ... b'baz': chr(92) + chr(0) + b'2'}) |
|
56 | 56 | ... ).items()) |
|
57 | 57 | [('baz', '\\\\\\x002'), ('branch', 'default'), ('foo', 'bar')] |
|
58 | 58 | """ |
|
59 | 59 | extra = _defaultextra.copy() |
|
60 | 60 | for l in text.split('\0'): |
|
61 | 61 | if l: |
|
62 | 62 | if '\\0' in l: |
|
63 | 63 | # fix up \0 without getting into trouble with \\0 |
|
64 | 64 | l = l.replace('\\\\', '\\\\\n') |
|
65 | 65 | l = l.replace('\\0', '\0') |
|
66 | 66 | l = l.replace('\n', '') |
|
67 | 67 | k, v = stringutil.unescapestr(l).split(':', 1) |
|
68 | 68 | extra[k] = v |
|
69 | 69 | return extra |
|
70 | 70 | |
|
71 | 71 | def encodeextra(d): |
|
72 | 72 | # keys must be sorted to produce a deterministic changelog entry |
|
73 | items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)] | |
|
73 | items = [ | |
|
74 | _string_escape('%s:%s' % (k, pycompat.bytestr(d[k]))) | |
|
75 | for k in sorted(d) | |
|
76 | ] | |
|
74 | 77 | return "\0".join(items) |
|
75 | 78 | |
|
76 | 79 | def stripdesc(desc): |
|
77 | 80 | """strip trailing whitespace and leading and trailing empty lines""" |
|
78 | 81 | return '\n'.join([l.rstrip() for l in desc.splitlines()]).strip('\n') |
|
79 | 82 | |
|
80 | 83 | class appender(object): |
|
81 | 84 | '''the changelog index must be updated last on disk, so we use this class |
|
82 | 85 | to delay writes to it''' |
|
83 | 86 | def __init__(self, vfs, name, mode, buf): |
|
84 | 87 | self.data = buf |
|
85 | 88 | fp = vfs(name, mode) |
|
86 | 89 | self.fp = fp |
|
87 | 90 | self.offset = fp.tell() |
|
88 | 91 | self.size = vfs.fstat(fp).st_size |
|
89 | 92 | self._end = self.size |
|
90 | 93 | |
|
91 | 94 | def end(self): |
|
92 | 95 | return self._end |
|
93 | 96 | def tell(self): |
|
94 | 97 | return self.offset |
|
95 | 98 | def flush(self): |
|
96 | 99 | pass |
|
97 | 100 | |
|
98 | 101 | @property |
|
99 | 102 | def closed(self): |
|
100 | 103 | return self.fp.closed |
|
101 | 104 | |
|
102 | 105 | def close(self): |
|
103 | 106 | self.fp.close() |
|
104 | 107 | |
|
105 | 108 | def seek(self, offset, whence=0): |
|
106 | 109 | '''virtual file offset spans real file and data''' |
|
107 | 110 | if whence == 0: |
|
108 | 111 | self.offset = offset |
|
109 | 112 | elif whence == 1: |
|
110 | 113 | self.offset += offset |
|
111 | 114 | elif whence == 2: |
|
112 | 115 | self.offset = self.end() + offset |
|
113 | 116 | if self.offset < self.size: |
|
114 | 117 | self.fp.seek(self.offset) |
|
115 | 118 | |
|
116 | 119 | def read(self, count=-1): |
|
117 | 120 | '''only trick here is reads that span real file and data''' |
|
118 | 121 | ret = "" |
|
119 | 122 | if self.offset < self.size: |
|
120 | 123 | s = self.fp.read(count) |
|
121 | 124 | ret = s |
|
122 | 125 | self.offset += len(s) |
|
123 | 126 | if count > 0: |
|
124 | 127 | count -= len(s) |
|
125 | 128 | if count != 0: |
|
126 | 129 | doff = self.offset - self.size |
|
127 | 130 | self.data.insert(0, "".join(self.data)) |
|
128 | 131 | del self.data[1:] |
|
129 | 132 | s = self.data[0][doff:doff + count] |
|
130 | 133 | self.offset += len(s) |
|
131 | 134 | ret += s |
|
132 | 135 | return ret |
|
133 | 136 | |
|
134 | 137 | def write(self, s): |
|
135 | 138 | self.data.append(bytes(s)) |
|
136 | 139 | self.offset += len(s) |
|
137 | 140 | self._end += len(s) |
|
138 | 141 | |
|
139 | 142 | def __enter__(self): |
|
140 | 143 | self.fp.__enter__() |
|
141 | 144 | return self |
|
142 | 145 | |
|
143 | 146 | def __exit__(self, *args): |
|
144 | 147 | return self.fp.__exit__(*args) |
|
145 | 148 | |
|
146 | 149 | def _divertopener(opener, target): |
|
147 | 150 | """build an opener that writes in 'target.a' instead of 'target'""" |
|
148 | 151 | def _divert(name, mode='r', checkambig=False): |
|
149 | 152 | if name != target: |
|
150 | 153 | return opener(name, mode) |
|
151 | 154 | return opener(name + ".a", mode) |
|
152 | 155 | return _divert |
|
153 | 156 | |
|
154 | 157 | def _delayopener(opener, target, buf): |
|
155 | 158 | """build an opener that stores chunks in 'buf' instead of 'target'""" |
|
156 | 159 | def _delay(name, mode='r', checkambig=False): |
|
157 | 160 | if name != target: |
|
158 | 161 | return opener(name, mode) |
|
159 | 162 | return appender(opener, name, mode, buf) |
|
160 | 163 | return _delay |
|
161 | 164 | |
|
162 | 165 | @attr.s |
|
163 | 166 | class _changelogrevision(object): |
|
164 | 167 | # Extensions might modify _defaultextra, so let the constructor below pass |
|
165 | 168 | # it in |
|
166 | 169 | extra = attr.ib() |
|
167 | 170 | manifest = attr.ib(default=nullid) |
|
168 | 171 | user = attr.ib(default='') |
|
169 | 172 | date = attr.ib(default=(0, 0)) |
|
170 | 173 | files = attr.ib(default=attr.Factory(list)) |
|
171 | 174 | description = attr.ib(default='') |
|
172 | 175 | |
|
173 | 176 | class changelogrevision(object): |
|
174 | 177 | """Holds results of a parsed changelog revision. |
|
175 | 178 | |
|
176 | 179 | Changelog revisions consist of multiple pieces of data, including |
|
177 | 180 | the manifest node, user, and date. This object exposes a view into |
|
178 | 181 | the parsed object. |
|
179 | 182 | """ |
|
180 | 183 | |
|
181 | 184 | __slots__ = ( |
|
182 | 185 | u'_offsets', |
|
183 | 186 | u'_text', |
|
184 | 187 | ) |
|
185 | 188 | |
|
186 | 189 | def __new__(cls, text): |
|
187 | 190 | if not text: |
|
188 | 191 | return _changelogrevision(extra=_defaultextra) |
|
189 | 192 | |
|
190 | 193 | self = super(changelogrevision, cls).__new__(cls) |
|
191 | 194 | # We could return here and implement the following as an __init__. |
|
192 | 195 | # But doing it here is equivalent and saves an extra function call. |
|
193 | 196 | |
|
194 | 197 | # format used: |
|
195 | 198 | # nodeid\n : manifest node in ascii |
|
196 | 199 | # user\n : user, no \n or \r allowed |
|
197 | 200 | # time tz extra\n : date (time is int or float, timezone is int) |
|
198 | 201 | # : extra is metadata, encoded and separated by '\0' |
|
199 | 202 | # : older versions ignore it |
|
200 | 203 | # files\n\n : files modified by the cset, no \n or \r allowed |
|
201 | 204 | # (.*) : comment (free text, ideally utf-8) |
|
202 | 205 | # |
|
203 | 206 | # changelog v0 doesn't use extra |
|
204 | 207 | |
|
205 | 208 | nl1 = text.index('\n') |
|
206 | 209 | nl2 = text.index('\n', nl1 + 1) |
|
207 | 210 | nl3 = text.index('\n', nl2 + 1) |
|
208 | 211 | |
|
209 | 212 | # The list of files may be empty. Which means nl3 is the first of the |
|
210 | 213 | # double newline that precedes the description. |
|
211 | 214 | if text[nl3 + 1:nl3 + 2] == '\n': |
|
212 | 215 | doublenl = nl3 |
|
213 | 216 | else: |
|
214 | 217 | doublenl = text.index('\n\n', nl3 + 1) |
|
215 | 218 | |
|
216 | 219 | self._offsets = (nl1, nl2, nl3, doublenl) |
|
217 | 220 | self._text = text |
|
218 | 221 | |
|
219 | 222 | return self |
|
220 | 223 | |
|
221 | 224 | @property |
|
222 | 225 | def manifest(self): |
|
223 | 226 | return bin(self._text[0:self._offsets[0]]) |
|
224 | 227 | |
|
225 | 228 | @property |
|
226 | 229 | def user(self): |
|
227 | 230 | off = self._offsets |
|
228 | 231 | return encoding.tolocal(self._text[off[0] + 1:off[1]]) |
|
229 | 232 | |
|
230 | 233 | @property |
|
231 | 234 | def _rawdate(self): |
|
232 | 235 | off = self._offsets |
|
233 | 236 | dateextra = self._text[off[1] + 1:off[2]] |
|
234 | 237 | return dateextra.split(' ', 2)[0:2] |
|
235 | 238 | |
|
236 | 239 | @property |
|
237 | 240 | def _rawextra(self): |
|
238 | 241 | off = self._offsets |
|
239 | 242 | dateextra = self._text[off[1] + 1:off[2]] |
|
240 | 243 | fields = dateextra.split(' ', 2) |
|
241 | 244 | if len(fields) != 3: |
|
242 | 245 | return None |
|
243 | 246 | |
|
244 | 247 | return fields[2] |
|
245 | 248 | |
|
246 | 249 | @property |
|
247 | 250 | def date(self): |
|
248 | 251 | raw = self._rawdate |
|
249 | 252 | time = float(raw[0]) |
|
250 | 253 | # Various tools did silly things with the timezone. |
|
251 | 254 | try: |
|
252 | 255 | timezone = int(raw[1]) |
|
253 | 256 | except ValueError: |
|
254 | 257 | timezone = 0 |
|
255 | 258 | |
|
256 | 259 | return time, timezone |
|
257 | 260 | |
|
258 | 261 | @property |
|
259 | 262 | def extra(self): |
|
260 | 263 | raw = self._rawextra |
|
261 | 264 | if raw is None: |
|
262 | 265 | return _defaultextra |
|
263 | 266 | |
|
264 | 267 | return decodeextra(raw) |
|
265 | 268 | |
|
266 | 269 | @property |
|
267 | 270 | def files(self): |
|
268 | 271 | off = self._offsets |
|
269 | 272 | if off[2] == off[3]: |
|
270 | 273 | return [] |
|
271 | 274 | |
|
272 | 275 | return self._text[off[2] + 1:off[3]].split('\n') |
|
273 | 276 | |
|
274 | 277 | @property |
|
275 | 278 | def description(self): |
|
276 | 279 | return encoding.tolocal(self._text[self._offsets[3] + 2:]) |
|
277 | 280 | |
|
278 | 281 | class changelog(revlog.revlog): |
|
279 | 282 | def __init__(self, opener, trypending=False): |
|
280 | 283 | """Load a changelog revlog using an opener. |
|
281 | 284 | |
|
282 | 285 | If ``trypending`` is true, we attempt to load the index from a |
|
283 | 286 | ``00changelog.i.a`` file instead of the default ``00changelog.i``. |
|
284 | 287 | The ``00changelog.i.a`` file contains index (and possibly inline |
|
285 | 288 | revision) data for a transaction that hasn't been finalized yet. |
|
286 | 289 | It exists in a separate file to facilitate readers (such as |
|
287 | 290 | hooks processes) accessing data before a transaction is finalized. |
|
288 | 291 | """ |
|
289 | 292 | if trypending and opener.exists('00changelog.i.a'): |
|
290 | 293 | indexfile = '00changelog.i.a' |
|
291 | 294 | else: |
|
292 | 295 | indexfile = '00changelog.i' |
|
293 | 296 | |
|
294 | 297 | datafile = '00changelog.d' |
|
295 | 298 | revlog.revlog.__init__(self, opener, indexfile, datafile=datafile, |
|
296 | 299 | checkambig=True, mmaplargeindex=True) |
|
297 | 300 | |
|
298 | 301 | if self._initempty and (self.version & 0xFFFF == revlog.REVLOGV1): |
|
299 | 302 | # changelogs don't benefit from generaldelta. |
|
300 | 303 | |
|
301 | 304 | self.version &= ~revlog.FLAG_GENERALDELTA |
|
302 | 305 | self._generaldelta = False |
|
303 | 306 | |
|
304 | 307 | # Delta chains for changelogs tend to be very small because entries |
|
305 | 308 | # tend to be small and don't delta well with each. So disable delta |
|
306 | 309 | # chains. |
|
307 | 310 | self._storedeltachains = False |
|
308 | 311 | |
|
309 | 312 | self._realopener = opener |
|
310 | 313 | self._delayed = False |
|
311 | 314 | self._delaybuf = None |
|
312 | 315 | self._divert = False |
|
313 | 316 | self.filteredrevs = frozenset() |
|
314 | 317 | |
|
315 | 318 | def tiprev(self): |
|
316 | 319 | for i in pycompat.xrange(len(self) -1, -2, -1): |
|
317 | 320 | if i not in self.filteredrevs: |
|
318 | 321 | return i |
|
319 | 322 | |
|
320 | 323 | def tip(self): |
|
321 | 324 | """filtered version of revlog.tip""" |
|
322 | 325 | return self.node(self.tiprev()) |
|
323 | 326 | |
|
324 | 327 | def __contains__(self, rev): |
|
325 | 328 | """filtered version of revlog.__contains__""" |
|
326 | 329 | return (0 <= rev < len(self) |
|
327 | 330 | and rev not in self.filteredrevs) |
|
328 | 331 | |
|
329 | 332 | def __iter__(self): |
|
330 | 333 | """filtered version of revlog.__iter__""" |
|
331 | 334 | if len(self.filteredrevs) == 0: |
|
332 | 335 | return revlog.revlog.__iter__(self) |
|
333 | 336 | |
|
334 | 337 | def filterediter(): |
|
335 | 338 | for i in pycompat.xrange(len(self)): |
|
336 | 339 | if i not in self.filteredrevs: |
|
337 | 340 | yield i |
|
338 | 341 | |
|
339 | 342 | return filterediter() |
|
340 | 343 | |
|
341 | 344 | def revs(self, start=0, stop=None): |
|
342 | 345 | """filtered version of revlog.revs""" |
|
343 | 346 | for i in super(changelog, self).revs(start, stop): |
|
344 | 347 | if i not in self.filteredrevs: |
|
345 | 348 | yield i |
|
346 | 349 | |
|
347 | 350 | def reachableroots(self, minroot, heads, roots, includepath=False): |
|
348 | 351 | return self.index.reachableroots2(minroot, heads, roots, includepath) |
|
349 | 352 | |
|
350 | 353 | def headrevs(self, revs=None): |
|
351 | 354 | if revs is None and self.filteredrevs: |
|
352 | 355 | try: |
|
353 | 356 | return self.index.headrevsfiltered(self.filteredrevs) |
|
354 | 357 | # AttributeError covers non-c-extension environments and |
|
355 | 358 | # old c extensions without filter handling. |
|
356 | 359 | except AttributeError: |
|
357 | 360 | return self._headrevs() |
|
358 | 361 | |
|
359 | 362 | return super(changelog, self).headrevs(revs) |
|
360 | 363 | |
|
361 | 364 | def strip(self, *args, **kwargs): |
|
362 | 365 | # XXX make something better than assert |
|
363 | 366 | # We can't expect proper strip behavior if we are filtered. |
|
364 | 367 | assert not self.filteredrevs |
|
365 | 368 | super(changelog, self).strip(*args, **kwargs) |
|
366 | 369 | |
|
367 | 370 | def rev(self, node): |
|
368 | 371 | """filtered version of revlog.rev""" |
|
369 | 372 | r = super(changelog, self).rev(node) |
|
370 | 373 | if r in self.filteredrevs: |
|
371 | 374 | raise error.FilteredLookupError(hex(node), self.indexfile, |
|
372 | 375 | _('filtered node')) |
|
373 | 376 | return r |
|
374 | 377 | |
|
375 | 378 | def node(self, rev): |
|
376 | 379 | """filtered version of revlog.node""" |
|
377 | 380 | if rev in self.filteredrevs: |
|
378 | 381 | raise error.FilteredIndexError(rev) |
|
379 | 382 | return super(changelog, self).node(rev) |
|
380 | 383 | |
|
381 | 384 | def linkrev(self, rev): |
|
382 | 385 | """filtered version of revlog.linkrev""" |
|
383 | 386 | if rev in self.filteredrevs: |
|
384 | 387 | raise error.FilteredIndexError(rev) |
|
385 | 388 | return super(changelog, self).linkrev(rev) |
|
386 | 389 | |
|
387 | 390 | def parentrevs(self, rev): |
|
388 | 391 | """filtered version of revlog.parentrevs""" |
|
389 | 392 | if rev in self.filteredrevs: |
|
390 | 393 | raise error.FilteredIndexError(rev) |
|
391 | 394 | return super(changelog, self).parentrevs(rev) |
|
392 | 395 | |
|
393 | 396 | def flags(self, rev): |
|
394 | 397 | """filtered version of revlog.flags""" |
|
395 | 398 | if rev in self.filteredrevs: |
|
396 | 399 | raise error.FilteredIndexError(rev) |
|
397 | 400 | return super(changelog, self).flags(rev) |
|
398 | 401 | |
|
399 | 402 | def delayupdate(self, tr): |
|
400 | 403 | "delay visibility of index updates to other readers" |
|
401 | 404 | |
|
402 | 405 | if not self._delayed: |
|
403 | 406 | if len(self) == 0: |
|
404 | 407 | self._divert = True |
|
405 | 408 | if self._realopener.exists(self.indexfile + '.a'): |
|
406 | 409 | self._realopener.unlink(self.indexfile + '.a') |
|
407 | 410 | self.opener = _divertopener(self._realopener, self.indexfile) |
|
408 | 411 | else: |
|
409 | 412 | self._delaybuf = [] |
|
410 | 413 | self.opener = _delayopener(self._realopener, self.indexfile, |
|
411 | 414 | self._delaybuf) |
|
412 | 415 | self._delayed = True |
|
413 | 416 | tr.addpending('cl-%i' % id(self), self._writepending) |
|
414 | 417 | tr.addfinalize('cl-%i' % id(self), self._finalize) |
|
415 | 418 | |
|
416 | 419 | def _finalize(self, tr): |
|
417 | 420 | "finalize index updates" |
|
418 | 421 | self._delayed = False |
|
419 | 422 | self.opener = self._realopener |
|
420 | 423 | # move redirected index data back into place |
|
421 | 424 | if self._divert: |
|
422 | 425 | assert not self._delaybuf |
|
423 | 426 | tmpname = self.indexfile + ".a" |
|
424 | 427 | nfile = self.opener.open(tmpname) |
|
425 | 428 | nfile.close() |
|
426 | 429 | self.opener.rename(tmpname, self.indexfile, checkambig=True) |
|
427 | 430 | elif self._delaybuf: |
|
428 | 431 | fp = self.opener(self.indexfile, 'a', checkambig=True) |
|
429 | 432 | fp.write("".join(self._delaybuf)) |
|
430 | 433 | fp.close() |
|
431 | 434 | self._delaybuf = None |
|
432 | 435 | self._divert = False |
|
433 | 436 | # split when we're done |
|
434 | 437 | self._enforceinlinesize(tr) |
|
435 | 438 | |
|
436 | 439 | def _writepending(self, tr): |
|
437 | 440 | "create a file containing the unfinalized state for pretxnchangegroup" |
|
438 | 441 | if self._delaybuf: |
|
439 | 442 | # make a temporary copy of the index |
|
440 | 443 | fp1 = self._realopener(self.indexfile) |
|
441 | 444 | pendingfilename = self.indexfile + ".a" |
|
442 | 445 | # register as a temp file to ensure cleanup on failure |
|
443 | 446 | tr.registertmp(pendingfilename) |
|
444 | 447 | # write existing data |
|
445 | 448 | fp2 = self._realopener(pendingfilename, "w") |
|
446 | 449 | fp2.write(fp1.read()) |
|
447 | 450 | # add pending data |
|
448 | 451 | fp2.write("".join(self._delaybuf)) |
|
449 | 452 | fp2.close() |
|
450 | 453 | # switch modes so finalize can simply rename |
|
451 | 454 | self._delaybuf = None |
|
452 | 455 | self._divert = True |
|
453 | 456 | self.opener = _divertopener(self._realopener, self.indexfile) |
|
454 | 457 | |
|
455 | 458 | if self._divert: |
|
456 | 459 | return True |
|
457 | 460 | |
|
458 | 461 | return False |
|
459 | 462 | |
|
460 | 463 | def _enforceinlinesize(self, tr, fp=None): |
|
461 | 464 | if not self._delayed: |
|
462 | 465 | revlog.revlog._enforceinlinesize(self, tr, fp) |
|
463 | 466 | |
|
464 | 467 | def read(self, node): |
|
465 | 468 | """Obtain data from a parsed changelog revision. |
|
466 | 469 | |
|
467 | 470 | Returns a 6-tuple of: |
|
468 | 471 | |
|
469 | 472 | - manifest node in binary |
|
470 | 473 | - author/user as a localstr |
|
471 | 474 | - date as a 2-tuple of (time, timezone) |
|
472 | 475 | - list of files |
|
473 | 476 | - commit message as a localstr |
|
474 | 477 | - dict of extra metadata |
|
475 | 478 | |
|
476 | 479 | Unless you need to access all fields, consider calling |
|
477 | 480 | ``changelogrevision`` instead, as it is faster for partial object |
|
478 | 481 | access. |
|
479 | 482 | """ |
|
480 | 483 | c = changelogrevision(self.revision(node)) |
|
481 | 484 | return ( |
|
482 | 485 | c.manifest, |
|
483 | 486 | c.user, |
|
484 | 487 | c.date, |
|
485 | 488 | c.files, |
|
486 | 489 | c.description, |
|
487 | 490 | c.extra |
|
488 | 491 | ) |
|
489 | 492 | |
|
490 | 493 | def changelogrevision(self, nodeorrev): |
|
491 | 494 | """Obtain a ``changelogrevision`` for a node or revision.""" |
|
492 | 495 | return changelogrevision(self.revision(nodeorrev)) |
|
493 | 496 | |
|
494 | 497 | def readfiles(self, node): |
|
495 | 498 | """ |
|
496 | 499 | short version of read that only returns the files modified by the cset |
|
497 | 500 | """ |
|
498 | 501 | text = self.revision(node) |
|
499 | 502 | if not text: |
|
500 | 503 | return [] |
|
501 | 504 | last = text.index("\n\n") |
|
502 | 505 | l = text[:last].split('\n') |
|
503 | 506 | return l[3:] |
|
504 | 507 | |
|
505 | 508 | def add(self, manifest, files, desc, transaction, p1, p2, |
|
506 | 509 | user, date=None, extra=None): |
|
507 | 510 | # Convert to UTF-8 encoded bytestrings as the very first |
|
508 | 511 | # thing: calling any method on a localstr object will turn it |
|
509 | 512 | # into a str object and the cached UTF-8 string is thus lost. |
|
510 | 513 | user, desc = encoding.fromlocal(user), encoding.fromlocal(desc) |
|
511 | 514 | |
|
512 | 515 | user = user.strip() |
|
513 | 516 | # An empty username or a username with a "\n" will make the |
|
514 | 517 | # revision text contain two "\n\n" sequences -> corrupt |
|
515 | 518 | # repository since read cannot unpack the revision. |
|
516 | 519 | if not user: |
|
517 | 520 | raise error.StorageError(_("empty username")) |
|
518 | 521 | if "\n" in user: |
|
519 | 522 | raise error.StorageError(_("username %r contains a newline") |
|
520 | 523 | % pycompat.bytestr(user)) |
|
521 | 524 | |
|
522 | 525 | desc = stripdesc(desc) |
|
523 | 526 | |
|
524 | 527 | if date: |
|
525 | 528 | parseddate = "%d %d" % dateutil.parsedate(date) |
|
526 | 529 | else: |
|
527 | 530 | parseddate = "%d %d" % dateutil.makedate() |
|
528 | 531 | if extra: |
|
529 | 532 | branch = extra.get("branch") |
|
530 | 533 | if branch in ("default", ""): |
|
531 | 534 | del extra["branch"] |
|
532 | 535 | elif branch in (".", "null", "tip"): |
|
533 | 536 | raise error.StorageError(_('the name \'%s\' is reserved') |
|
534 | 537 | % branch) |
|
535 | 538 | if extra: |
|
536 | 539 | extra = encodeextra(extra) |
|
537 | 540 | parseddate = "%s %s" % (parseddate, extra) |
|
538 | 541 | l = [hex(manifest), user, parseddate] + sorted(files) + ["", desc] |
|
539 | 542 | text = "\n".join(l) |
|
540 | 543 | return self.addrevision(text, transaction, len(self), p1, p2) |
|
541 | 544 | |
|
542 | 545 | def branchinfo(self, rev): |
|
543 | 546 | """return the branch name and open/close state of a revision |
|
544 | 547 | |
|
545 | 548 | This function exists because creating a changectx object |
|
546 | 549 | just to access this is costly.""" |
|
547 | 550 | extra = self.read(rev)[5] |
|
548 | 551 | return encoding.tolocal(extra.get("branch")), 'close' in extra |
|
549 | 552 | |
|
550 | 553 | def _nodeduplicatecallback(self, transaction, node): |
|
551 | 554 | # keep track of revisions that got "re-added", eg: unbunde of know rev. |
|
552 | 555 | # |
|
553 | 556 | # We track them in a list to preserve their order from the source bundle |
|
554 | 557 | duplicates = transaction.changes.setdefault('revduplicates', []) |
|
555 | 558 | duplicates.append(self.rev(node)) |
General Comments 0
You need to be logged in to leave comments.
Login now