Show More
@@ -1,747 +1,748 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 | test-convert-git.t | |
|
119 | 120 | test-convert-hg-sink.t |
|
120 | 121 | test-convert-hg-source.t |
|
121 | 122 | test-convert-hg-startrev.t |
|
122 | 123 | test-convert-splicemap.t |
|
123 | 124 | test-convert-svn-sink.t |
|
124 | 125 | test-convert-tagsbranch-topology.t |
|
125 | 126 | test-convert.t |
|
126 | 127 | test-copy-move-merge.t |
|
127 | 128 | test-copy.t |
|
128 | 129 | test-copytrace-heuristics.t |
|
129 | 130 | test-custom-filters.t |
|
130 | 131 | test-debugbuilddag.t |
|
131 | 132 | test-debugbundle.t |
|
132 | 133 | test-debugcommands.t |
|
133 | 134 | test-debugextensions.t |
|
134 | 135 | test-debugindexdot.t |
|
135 | 136 | test-debugrename.t |
|
136 | 137 | test-default-push.t |
|
137 | 138 | test-diff-antipatience.t |
|
138 | 139 | test-diff-binary-file.t |
|
139 | 140 | test-diff-change.t |
|
140 | 141 | test-diff-color.t |
|
141 | 142 | test-diff-copy-depth.t |
|
142 | 143 | test-diff-hashes.t |
|
143 | 144 | test-diff-ignore-whitespace.t |
|
144 | 145 | test-diff-indent-heuristic.t |
|
145 | 146 | test-diff-issue2761.t |
|
146 | 147 | test-diff-newlines.t |
|
147 | 148 | test-diff-reverse.t |
|
148 | 149 | test-diff-subdir.t |
|
149 | 150 | test-diff-unified.t |
|
150 | 151 | test-diff-upgrade.t |
|
151 | 152 | test-diffdir.t |
|
152 | 153 | test-diffstat.t |
|
153 | 154 | test-directaccess.t |
|
154 | 155 | test-dirstate-backup.t |
|
155 | 156 | test-dirstate-nonnormalset.t |
|
156 | 157 | test-dirstate-race.t |
|
157 | 158 | test-dirstate.t |
|
158 | 159 | test-dispatch.py |
|
159 | 160 | test-dispatch.t |
|
160 | 161 | test-doctest.py |
|
161 | 162 | test-double-merge.t |
|
162 | 163 | test-drawdag.t |
|
163 | 164 | test-duplicateoptions.py |
|
164 | 165 | test-editor-filename.t |
|
165 | 166 | test-empty-dir.t |
|
166 | 167 | test-empty-file.t |
|
167 | 168 | test-empty-group.t |
|
168 | 169 | test-empty.t |
|
169 | 170 | test-encode.t |
|
170 | 171 | test-encoding-align.t |
|
171 | 172 | test-encoding-func.py |
|
172 | 173 | test-encoding-textwrap.t |
|
173 | 174 | test-encoding.t |
|
174 | 175 | test-eol-add.t |
|
175 | 176 | test-eol-clone.t |
|
176 | 177 | test-eol-hook.t |
|
177 | 178 | test-eol-patch.t |
|
178 | 179 | test-eol-tag.t |
|
179 | 180 | test-eol-update.t |
|
180 | 181 | test-eol.t |
|
181 | 182 | test-eolfilename.t |
|
182 | 183 | test-excessive-merge.t |
|
183 | 184 | test-exchange-obsmarkers-case-A1.t |
|
184 | 185 | test-exchange-obsmarkers-case-A2.t |
|
185 | 186 | test-exchange-obsmarkers-case-A3.t |
|
186 | 187 | test-exchange-obsmarkers-case-A4.t |
|
187 | 188 | test-exchange-obsmarkers-case-A5.t |
|
188 | 189 | test-exchange-obsmarkers-case-A6.t |
|
189 | 190 | test-exchange-obsmarkers-case-A7.t |
|
190 | 191 | test-exchange-obsmarkers-case-B1.t |
|
191 | 192 | test-exchange-obsmarkers-case-B2.t |
|
192 | 193 | test-exchange-obsmarkers-case-B3.t |
|
193 | 194 | test-exchange-obsmarkers-case-B4.t |
|
194 | 195 | test-exchange-obsmarkers-case-B5.t |
|
195 | 196 | test-exchange-obsmarkers-case-B6.t |
|
196 | 197 | test-exchange-obsmarkers-case-B7.t |
|
197 | 198 | test-exchange-obsmarkers-case-C1.t |
|
198 | 199 | test-exchange-obsmarkers-case-C2.t |
|
199 | 200 | test-exchange-obsmarkers-case-C3.t |
|
200 | 201 | test-exchange-obsmarkers-case-C4.t |
|
201 | 202 | test-exchange-obsmarkers-case-D1.t |
|
202 | 203 | test-exchange-obsmarkers-case-D2.t |
|
203 | 204 | test-exchange-obsmarkers-case-D3.t |
|
204 | 205 | test-exchange-obsmarkers-case-D4.t |
|
205 | 206 | test-execute-bit.t |
|
206 | 207 | test-export.t |
|
207 | 208 | test-extdata.t |
|
208 | 209 | test-extdiff.t |
|
209 | 210 | test-extension-timing.t |
|
210 | 211 | test-extensions-afterloaded.t |
|
211 | 212 | test-extensions-wrapfunction.py |
|
212 | 213 | test-extra-filelog-entry.t |
|
213 | 214 | test-fastannotate-corrupt.t |
|
214 | 215 | test-fastannotate-diffopts.t |
|
215 | 216 | test-fastannotate-hg.t |
|
216 | 217 | test-fastannotate-perfhack.t |
|
217 | 218 | test-fastannotate-protocol.t |
|
218 | 219 | test-fastannotate-renames.t |
|
219 | 220 | test-fastannotate-revmap.py |
|
220 | 221 | test-fastannotate.t |
|
221 | 222 | test-fetch.t |
|
222 | 223 | test-filebranch.t |
|
223 | 224 | test-filecache.py |
|
224 | 225 | test-filelog.py |
|
225 | 226 | test-fileset-generated.t |
|
226 | 227 | test-fileset.t |
|
227 | 228 | test-fix-topology.t |
|
228 | 229 | test-fix.t |
|
229 | 230 | test-flags.t |
|
230 | 231 | test-fncache.t |
|
231 | 232 | test-gendoc-da.t |
|
232 | 233 | test-gendoc-de.t |
|
233 | 234 | test-gendoc-el.t |
|
234 | 235 | test-gendoc-fr.t |
|
235 | 236 | test-gendoc-it.t |
|
236 | 237 | test-gendoc-ja.t |
|
237 | 238 | test-gendoc-pt_BR.t |
|
238 | 239 | test-gendoc-ro.t |
|
239 | 240 | test-gendoc-ru.t |
|
240 | 241 | test-gendoc-sv.t |
|
241 | 242 | test-gendoc-zh_CN.t |
|
242 | 243 | test-gendoc-zh_TW.t |
|
243 | 244 | test-gendoc.t |
|
244 | 245 | test-generaldelta.t |
|
245 | 246 | test-getbundle.t |
|
246 | 247 | test-git-export.t |
|
247 | 248 | test-githelp.t |
|
248 | 249 | test-globalopts.t |
|
249 | 250 | test-glog-beautifygraph.t |
|
250 | 251 | test-glog-topological.t |
|
251 | 252 | test-glog.t |
|
252 | 253 | test-gpg.t |
|
253 | 254 | test-graft.t |
|
254 | 255 | test-grep.t |
|
255 | 256 | test-hardlinks.t |
|
256 | 257 | test-help-hide.t |
|
257 | 258 | test-help.t |
|
258 | 259 | test-hg-parseurl.py |
|
259 | 260 | test-hghave.t |
|
260 | 261 | test-hgignore.t |
|
261 | 262 | test-hgk.t |
|
262 | 263 | test-hgrc.t |
|
263 | 264 | test-hgweb-annotate-whitespace.t |
|
264 | 265 | test-hgweb-auth.py |
|
265 | 266 | test-hgweb-bundle.t |
|
266 | 267 | test-hgweb-commands.t |
|
267 | 268 | test-hgweb-csp.t |
|
268 | 269 | test-hgweb-descend-empties.t |
|
269 | 270 | test-hgweb-diffs.t |
|
270 | 271 | test-hgweb-empty.t |
|
271 | 272 | test-hgweb-filelog.t |
|
272 | 273 | test-hgweb-no-path-info.t |
|
273 | 274 | test-hgweb-no-request-uri.t |
|
274 | 275 | test-hgweb-non-interactive.t |
|
275 | 276 | test-hgweb-raw.t |
|
276 | 277 | test-hgweb-removed.t |
|
277 | 278 | test-hgweb-symrev.t |
|
278 | 279 | test-hgweb.t |
|
279 | 280 | test-hgwebdir-paths.py |
|
280 | 281 | test-hgwebdir.t |
|
281 | 282 | test-hgwebdirsym.t |
|
282 | 283 | test-histedit-arguments.t |
|
283 | 284 | test-histedit-base.t |
|
284 | 285 | test-histedit-bookmark-motion.t |
|
285 | 286 | test-histedit-commute.t |
|
286 | 287 | test-histedit-drop.t |
|
287 | 288 | test-histedit-edit.t |
|
288 | 289 | test-histedit-fold-non-commute.t |
|
289 | 290 | test-histedit-fold.t |
|
290 | 291 | test-histedit-no-backup.t |
|
291 | 292 | test-histedit-no-change.t |
|
292 | 293 | test-histedit-non-commute-abort.t |
|
293 | 294 | test-histedit-non-commute.t |
|
294 | 295 | test-histedit-obsolete.t |
|
295 | 296 | test-histedit-outgoing.t |
|
296 | 297 | test-histedit-templates.t |
|
297 | 298 | test-http-api-httpv2.t |
|
298 | 299 | test-http-api.t |
|
299 | 300 | test-http-bad-server.t |
|
300 | 301 | test-http-branchmap.t |
|
301 | 302 | test-http-bundle1.t |
|
302 | 303 | test-http-clone-r.t |
|
303 | 304 | test-http-permissions.t |
|
304 | 305 | test-http-protocol.t |
|
305 | 306 | test-http.t |
|
306 | 307 | test-hybridencode.py |
|
307 | 308 | test-i18n.t |
|
308 | 309 | test-identify.t |
|
309 | 310 | test-impexp-branch.t |
|
310 | 311 | test-import-bypass.t |
|
311 | 312 | test-import-context.t |
|
312 | 313 | test-import-eol.t |
|
313 | 314 | test-import-merge.t |
|
314 | 315 | test-import-unknown.t |
|
315 | 316 | test-import.t |
|
316 | 317 | test-imports-checker.t |
|
317 | 318 | test-incoming-outgoing.t |
|
318 | 319 | test-infinitepush-bundlestore.t |
|
319 | 320 | test-infinitepush-ci.t |
|
320 | 321 | test-infinitepush.t |
|
321 | 322 | test-inherit-mode.t |
|
322 | 323 | test-init.t |
|
323 | 324 | test-install.t |
|
324 | 325 | test-issue1089.t |
|
325 | 326 | test-issue1102.t |
|
326 | 327 | test-issue1175.t |
|
327 | 328 | test-issue1306.t |
|
328 | 329 | test-issue1438.t |
|
329 | 330 | test-issue1502.t |
|
330 | 331 | test-issue1802.t |
|
331 | 332 | test-issue1877.t |
|
332 | 333 | test-issue1993.t |
|
333 | 334 | test-issue2137.t |
|
334 | 335 | test-issue3084.t |
|
335 | 336 | test-issue4074.t |
|
336 | 337 | test-issue522.t |
|
337 | 338 | test-issue586.t |
|
338 | 339 | test-issue5979.t |
|
339 | 340 | test-issue612.t |
|
340 | 341 | test-issue619.t |
|
341 | 342 | test-issue660.t |
|
342 | 343 | test-issue672.t |
|
343 | 344 | test-issue842.t |
|
344 | 345 | test-journal-exists.t |
|
345 | 346 | test-journal-share.t |
|
346 | 347 | test-journal.t |
|
347 | 348 | test-keyword.t |
|
348 | 349 | test-known.t |
|
349 | 350 | test-largefiles-cache.t |
|
350 | 351 | test-largefiles-misc.t |
|
351 | 352 | test-largefiles-small-disk.t |
|
352 | 353 | test-largefiles-update.t |
|
353 | 354 | test-largefiles-wireproto.t |
|
354 | 355 | test-largefiles.t |
|
355 | 356 | test-lfconvert.t |
|
356 | 357 | test-lfs-bundle.t |
|
357 | 358 | test-lfs-largefiles.t |
|
358 | 359 | test-lfs-pointer.py |
|
359 | 360 | test-lfs-test-server.t |
|
360 | 361 | test-lfs.t |
|
361 | 362 | test-linelog.py |
|
362 | 363 | test-linerange.py |
|
363 | 364 | test-locate.t |
|
364 | 365 | test-lock-badness.t |
|
365 | 366 | test-log-exthook.t |
|
366 | 367 | test-log-linerange.t |
|
367 | 368 | test-log.t |
|
368 | 369 | test-logexchange.t |
|
369 | 370 | test-logtoprocess.t |
|
370 | 371 | test-lrucachedict.py |
|
371 | 372 | test-mactext.t |
|
372 | 373 | test-mailmap.t |
|
373 | 374 | test-manifest-merging.t |
|
374 | 375 | test-manifest.py |
|
375 | 376 | test-manifest.t |
|
376 | 377 | test-match.py |
|
377 | 378 | test-mdiff.py |
|
378 | 379 | test-merge-changedelete.t |
|
379 | 380 | test-merge-closedheads.t |
|
380 | 381 | test-merge-commit.t |
|
381 | 382 | test-merge-criss-cross.t |
|
382 | 383 | test-merge-default.t |
|
383 | 384 | test-merge-force.t |
|
384 | 385 | test-merge-halt.t |
|
385 | 386 | test-merge-internal-tools-pattern.t |
|
386 | 387 | test-merge-local.t |
|
387 | 388 | test-merge-no-file-change.t |
|
388 | 389 | test-merge-remove.t |
|
389 | 390 | test-merge-revert.t |
|
390 | 391 | test-merge-revert2.t |
|
391 | 392 | test-merge-subrepos.t |
|
392 | 393 | test-merge-symlinks.t |
|
393 | 394 | test-merge-tools.t |
|
394 | 395 | test-merge-types.t |
|
395 | 396 | test-merge1.t |
|
396 | 397 | test-merge10.t |
|
397 | 398 | test-merge2.t |
|
398 | 399 | test-merge4.t |
|
399 | 400 | test-merge5.t |
|
400 | 401 | test-merge6.t |
|
401 | 402 | test-merge7.t |
|
402 | 403 | test-merge8.t |
|
403 | 404 | test-merge9.t |
|
404 | 405 | test-minifileset.py |
|
405 | 406 | test-minirst.py |
|
406 | 407 | test-missing-capability.t |
|
407 | 408 | test-mq-eol.t |
|
408 | 409 | test-mq-git.t |
|
409 | 410 | test-mq-guards.t |
|
410 | 411 | test-mq-header-date.t |
|
411 | 412 | test-mq-header-from.t |
|
412 | 413 | test-mq-merge.t |
|
413 | 414 | test-mq-missingfiles.t |
|
414 | 415 | test-mq-pull-from-bundle.t |
|
415 | 416 | test-mq-qclone-http.t |
|
416 | 417 | test-mq-qdelete.t |
|
417 | 418 | test-mq-qdiff.t |
|
418 | 419 | test-mq-qfold.t |
|
419 | 420 | test-mq-qgoto.t |
|
420 | 421 | test-mq-qimport-fail-cleanup.t |
|
421 | 422 | test-mq-qimport.t |
|
422 | 423 | test-mq-qnew.t |
|
423 | 424 | test-mq-qpush-exact.t |
|
424 | 425 | test-mq-qpush-fail.t |
|
425 | 426 | test-mq-qqueue.t |
|
426 | 427 | test-mq-qrefresh-interactive.t |
|
427 | 428 | test-mq-qrefresh-replace-log-message.t |
|
428 | 429 | test-mq-qrefresh.t |
|
429 | 430 | test-mq-qrename.t |
|
430 | 431 | test-mq-qsave.t |
|
431 | 432 | test-mq-safety.t |
|
432 | 433 | test-mq-subrepo.t |
|
433 | 434 | test-mq-symlinks.t |
|
434 | 435 | test-mq.t |
|
435 | 436 | test-mv-cp-st-diff.t |
|
436 | 437 | test-narrow-acl.t |
|
437 | 438 | test-narrow-archive.t |
|
438 | 439 | test-narrow-clone-no-ellipsis.t |
|
439 | 440 | test-narrow-clone-non-narrow-server.t |
|
440 | 441 | test-narrow-clone-nonlinear.t |
|
441 | 442 | test-narrow-clone-stream.t |
|
442 | 443 | test-narrow-clone.t |
|
443 | 444 | test-narrow-commit.t |
|
444 | 445 | test-narrow-copies.t |
|
445 | 446 | test-narrow-debugcommands.t |
|
446 | 447 | test-narrow-debugrebuilddirstate.t |
|
447 | 448 | test-narrow-exchange-merges.t |
|
448 | 449 | test-narrow-exchange.t |
|
449 | 450 | test-narrow-expanddirstate.t |
|
450 | 451 | test-narrow-merge.t |
|
451 | 452 | test-narrow-patch.t |
|
452 | 453 | test-narrow-patterns.t |
|
453 | 454 | test-narrow-pull.t |
|
454 | 455 | test-narrow-rebase.t |
|
455 | 456 | test-narrow-shallow-merges.t |
|
456 | 457 | test-narrow-shallow.t |
|
457 | 458 | test-narrow-share.t |
|
458 | 459 | test-narrow-sparse.t |
|
459 | 460 | test-narrow-strip.t |
|
460 | 461 | test-narrow-trackedcmd.t |
|
461 | 462 | test-narrow-update.t |
|
462 | 463 | test-narrow-widen-no-ellipsis.t |
|
463 | 464 | test-narrow-widen.t |
|
464 | 465 | test-narrow.t |
|
465 | 466 | test-nested-repo.t |
|
466 | 467 | test-newbranch.t |
|
467 | 468 | test-newcgi.t |
|
468 | 469 | test-newercgi.t |
|
469 | 470 | test-nointerrupt.t |
|
470 | 471 | test-notify-changegroup.t |
|
471 | 472 | test-obshistory.t |
|
472 | 473 | test-obsmarker-template.t |
|
473 | 474 | test-obsmarkers-effectflag.t |
|
474 | 475 | test-obsolete-bounds-checking.t |
|
475 | 476 | test-obsolete-bundle-strip.t |
|
476 | 477 | test-obsolete-changeset-exchange.t |
|
477 | 478 | test-obsolete-checkheads.t |
|
478 | 479 | test-obsolete-distributed.t |
|
479 | 480 | test-obsolete-divergent.t |
|
480 | 481 | test-obsolete-tag-cache.t |
|
481 | 482 | test-obsolete.t |
|
482 | 483 | test-oldcgi.t |
|
483 | 484 | test-origbackup-conflict.t |
|
484 | 485 | test-pager-legacy.t |
|
485 | 486 | test-pager.t |
|
486 | 487 | test-parents.t |
|
487 | 488 | test-parse-date.t |
|
488 | 489 | test-parseindex.t |
|
489 | 490 | test-parseindex2.py |
|
490 | 491 | test-patch-offset.t |
|
491 | 492 | test-patch.t |
|
492 | 493 | test-patchbomb-bookmark.t |
|
493 | 494 | test-patchbomb-tls.t |
|
494 | 495 | test-patchbomb.t |
|
495 | 496 | test-pathconflicts-basic.t |
|
496 | 497 | test-pathconflicts-merge.t |
|
497 | 498 | test-pathconflicts-update.t |
|
498 | 499 | test-pathencode.py |
|
499 | 500 | test-pending.t |
|
500 | 501 | test-permissions.t |
|
501 | 502 | test-phases-exchange.t |
|
502 | 503 | test-phases.t |
|
503 | 504 | test-profile.t |
|
504 | 505 | test-progress.t |
|
505 | 506 | test-propertycache.py |
|
506 | 507 | test-pull-branch.t |
|
507 | 508 | test-pull-bundle.t |
|
508 | 509 | test-pull-http.t |
|
509 | 510 | test-pull-permission.t |
|
510 | 511 | test-pull-pull-corruption.t |
|
511 | 512 | test-pull-r.t |
|
512 | 513 | test-pull-update.t |
|
513 | 514 | test-pull.t |
|
514 | 515 | test-purge.t |
|
515 | 516 | test-push-cgi.t |
|
516 | 517 | test-push-checkheads-partial-C1.t |
|
517 | 518 | test-push-checkheads-partial-C2.t |
|
518 | 519 | test-push-checkheads-partial-C3.t |
|
519 | 520 | test-push-checkheads-partial-C4.t |
|
520 | 521 | test-push-checkheads-pruned-B1.t |
|
521 | 522 | test-push-checkheads-pruned-B2.t |
|
522 | 523 | test-push-checkheads-pruned-B3.t |
|
523 | 524 | test-push-checkheads-pruned-B4.t |
|
524 | 525 | test-push-checkheads-pruned-B5.t |
|
525 | 526 | test-push-checkheads-pruned-B6.t |
|
526 | 527 | test-push-checkheads-pruned-B7.t |
|
527 | 528 | test-push-checkheads-pruned-B8.t |
|
528 | 529 | test-push-checkheads-superceed-A1.t |
|
529 | 530 | test-push-checkheads-superceed-A2.t |
|
530 | 531 | test-push-checkheads-superceed-A3.t |
|
531 | 532 | test-push-checkheads-superceed-A4.t |
|
532 | 533 | test-push-checkheads-superceed-A5.t |
|
533 | 534 | test-push-checkheads-superceed-A6.t |
|
534 | 535 | test-push-checkheads-superceed-A7.t |
|
535 | 536 | test-push-checkheads-superceed-A8.t |
|
536 | 537 | test-push-checkheads-unpushed-D1.t |
|
537 | 538 | test-push-checkheads-unpushed-D2.t |
|
538 | 539 | test-push-checkheads-unpushed-D3.t |
|
539 | 540 | test-push-checkheads-unpushed-D4.t |
|
540 | 541 | test-push-checkheads-unpushed-D5.t |
|
541 | 542 | test-push-checkheads-unpushed-D6.t |
|
542 | 543 | test-push-checkheads-unpushed-D7.t |
|
543 | 544 | test-push-http.t |
|
544 | 545 | test-push-race.t |
|
545 | 546 | test-push-warn.t |
|
546 | 547 | test-push.t |
|
547 | 548 | test-pushvars.t |
|
548 | 549 | test-qrecord.t |
|
549 | 550 | test-rebase-abort.t |
|
550 | 551 | test-rebase-backup.t |
|
551 | 552 | test-rebase-base-flag.t |
|
552 | 553 | test-rebase-bookmarks.t |
|
553 | 554 | test-rebase-brute-force.t |
|
554 | 555 | test-rebase-cache.t |
|
555 | 556 | test-rebase-check-restore.t |
|
556 | 557 | test-rebase-collapse.t |
|
557 | 558 | test-rebase-conflicts.t |
|
558 | 559 | test-rebase-dest.t |
|
559 | 560 | test-rebase-detach.t |
|
560 | 561 | test-rebase-emptycommit.t |
|
561 | 562 | test-rebase-inmemory.t |
|
562 | 563 | test-rebase-interruptions.t |
|
563 | 564 | test-rebase-issue-noparam-single-rev.t |
|
564 | 565 | test-rebase-legacy.t |
|
565 | 566 | test-rebase-mq-skip.t |
|
566 | 567 | test-rebase-mq.t |
|
567 | 568 | test-rebase-named-branches.t |
|
568 | 569 | test-rebase-newancestor.t |
|
569 | 570 | test-rebase-obsolete.t |
|
570 | 571 | test-rebase-parameters.t |
|
571 | 572 | test-rebase-partial.t |
|
572 | 573 | test-rebase-pull.t |
|
573 | 574 | test-rebase-rename.t |
|
574 | 575 | test-rebase-scenario-global.t |
|
575 | 576 | test-rebase-templates.t |
|
576 | 577 | test-rebase-transaction.t |
|
577 | 578 | test-rebuildstate.t |
|
578 | 579 | test-record.t |
|
579 | 580 | test-releasenotes-formatting.t |
|
580 | 581 | test-releasenotes-merging.t |
|
581 | 582 | test-releasenotes-parsing.t |
|
582 | 583 | test-relink.t |
|
583 | 584 | test-remotefilelog-bad-configs.t |
|
584 | 585 | test-remotefilelog-bgprefetch.t |
|
585 | 586 | test-remotefilelog-blame.t |
|
586 | 587 | test-remotefilelog-bundle2.t |
|
587 | 588 | test-remotefilelog-bundles.t |
|
588 | 589 | test-remotefilelog-cacheprocess.t |
|
589 | 590 | test-remotefilelog-clone-tree.t |
|
590 | 591 | test-remotefilelog-clone.t |
|
591 | 592 | test-remotefilelog-datapack.py |
|
592 | 593 | test-remotefilelog-gcrepack.t |
|
593 | 594 | test-remotefilelog-histpack.py |
|
594 | 595 | test-remotefilelog-http.t |
|
595 | 596 | test-remotefilelog-keepset.t |
|
596 | 597 | test-remotefilelog-local.t |
|
597 | 598 | test-remotefilelog-log.t |
|
598 | 599 | test-remotefilelog-partial-shallow.t |
|
599 | 600 | test-remotefilelog-permissions.t |
|
600 | 601 | test-remotefilelog-permisssions.t |
|
601 | 602 | test-remotefilelog-prefetch.t |
|
602 | 603 | test-remotefilelog-pull-noshallow.t |
|
603 | 604 | test-remotefilelog-share.t |
|
604 | 605 | test-remotefilelog-sparse.t |
|
605 | 606 | test-remotefilelog-tags.t |
|
606 | 607 | test-remotefilelog-wireproto.t |
|
607 | 608 | test-remove.t |
|
608 | 609 | test-removeemptydirs.t |
|
609 | 610 | test-rename-after-merge.t |
|
610 | 611 | test-rename-dir-merge.t |
|
611 | 612 | test-rename-merge1.t |
|
612 | 613 | test-rename-merge2.t |
|
613 | 614 | test-rename.t |
|
614 | 615 | test-repair-strip.t |
|
615 | 616 | test-repo-compengines.t |
|
616 | 617 | test-requires.t |
|
617 | 618 | test-resolve.t |
|
618 | 619 | test-revert-flags.t |
|
619 | 620 | test-revert-interactive.t |
|
620 | 621 | test-revert-unknown.t |
|
621 | 622 | test-revert.t |
|
622 | 623 | test-revisions.t |
|
623 | 624 | test-revlog-ancestry.py |
|
624 | 625 | test-revlog-group-emptyiter.t |
|
625 | 626 | test-revlog-mmapindex.t |
|
626 | 627 | test-revlog-packentry.t |
|
627 | 628 | test-revlog-raw.py |
|
628 | 629 | test-revlog-v2.t |
|
629 | 630 | test-revlog.t |
|
630 | 631 | test-revset-dirstate-parents.t |
|
631 | 632 | test-revset-legacy-lookup.t |
|
632 | 633 | test-revset-outgoing.t |
|
633 | 634 | test-revset2.t |
|
634 | 635 | test-rollback.t |
|
635 | 636 | test-run-tests.py |
|
636 | 637 | test-run-tests.t |
|
637 | 638 | test-rust-ancestor.py |
|
638 | 639 | test-schemes.t |
|
639 | 640 | test-serve.t |
|
640 | 641 | test-setdiscovery.t |
|
641 | 642 | test-share.t |
|
642 | 643 | test-shelve.t |
|
643 | 644 | test-shelve2.t |
|
644 | 645 | test-show-stack.t |
|
645 | 646 | test-show-work.t |
|
646 | 647 | test-show.t |
|
647 | 648 | test-simple-update.t |
|
648 | 649 | test-simplekeyvaluefile.py |
|
649 | 650 | test-simplemerge.py |
|
650 | 651 | test-single-head.t |
|
651 | 652 | test-sparse-clear.t |
|
652 | 653 | test-sparse-clone.t |
|
653 | 654 | test-sparse-import.t |
|
654 | 655 | test-sparse-merges.t |
|
655 | 656 | test-sparse-profiles.t |
|
656 | 657 | test-sparse-requirement.t |
|
657 | 658 | test-sparse-verbose-json.t |
|
658 | 659 | test-sparse.t |
|
659 | 660 | test-split.t |
|
660 | 661 | test-ssh-bundle1.t |
|
661 | 662 | test-ssh-clone-r.t |
|
662 | 663 | test-ssh-proto-unbundle.t |
|
663 | 664 | test-ssh-proto.t |
|
664 | 665 | test-ssh-repoerror.t |
|
665 | 666 | test-ssh.t |
|
666 | 667 | test-sshserver.py |
|
667 | 668 | test-stack.t |
|
668 | 669 | test-static-http.t |
|
669 | 670 | test-status-color.t |
|
670 | 671 | test-status-inprocess.py |
|
671 | 672 | test-status-rev.t |
|
672 | 673 | test-status-terse.t |
|
673 | 674 | test-status.t |
|
674 | 675 | test-storage.py |
|
675 | 676 | test-stream-bundle-v2.t |
|
676 | 677 | test-strict.t |
|
677 | 678 | test-strip-cross.t |
|
678 | 679 | test-strip.t |
|
679 | 680 | test-subrepo-deep-nested-change.t |
|
680 | 681 | test-subrepo-missing.t |
|
681 | 682 | test-subrepo-paths.t |
|
682 | 683 | test-subrepo-recursion.t |
|
683 | 684 | test-subrepo-relative-path.t |
|
684 | 685 | test-subrepo.t |
|
685 | 686 | test-symlink-os-yes-fs-no.py |
|
686 | 687 | test-symlink-placeholder.t |
|
687 | 688 | test-symlinks.t |
|
688 | 689 | test-tag.t |
|
689 | 690 | test-tags.t |
|
690 | 691 | test-template-basic.t |
|
691 | 692 | test-template-functions.t |
|
692 | 693 | test-template-keywords.t |
|
693 | 694 | test-template-map.t |
|
694 | 695 | test-tools.t |
|
695 | 696 | test-transplant.t |
|
696 | 697 | test-treediscovery-legacy.t |
|
697 | 698 | test-treediscovery.t |
|
698 | 699 | test-treemanifest.t |
|
699 | 700 | test-ui-color.py |
|
700 | 701 | test-ui-config.py |
|
701 | 702 | test-ui-verbosity.py |
|
702 | 703 | test-unamend.t |
|
703 | 704 | test-unbundlehash.t |
|
704 | 705 | test-uncommit.t |
|
705 | 706 | test-unified-test.t |
|
706 | 707 | test-unionrepo.t |
|
707 | 708 | test-unrelated-pull.t |
|
708 | 709 | test-up-local-change.t |
|
709 | 710 | test-update-atomic.t |
|
710 | 711 | test-update-branches.t |
|
711 | 712 | test-update-dest.t |
|
712 | 713 | test-update-issue1456.t |
|
713 | 714 | test-update-names.t |
|
714 | 715 | test-update-reverse.t |
|
715 | 716 | test-upgrade-repo.t |
|
716 | 717 | test-url-download.t |
|
717 | 718 | test-url-rev.t |
|
718 | 719 | test-url.py |
|
719 | 720 | test-username-newline.t |
|
720 | 721 | test-util.py |
|
721 | 722 | test-verify.t |
|
722 | 723 | test-walk.t |
|
723 | 724 | test-walkrepo.py |
|
724 | 725 | test-websub.t |
|
725 | 726 | test-win32text.t |
|
726 | 727 | test-wireproto-caching.t |
|
727 | 728 | test-wireproto-clientreactor.py |
|
728 | 729 | test-wireproto-command-branchmap.t |
|
729 | 730 | test-wireproto-command-capabilities.t |
|
730 | 731 | test-wireproto-command-changesetdata.t |
|
731 | 732 | test-wireproto-command-filedata.t |
|
732 | 733 | test-wireproto-command-filesdata.t |
|
733 | 734 | test-wireproto-command-heads.t |
|
734 | 735 | test-wireproto-command-known.t |
|
735 | 736 | test-wireproto-command-listkeys.t |
|
736 | 737 | test-wireproto-command-lookup.t |
|
737 | 738 | test-wireproto-command-manifestdata.t |
|
738 | 739 | test-wireproto-command-pushkey.t |
|
739 | 740 | test-wireproto-command-rawstorefiledata.t |
|
740 | 741 | test-wireproto-content-redirects.t |
|
741 | 742 | test-wireproto-exchangev2.t |
|
742 | 743 | test-wireproto-framing.py |
|
743 | 744 | test-wireproto-serverreactor.py |
|
744 | 745 | test-wireproto.py |
|
745 | 746 | test-wireproto.t |
|
746 | 747 | test-wsgirequest.py |
|
747 | 748 | test-xdg.t |
@@ -1,478 +1,480 b'' | |||
|
1 | 1 | # git.py - git support for the convert extension |
|
2 | 2 | # |
|
3 | 3 | # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others |
|
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 | from __future__ import absolute_import |
|
8 | 8 | |
|
9 | 9 | import os |
|
10 | 10 | |
|
11 | 11 | from mercurial.i18n import _ |
|
12 | 12 | from mercurial import ( |
|
13 | 13 | config, |
|
14 | 14 | error, |
|
15 | 15 | node as nodemod, |
|
16 | pycompat, | |
|
16 | 17 | ) |
|
17 | 18 | |
|
18 | 19 | from . import ( |
|
19 | 20 | common, |
|
20 | 21 | ) |
|
21 | 22 | |
|
22 | 23 | class submodule(object): |
|
23 | 24 | def __init__(self, path, node, url): |
|
24 | 25 | self.path = path |
|
25 | 26 | self.node = node |
|
26 | 27 | self.url = url |
|
27 | 28 | |
|
28 | 29 | def hgsub(self): |
|
29 | 30 | return "%s = [git]%s" % (self.path, self.url) |
|
30 | 31 | |
|
31 | 32 | def hgsubstate(self): |
|
32 | 33 | return "%s %s" % (self.node, self.path) |
|
33 | 34 | |
|
34 | 35 | # Keys in extra fields that should not be copied if the user requests. |
|
35 | 36 | bannedextrakeys = { |
|
36 | 37 | # Git commit object built-ins. |
|
37 | 38 | 'tree', |
|
38 | 39 | 'parent', |
|
39 | 40 | 'author', |
|
40 | 41 | 'committer', |
|
41 | 42 | # Mercurial built-ins. |
|
42 | 43 | 'branch', |
|
43 | 44 | 'close', |
|
44 | 45 | } |
|
45 | 46 | |
|
46 | 47 | class convert_git(common.converter_source, common.commandline): |
|
47 | 48 | # Windows does not support GIT_DIR= construct while other systems |
|
48 | 49 | # cannot remove environment variable. Just assume none have |
|
49 | 50 | # both issues. |
|
50 | 51 | |
|
51 | 52 | def _gitcmd(self, cmd, *args, **kwargs): |
|
52 | 53 | return cmd('--git-dir=%s' % self.path, *args, **kwargs) |
|
53 | 54 | |
|
54 | 55 | def gitrun0(self, *args, **kwargs): |
|
55 | 56 | return self._gitcmd(self.run0, *args, **kwargs) |
|
56 | 57 | |
|
57 | 58 | def gitrun(self, *args, **kwargs): |
|
58 | 59 | return self._gitcmd(self.run, *args, **kwargs) |
|
59 | 60 | |
|
60 | 61 | def gitrunlines0(self, *args, **kwargs): |
|
61 | 62 | return self._gitcmd(self.runlines0, *args, **kwargs) |
|
62 | 63 | |
|
63 | 64 | def gitrunlines(self, *args, **kwargs): |
|
64 | 65 | return self._gitcmd(self.runlines, *args, **kwargs) |
|
65 | 66 | |
|
66 | 67 | def gitpipe(self, *args, **kwargs): |
|
67 | 68 | return self._gitcmd(self._run3, *args, **kwargs) |
|
68 | 69 | |
|
69 | 70 | def __init__(self, ui, repotype, path, revs=None): |
|
70 | 71 | super(convert_git, self).__init__(ui, repotype, path, revs=revs) |
|
71 | 72 | common.commandline.__init__(self, ui, 'git') |
|
72 | 73 | |
|
73 | 74 | # Pass an absolute path to git to prevent from ever being interpreted |
|
74 | 75 | # as a URL |
|
75 | 76 | path = os.path.abspath(path) |
|
76 | 77 | |
|
77 | 78 | if os.path.isdir(path + "/.git"): |
|
78 | 79 | path += "/.git" |
|
79 | 80 | if not os.path.exists(path + "/objects"): |
|
80 | 81 | raise common.NoRepo(_("%s does not look like a Git repository") % |
|
81 | 82 | path) |
|
82 | 83 | |
|
83 | 84 | # The default value (50) is based on the default for 'git diff'. |
|
84 | 85 | similarity = ui.configint('convert', 'git.similarity') |
|
85 | 86 | if similarity < 0 or similarity > 100: |
|
86 | 87 | raise error.Abort(_('similarity must be between 0 and 100')) |
|
87 | 88 | if similarity > 0: |
|
88 | 89 | self.simopt = ['-C%d%%' % similarity] |
|
89 | 90 | findcopiesharder = ui.configbool('convert', 'git.findcopiesharder') |
|
90 | 91 | if findcopiesharder: |
|
91 | 92 | self.simopt.append('--find-copies-harder') |
|
92 | 93 | |
|
93 | 94 | renamelimit = ui.configint('convert', 'git.renamelimit') |
|
94 | 95 | self.simopt.append('-l%d' % renamelimit) |
|
95 | 96 | else: |
|
96 | 97 | self.simopt = [] |
|
97 | 98 | |
|
98 | 99 | common.checktool('git', 'git') |
|
99 | 100 | |
|
100 | 101 | self.path = path |
|
101 | 102 | self.submodules = [] |
|
102 | 103 | |
|
103 | 104 | self.catfilepipe = self.gitpipe('cat-file', '--batch') |
|
104 | 105 | |
|
105 | 106 | self.copyextrakeys = self.ui.configlist('convert', 'git.extrakeys') |
|
106 | 107 | banned = set(self.copyextrakeys) & bannedextrakeys |
|
107 | 108 | if banned: |
|
108 | 109 | raise error.Abort(_('copying of extra key is forbidden: %s') % |
|
109 | 110 | _(', ').join(sorted(banned))) |
|
110 | 111 | |
|
111 | 112 | committeractions = self.ui.configlist('convert', 'git.committeractions') |
|
112 | 113 | |
|
113 | 114 | messagedifferent = None |
|
114 | 115 | messagealways = None |
|
115 | 116 | for a in committeractions: |
|
116 | 117 | if a.startswith(('messagedifferent', 'messagealways')): |
|
117 | 118 | k = a |
|
118 | 119 | v = None |
|
119 | 120 | if '=' in a: |
|
120 | 121 | k, v = a.split('=', 1) |
|
121 | 122 | |
|
122 | 123 | if k == 'messagedifferent': |
|
123 | 124 | messagedifferent = v or 'committer:' |
|
124 | 125 | elif k == 'messagealways': |
|
125 | 126 | messagealways = v or 'committer:' |
|
126 | 127 | |
|
127 | 128 | if messagedifferent and messagealways: |
|
128 | 129 | raise error.Abort(_('committeractions cannot define both ' |
|
129 | 130 | 'messagedifferent and messagealways')) |
|
130 | 131 | |
|
131 | 132 | dropcommitter = 'dropcommitter' in committeractions |
|
132 | 133 | replaceauthor = 'replaceauthor' in committeractions |
|
133 | 134 | |
|
134 | 135 | if dropcommitter and replaceauthor: |
|
135 | 136 | raise error.Abort(_('committeractions cannot define both ' |
|
136 | 137 | 'dropcommitter and replaceauthor')) |
|
137 | 138 | |
|
138 | 139 | if dropcommitter and messagealways: |
|
139 | 140 | raise error.Abort(_('committeractions cannot define both ' |
|
140 | 141 | 'dropcommitter and messagealways')) |
|
141 | 142 | |
|
142 | 143 | if not messagedifferent and not messagealways: |
|
143 | 144 | messagedifferent = 'committer:' |
|
144 | 145 | |
|
145 | 146 | self.committeractions = { |
|
146 | 147 | 'dropcommitter': dropcommitter, |
|
147 | 148 | 'replaceauthor': replaceauthor, |
|
148 | 149 | 'messagedifferent': messagedifferent, |
|
149 | 150 | 'messagealways': messagealways, |
|
150 | 151 | } |
|
151 | 152 | |
|
152 | 153 | def after(self): |
|
153 | 154 | for f in self.catfilepipe: |
|
154 | 155 | f.close() |
|
155 | 156 | |
|
156 | 157 | def getheads(self): |
|
157 | 158 | if not self.revs: |
|
158 | 159 | output, status = self.gitrun('rev-parse', '--branches', '--remotes') |
|
159 | 160 | heads = output.splitlines() |
|
160 | 161 | if status: |
|
161 | 162 | raise error.Abort(_('cannot retrieve git heads')) |
|
162 | 163 | else: |
|
163 | 164 | heads = [] |
|
164 | 165 | for rev in self.revs: |
|
165 | 166 | rawhead, ret = self.gitrun('rev-parse', '--verify', rev) |
|
166 | 167 | heads.append(rawhead[:-1]) |
|
167 | 168 | if ret: |
|
168 | 169 | raise error.Abort(_('cannot retrieve git head "%s"') % rev) |
|
169 | 170 | return heads |
|
170 | 171 | |
|
171 | 172 | def catfile(self, rev, ftype): |
|
172 | 173 | if rev == nodemod.nullhex: |
|
173 | 174 | raise IOError |
|
174 | 175 | self.catfilepipe[0].write(rev+'\n') |
|
175 | 176 | self.catfilepipe[0].flush() |
|
176 | 177 | info = self.catfilepipe[1].readline().split() |
|
177 | 178 | if info[1] != ftype: |
|
178 |
raise error.Abort(_('cannot read %r object at %s') % ( |
|
|
179 | raise error.Abort(_('cannot read %r object at %s') % ( | |
|
180 | pycompat.bytestr(ftype), rev)) | |
|
179 | 181 | size = int(info[2]) |
|
180 | 182 | data = self.catfilepipe[1].read(size) |
|
181 | 183 | if len(data) < size: |
|
182 | 184 | raise error.Abort(_('cannot read %r object at %s: unexpected size') |
|
183 | 185 | % (ftype, rev)) |
|
184 | 186 | # read the trailing newline |
|
185 | 187 | self.catfilepipe[1].read(1) |
|
186 | 188 | return data |
|
187 | 189 | |
|
188 | 190 | def getfile(self, name, rev): |
|
189 | 191 | if rev == nodemod.nullhex: |
|
190 | 192 | return None, None |
|
191 | 193 | if name == '.hgsub': |
|
192 | 194 | data = '\n'.join([m.hgsub() for m in self.submoditer()]) |
|
193 | 195 | mode = '' |
|
194 | 196 | elif name == '.hgsubstate': |
|
195 | 197 | data = '\n'.join([m.hgsubstate() for m in self.submoditer()]) |
|
196 | 198 | mode = '' |
|
197 | 199 | else: |
|
198 | 200 | data = self.catfile(rev, "blob") |
|
199 | 201 | mode = self.modecache[(name, rev)] |
|
200 | 202 | return data, mode |
|
201 | 203 | |
|
202 | 204 | def submoditer(self): |
|
203 | 205 | null = nodemod.nullhex |
|
204 | 206 | for m in sorted(self.submodules, key=lambda p: p.path): |
|
205 | 207 | if m.node != null: |
|
206 | 208 | yield m |
|
207 | 209 | |
|
208 | 210 | def parsegitmodules(self, content): |
|
209 | 211 | """Parse the formatted .gitmodules file, example file format: |
|
210 | 212 | [submodule "sub"]\n |
|
211 | 213 | \tpath = sub\n |
|
212 | 214 | \turl = git://giturl\n |
|
213 | 215 | """ |
|
214 | 216 | self.submodules = [] |
|
215 | 217 | c = config.config() |
|
216 | 218 | # Each item in .gitmodules starts with whitespace that cant be parsed |
|
217 | 219 | c.parse('.gitmodules', '\n'.join(line.strip() for line in |
|
218 | 220 | content.split('\n'))) |
|
219 | 221 | for sec in c.sections(): |
|
220 | 222 | s = c[sec] |
|
221 | 223 | if 'url' in s and 'path' in s: |
|
222 | 224 | self.submodules.append(submodule(s['path'], '', s['url'])) |
|
223 | 225 | |
|
224 | 226 | def retrievegitmodules(self, version): |
|
225 | 227 | modules, ret = self.gitrun('show', '%s:%s' % (version, '.gitmodules')) |
|
226 | 228 | if ret: |
|
227 | 229 | # This can happen if a file is in the repo that has permissions |
|
228 | 230 | # 160000, but there is no .gitmodules file. |
|
229 | 231 | self.ui.warn(_("warning: cannot read submodules config file in " |
|
230 | 232 | "%s\n") % version) |
|
231 | 233 | return |
|
232 | 234 | |
|
233 | 235 | try: |
|
234 | 236 | self.parsegitmodules(modules) |
|
235 | 237 | except error.ParseError: |
|
236 | 238 | self.ui.warn(_("warning: unable to parse .gitmodules in %s\n") |
|
237 | 239 | % version) |
|
238 | 240 | return |
|
239 | 241 | |
|
240 | 242 | for m in self.submodules: |
|
241 | 243 | node, ret = self.gitrun('rev-parse', '%s:%s' % (version, m.path)) |
|
242 | 244 | if ret: |
|
243 | 245 | continue |
|
244 | 246 | m.node = node.strip() |
|
245 | 247 | |
|
246 | 248 | def getchanges(self, version, full): |
|
247 | 249 | if full: |
|
248 | 250 | raise error.Abort(_("convert from git does not support --full")) |
|
249 | 251 | self.modecache = {} |
|
250 | 252 | cmd = ['diff-tree','-z', '--root', '-m', '-r'] + self.simopt + [version] |
|
251 | 253 | output, status = self.gitrun(*cmd) |
|
252 | 254 | if status: |
|
253 | 255 | raise error.Abort(_('cannot read changes in %s') % version) |
|
254 | 256 | changes = [] |
|
255 | 257 | copies = {} |
|
256 | 258 | seen = set() |
|
257 | 259 | entry = None |
|
258 | 260 | subexists = [False] |
|
259 | 261 | subdeleted = [False] |
|
260 | 262 | difftree = output.split('\x00') |
|
261 | 263 | lcount = len(difftree) |
|
262 | 264 | i = 0 |
|
263 | 265 | |
|
264 | 266 | skipsubmodules = self.ui.configbool('convert', 'git.skipsubmodules') |
|
265 | 267 | def add(entry, f, isdest): |
|
266 | 268 | seen.add(f) |
|
267 | 269 | h = entry[3] |
|
268 | 270 | p = (entry[1] == "100755") |
|
269 | 271 | s = (entry[1] == "120000") |
|
270 | 272 | renamesource = (not isdest and entry[4][0] == 'R') |
|
271 | 273 | |
|
272 | 274 | if f == '.gitmodules': |
|
273 | 275 | if skipsubmodules: |
|
274 | 276 | return |
|
275 | 277 | |
|
276 | 278 | subexists[0] = True |
|
277 | 279 | if entry[4] == 'D' or renamesource: |
|
278 | 280 | subdeleted[0] = True |
|
279 | 281 | changes.append(('.hgsub', nodemod.nullhex)) |
|
280 | 282 | else: |
|
281 | 283 | changes.append(('.hgsub', '')) |
|
282 | 284 | elif entry[1] == '160000' or entry[0] == ':160000': |
|
283 | 285 | if not skipsubmodules: |
|
284 | 286 | subexists[0] = True |
|
285 | 287 | else: |
|
286 | 288 | if renamesource: |
|
287 | 289 | h = nodemod.nullhex |
|
288 | 290 | self.modecache[(f, h)] = (p and "x") or (s and "l") or "" |
|
289 | 291 | changes.append((f, h)) |
|
290 | 292 | |
|
291 | 293 | while i < lcount: |
|
292 | 294 | l = difftree[i] |
|
293 | 295 | i += 1 |
|
294 | 296 | if not entry: |
|
295 | 297 | if not l.startswith(':'): |
|
296 | 298 | continue |
|
297 | entry = l.split() | |
|
299 | entry = tuple(pycompat.bytestr(p) for p in l.split()) | |
|
298 | 300 | continue |
|
299 | 301 | f = l |
|
300 | 302 | if entry[4][0] == 'C': |
|
301 | 303 | copysrc = f |
|
302 | 304 | copydest = difftree[i] |
|
303 | 305 | i += 1 |
|
304 | 306 | f = copydest |
|
305 | 307 | copies[copydest] = copysrc |
|
306 | 308 | if f not in seen: |
|
307 | 309 | add(entry, f, False) |
|
308 | 310 | # A file can be copied multiple times, or modified and copied |
|
309 | 311 | # simultaneously. So f can be repeated even if fdest isn't. |
|
310 | 312 | if entry[4][0] == 'R': |
|
311 | 313 | # rename: next line is the destination |
|
312 | 314 | fdest = difftree[i] |
|
313 | 315 | i += 1 |
|
314 | 316 | if fdest not in seen: |
|
315 | 317 | add(entry, fdest, True) |
|
316 | 318 | # .gitmodules isn't imported at all, so it being copied to |
|
317 | 319 | # and fro doesn't really make sense |
|
318 | 320 | if f != '.gitmodules' and fdest != '.gitmodules': |
|
319 | 321 | copies[fdest] = f |
|
320 | 322 | entry = None |
|
321 | 323 | |
|
322 | 324 | if subexists[0]: |
|
323 | 325 | if subdeleted[0]: |
|
324 | 326 | changes.append(('.hgsubstate', nodemod.nullhex)) |
|
325 | 327 | else: |
|
326 | 328 | self.retrievegitmodules(version) |
|
327 | 329 | changes.append(('.hgsubstate', '')) |
|
328 | 330 | return (changes, copies, set()) |
|
329 | 331 | |
|
330 | 332 | def getcommit(self, version): |
|
331 | 333 | c = self.catfile(version, "commit") # read the commit hash |
|
332 | 334 | end = c.find("\n\n") |
|
333 | 335 | message = c[end + 2:] |
|
334 | 336 | message = self.recode(message) |
|
335 | 337 | l = c[:end].splitlines() |
|
336 | 338 | parents = [] |
|
337 | 339 | author = committer = None |
|
338 | 340 | extra = {} |
|
339 | 341 | for e in l[1:]: |
|
340 | 342 | n, v = e.split(" ", 1) |
|
341 | 343 | if n == "author": |
|
342 | 344 | p = v.split() |
|
343 | 345 | tm, tz = p[-2:] |
|
344 | 346 | author = " ".join(p[:-2]) |
|
345 | 347 | if author[0] == "<": |
|
346 | 348 | author = author[1:-1] |
|
347 | 349 | author = self.recode(author) |
|
348 | 350 | if n == "committer": |
|
349 | 351 | p = v.split() |
|
350 | 352 | tm, tz = p[-2:] |
|
351 | 353 | committer = " ".join(p[:-2]) |
|
352 | 354 | if committer[0] == "<": |
|
353 | 355 | committer = committer[1:-1] |
|
354 | 356 | committer = self.recode(committer) |
|
355 | 357 | if n == "parent": |
|
356 | 358 | parents.append(v) |
|
357 | 359 | if n in self.copyextrakeys: |
|
358 | 360 | extra[n] = v |
|
359 | 361 | |
|
360 | 362 | if self.committeractions['dropcommitter']: |
|
361 | 363 | committer = None |
|
362 | 364 | elif self.committeractions['replaceauthor']: |
|
363 | 365 | author = committer |
|
364 | 366 | |
|
365 | 367 | if committer: |
|
366 | 368 | messagealways = self.committeractions['messagealways'] |
|
367 | 369 | messagedifferent = self.committeractions['messagedifferent'] |
|
368 | 370 | if messagealways: |
|
369 | 371 | message += '\n%s %s\n' % (messagealways, committer) |
|
370 | 372 | elif messagedifferent and author != committer: |
|
371 | 373 | message += '\n%s %s\n' % (messagedifferent, committer) |
|
372 | 374 | |
|
373 | 375 | tzs, tzh, tzm = tz[-5:-4] + "1", tz[-4:-2], tz[-2:] |
|
374 | 376 | tz = -int(tzs) * (int(tzh) * 3600 + int(tzm)) |
|
375 | 377 | date = tm + " " + (b"%d" % tz) |
|
376 | 378 | saverev = self.ui.configbool('convert', 'git.saverev') |
|
377 | 379 | |
|
378 | 380 | c = common.commit(parents=parents, date=date, author=author, |
|
379 | 381 | desc=message, |
|
380 | 382 | rev=version, |
|
381 | 383 | extra=extra, |
|
382 | 384 | saverev=saverev) |
|
383 | 385 | return c |
|
384 | 386 | |
|
385 | 387 | def numcommits(self): |
|
386 | 388 | output, ret = self.gitrunlines('rev-list', '--all') |
|
387 | 389 | if ret: |
|
388 | 390 | raise error.Abort(_('cannot retrieve number of commits in %s') \ |
|
389 | 391 | % self.path) |
|
390 | 392 | return len(output) |
|
391 | 393 | |
|
392 | 394 | def gettags(self): |
|
393 | 395 | tags = {} |
|
394 | 396 | alltags = {} |
|
395 | 397 | output, status = self.gitrunlines('ls-remote', '--tags', self.path) |
|
396 | 398 | |
|
397 | 399 | if status: |
|
398 | 400 | raise error.Abort(_('cannot read tags from %s') % self.path) |
|
399 | 401 | prefix = 'refs/tags/' |
|
400 | 402 | |
|
401 | 403 | # Build complete list of tags, both annotated and bare ones |
|
402 | 404 | for line in output: |
|
403 | 405 | line = line.strip() |
|
404 | 406 | if line.startswith("error:") or line.startswith("fatal:"): |
|
405 | 407 | raise error.Abort(_('cannot read tags from %s') % self.path) |
|
406 | 408 | node, tag = line.split(None, 1) |
|
407 | 409 | if not tag.startswith(prefix): |
|
408 | 410 | continue |
|
409 | 411 | alltags[tag[len(prefix):]] = node |
|
410 | 412 | |
|
411 | 413 | # Filter out tag objects for annotated tag refs |
|
412 | 414 | for tag in alltags: |
|
413 | 415 | if tag.endswith('^{}'): |
|
414 | 416 | tags[tag[:-3]] = alltags[tag] |
|
415 | 417 | else: |
|
416 | 418 | if tag + '^{}' in alltags: |
|
417 | 419 | continue |
|
418 | 420 | else: |
|
419 | 421 | tags[tag] = alltags[tag] |
|
420 | 422 | |
|
421 | 423 | return tags |
|
422 | 424 | |
|
423 | 425 | def getchangedfiles(self, version, i): |
|
424 | 426 | changes = [] |
|
425 | 427 | if i is None: |
|
426 | 428 | output, status = self.gitrunlines('diff-tree', '--root', '-m', |
|
427 | 429 | '-r', version) |
|
428 | 430 | if status: |
|
429 | 431 | raise error.Abort(_('cannot read changes in %s') % version) |
|
430 | 432 | for l in output: |
|
431 | 433 | if "\t" not in l: |
|
432 | 434 | continue |
|
433 | 435 | m, f = l[:-1].split("\t") |
|
434 | 436 | changes.append(f) |
|
435 | 437 | else: |
|
436 | 438 | output, status = self.gitrunlines('diff-tree', '--name-only', |
|
437 | 439 | '--root', '-r', version, |
|
438 | 440 | '%s^%d' % (version, i + 1), '--') |
|
439 | 441 | if status: |
|
440 | 442 | raise error.Abort(_('cannot read changes in %s') % version) |
|
441 | 443 | changes = [f.rstrip('\n') for f in output] |
|
442 | 444 | |
|
443 | 445 | return changes |
|
444 | 446 | |
|
445 | 447 | def getbookmarks(self): |
|
446 | 448 | bookmarks = {} |
|
447 | 449 | |
|
448 | 450 | # Handle local and remote branches |
|
449 | 451 | remoteprefix = self.ui.config('convert', 'git.remoteprefix') |
|
450 | 452 | reftypes = [ |
|
451 | 453 | # (git prefix, hg prefix) |
|
452 | 454 | ('refs/remotes/origin/', remoteprefix + '/'), |
|
453 | 455 | ('refs/heads/', '') |
|
454 | 456 | ] |
|
455 | 457 | |
|
456 | 458 | exclude = { |
|
457 | 459 | 'refs/remotes/origin/HEAD', |
|
458 | 460 | } |
|
459 | 461 | |
|
460 | 462 | try: |
|
461 | 463 | output, status = self.gitrunlines('show-ref') |
|
462 | 464 | for line in output: |
|
463 | 465 | line = line.strip() |
|
464 | 466 | rev, name = line.split(None, 1) |
|
465 | 467 | # Process each type of branch |
|
466 | 468 | for gitprefix, hgprefix in reftypes: |
|
467 | 469 | if not name.startswith(gitprefix) or name in exclude: |
|
468 | 470 | continue |
|
469 | 471 | name = '%s%s' % (hgprefix, name[len(gitprefix):]) |
|
470 | 472 | bookmarks[name] = rev |
|
471 | 473 | except Exception: |
|
472 | 474 | pass |
|
473 | 475 | |
|
474 | 476 | return bookmarks |
|
475 | 477 | |
|
476 | 478 | def checkrevformat(self, revstr, mapname='splicemap'): |
|
477 | 479 | """ git revision string is a 40 byte hex """ |
|
478 | 480 | self.checkhexformat(revstr, mapname) |
General Comments 0
You need to be logged in to leave comments.
Login now