##// END OF EJS Templates
fastexport: make a diagnostics message more localizable...
Joerg Sonnenberger -
r45181:44aff45b default
parent child Browse files
Show More
@@ -1,218 +1,219 b''
1 1 # Copyright 2020 Joerg Sonnenberger <joerg@bec.de>
2 2 #
3 3 # This software may be used and distributed according to the terms of the
4 4 # GNU General Public License version 2 or any later version.
5 5 """export repositories as git fast-import stream"""
6 6
7 7 # The format specification for fast-import streams can be found at
8 8 # https://git-scm.com/docs/git-fast-import#_input_format
9 9
10 10 from __future__ import absolute_import
11 11 import re
12 12
13 13 from mercurial.i18n import _
14 14 from mercurial.node import hex, nullrev
15 15 from mercurial.utils import stringutil
16 16 from mercurial import (
17 17 error,
18 18 pycompat,
19 19 registrar,
20 20 scmutil,
21 21 )
22 22 from .convert import convcmd
23 23
24 24 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
25 25 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
26 26 # be specifying the version(s) of Mercurial they are tested with, or
27 27 # leave the attribute unspecified.
28 28 testedwith = b"ships-with-hg-core"
29 29
30 30 cmdtable = {}
31 31 command = registrar.command(cmdtable)
32 32
33 33 GIT_PERSON_PROHIBITED = re.compile(b'[<>\n"]')
34 34 GIT_EMAIL_PROHIBITED = re.compile(b"[<> \n]")
35 35
36 36
37 37 def convert_to_git_user(authormap, user, rev):
38 38 mapped_user = authormap.get(user, user)
39 39 user_person = stringutil.person(mapped_user)
40 40 user_email = stringutil.email(mapped_user)
41 41 if GIT_EMAIL_PROHIBITED.match(user_email) or GIT_PERSON_PROHIBITED.match(
42 42 user_person
43 43 ):
44 44 raise error.Abort(
45 _(b"Unable to parse user into person and email for revision " + rev)
45 _(b"Unable to parse user into person and email for revision %s")
46 % rev
46 47 )
47 48 if user_person:
48 49 return b'"' + user_person + b'" <' + user_email + b'>'
49 50 else:
50 51 return b"<" + user_email + b">"
51 52
52 53
53 54 def convert_to_git_date(date):
54 55 timestamp, utcoff = date
55 56 tzsign = b"+" if utcoff < 0 else b"-"
56 57 if utcoff % 60 != 0:
57 58 raise error.Abort(
58 59 _(b"UTC offset in %b is not an integer number of seconds") % (date,)
59 60 )
60 61 utcoff = abs(utcoff) // 60
61 62 tzh = utcoff // 60
62 63 tzmin = utcoff % 60
63 64 return b"%d " % int(timestamp) + tzsign + b"%02d%02d" % (tzh, tzmin)
64 65
65 66
66 67 def convert_to_git_ref(branch):
67 68 # XXX filter/map depending on git restrictions
68 69 return b"refs/heads/" + branch
69 70
70 71
71 72 def write_data(buf, data, skip_newline):
72 73 buf.append(b"data %d\n" % len(data))
73 74 buf.append(data)
74 75 if not skip_newline or data[-1:] != b"\n":
75 76 buf.append(b"\n")
76 77
77 78
78 79 def export_commit(ui, repo, rev, marks, authormap):
79 80 ctx = repo[rev]
80 81 revid = ctx.hex()
81 82 if revid in marks:
82 83 ui.warn(_(b"warning: revision %s already exported, skipped\n") % revid)
83 84 return
84 85 parents = [p for p in ctx.parents() if p.rev() != nullrev]
85 86 for p in parents:
86 87 if p.hex() not in marks:
87 88 ui.warn(
88 89 _(b"warning: parent %s of %s has not been exported, skipped\n")
89 90 % (p, revid)
90 91 )
91 92 return
92 93
93 94 # For all files modified by the commit, check if they have already
94 95 # been exported and otherwise dump the blob with the new mark.
95 96 for fname in ctx.files():
96 97 if fname not in ctx:
97 98 continue
98 99 filectx = ctx.filectx(fname)
99 100 filerev = hex(filectx.filenode())
100 101 if filerev not in marks:
101 102 mark = len(marks) + 1
102 103 marks[filerev] = mark
103 104 data = filectx.data()
104 105 buf = [b"blob\n", b"mark :%d\n" % mark]
105 106 write_data(buf, data, False)
106 107 ui.write(*buf, keepprogressbar=True)
107 108 del buf
108 109
109 110 # Assign a mark for the current revision for references by
110 111 # latter merge commits.
111 112 mark = len(marks) + 1
112 113 marks[revid] = mark
113 114
114 115 ref = convert_to_git_ref(ctx.branch())
115 116 buf = [
116 117 b"commit %s\n" % ref,
117 118 b"mark :%d\n" % mark,
118 119 b"committer %s %s\n"
119 120 % (
120 121 convert_to_git_user(authormap, ctx.user(), revid),
121 122 convert_to_git_date(ctx.date()),
122 123 ),
123 124 ]
124 125 write_data(buf, ctx.description(), True)
125 126 if parents:
126 127 buf.append(b"from :%d\n" % marks[parents[0].hex()])
127 128 if len(parents) == 2:
128 129 buf.append(b"merge :%d\n" % marks[parents[1].hex()])
129 130 p0ctx = repo[parents[0]]
130 131 files = ctx.manifest().diff(p0ctx.manifest())
131 132 else:
132 133 files = ctx.files()
133 134 filebuf = []
134 135 for fname in files:
135 136 if fname not in ctx:
136 137 filebuf.append((fname, b"D %s\n" % fname))
137 138 else:
138 139 filectx = ctx.filectx(fname)
139 140 filerev = filectx.filenode()
140 141 fileperm = b"755" if filectx.isexec() else b"644"
141 142 changed = b"M %s :%d %s\n" % (fileperm, marks[hex(filerev)], fname)
142 143 filebuf.append((fname, changed))
143 144 filebuf.sort()
144 145 buf.extend(changed for (fname, changed) in filebuf)
145 146 del filebuf
146 147 buf.append(b"\n")
147 148 ui.write(*buf, keepprogressbar=True)
148 149 del buf
149 150
150 151
151 152 isrev = re.compile(b"^[0-9a-f]{40}$")
152 153
153 154
154 155 @command(
155 156 b"fastexport",
156 157 [
157 158 (b"r", b"rev", [], _(b"revisions to export"), _(b"REV")),
158 159 (b"i", b"import-marks", b"", _(b"old marks file to read"), _(b"FILE")),
159 160 (b"e", b"export-marks", b"", _(b"new marks file to write"), _(b"FILE")),
160 161 (
161 162 b"A",
162 163 b"authormap",
163 164 b"",
164 165 _(b"remap usernames using this file"),
165 166 _(b"FILE"),
166 167 ),
167 168 ],
168 169 _(b"[OPTION]... [REV]..."),
169 170 helpcategory=command.CATEGORY_IMPORT_EXPORT,
170 171 )
171 172 def fastexport(ui, repo, *revs, **opts):
172 173 """export repository as git fast-import stream
173 174
174 175 This command lets you dump a repository as a human-readable text stream.
175 176 It can be piped into corresponding import routines like "git fast-import".
176 177 Incremental dumps can be created by using marks files.
177 178 """
178 179 opts = pycompat.byteskwargs(opts)
179 180
180 181 revs += tuple(opts.get(b"rev", []))
181 182 if not revs:
182 183 revs = scmutil.revrange(repo, [b":"])
183 184 else:
184 185 revs = scmutil.revrange(repo, revs)
185 186 if not revs:
186 187 raise error.Abort(_(b"no revisions matched"))
187 188 authorfile = opts.get(b"authormap")
188 189 if authorfile:
189 190 authormap = convcmd.readauthormap(ui, authorfile)
190 191 else:
191 192 authormap = {}
192 193
193 194 import_marks = opts.get(b"import_marks")
194 195 marks = {}
195 196 if import_marks:
196 197 with open(import_marks, "rb") as import_marks_file:
197 198 for line in import_marks_file:
198 199 line = line.strip()
199 200 if not isrev.match(line) or line in marks:
200 201 raise error.Abort(_(b"Corrupted marks file"))
201 202 marks[line] = len(marks) + 1
202 203
203 204 revs.sort()
204 205 with ui.makeprogress(
205 206 _(b"exporting"), unit=_(b"revisions"), total=len(revs)
206 207 ) as progress:
207 208 for rev in revs:
208 209 export_commit(ui, repo, rev, marks, authormap)
209 210 progress.increment()
210 211
211 212 export_marks = opts.get(b"export_marks")
212 213 if export_marks:
213 214 with open(export_marks, "wb") as export_marks_file:
214 215 output_marks = [None] * len(marks)
215 216 for k, v in marks.items():
216 217 output_marks[v - 1] = k
217 218 for k in output_marks:
218 219 export_marks_file.write(k + b"\n")
@@ -1,855 +1,865 b''
1 1 $ cat >> $HGRCPATH << EOF
2 2 > [extensions]
3 3 > fastexport=
4 4 > EOF
5 5
6 6 $ hg init
7 7
8 8 $ hg debugbuilddag -mon '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
9 9
10 10 $ hg up -r 10
11 11 13 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 12 $ hg rm nf10
13 13 $ hg commit -u debugbuilddag --date 'Thu Jan 01 00:00:12 1970 +0000' -m r12
14 14 created new head
15 15 $ hg up -r 11
16 16 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 17 $ hg merge -r 12
18 18 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
19 19 (branch merge, don't forget to commit)
20 20 $ hg commit -m debugbuilddag --date 'Thu Jan 01 00:00:13 1970 +0000'
21 21
22 22 $ hg log -G
23 23 @ changeset: 13:e5c379648af4
24 24 |\ branch: both
25 25 | | tag: tip
26 26 | | parent: 11:2cbd52c10e88
27 27 | | parent: 12:4f31c9604af6
28 28 | | user: test
29 29 | | date: Thu Jan 01 00:00:13 1970 +0000
30 30 | | summary: debugbuilddag
31 31 | |
32 32 | o changeset: 12:4f31c9604af6
33 33 | | branch: both
34 34 | | parent: 10:9220596cb068
35 35 | | user: debugbuilddag
36 36 | | date: Thu Jan 01 00:00:12 1970 +0000
37 37 | | summary: r12
38 38 | |
39 39 o | changeset: 11:2cbd52c10e88
40 40 |/ branch: both
41 41 | tag: tmaintip
42 42 | user: debugbuilddag
43 43 | date: Thu Jan 01 00:00:11 1970 +0000
44 44 | summary: r11
45 45 |
46 46 o changeset: 10:9220596cb068
47 47 | branch: both
48 48 | user: debugbuilddag
49 49 | date: Thu Jan 01 00:00:10 1970 +0000
50 50 | summary: r10
51 51 |
52 52 o changeset: 9:0767d147d86e
53 53 |\ branch: both
54 54 | | parent: 8:0d0219415f18
55 55 | | parent: 4:e8bc3a6ab9ae
56 56 | | user: debugbuilddag
57 57 | | date: Thu Jan 01 00:00:09 1970 +0000
58 58 | | summary: r9
59 59 | |
60 60 | o changeset: 8:0d0219415f18
61 61 | | branch: name2
62 62 | | tag: thead2
63 63 | | user: debugbuilddag
64 64 | | date: Thu Jan 01 00:00:08 1970 +0000
65 65 | | summary: r8
66 66 | |
67 67 | o changeset: 7:82c6c8b3ac68
68 68 | | branch: name2
69 69 | | user: debugbuilddag
70 70 | | date: Thu Jan 01 00:00:07 1970 +0000
71 71 | | summary: r7
72 72 | |
73 73 | o changeset: 6:94093a13175f
74 74 | | branch: name2
75 75 | | user: debugbuilddag
76 76 | | date: Thu Jan 01 00:00:06 1970 +0000
77 77 | | summary: r6
78 78 | |
79 79 | o changeset: 5:4baee2f72e9e
80 80 | | branch: name2
81 81 | | parent: 1:bf4022f1addd
82 82 | | user: debugbuilddag
83 83 | | date: Thu Jan 01 00:00:05 1970 +0000
84 84 | | summary: r5
85 85 | |
86 86 o | changeset: 4:e8bc3a6ab9ae
87 87 | | branch: name1
88 88 | | tag: thead1
89 89 | | user: debugbuilddag
90 90 | | date: Thu Jan 01 00:00:04 1970 +0000
91 91 | | summary: r4
92 92 | |
93 93 o | changeset: 3:46148e496a8a
94 94 | | branch: name1
95 95 | | user: debugbuilddag
96 96 | | date: Thu Jan 01 00:00:03 1970 +0000
97 97 | | summary: r3
98 98 | |
99 99 o | changeset: 2:29863c4219cd
100 100 |/ branch: name1
101 101 | user: debugbuilddag
102 102 | date: Thu Jan 01 00:00:02 1970 +0000
103 103 | summary: r2
104 104 |
105 105 o changeset: 1:bf4022f1addd
106 106 | tag: tbase
107 107 | user: debugbuilddag
108 108 | date: Thu Jan 01 00:00:01 1970 +0000
109 109 | summary: r1
110 110 |
111 111 o changeset: 0:ae6ae30a671b
112 112 user: debugbuilddag
113 113 date: Thu Jan 01 00:00:00 1970 +0000
114 114 summary: r0
115 115
116 116
117 117 $ hg fastexport --export-marks fastexport.marks
118 118 blob
119 119 mark :1
120 120 data 65
121 121 0 r0
122 122 1
123 123 2
124 124 3
125 125 4
126 126 5
127 127 6
128 128 7
129 129 8
130 130 9
131 131 10
132 132 11
133 133 12
134 134 13
135 135 14
136 136 15
137 137 16
138 138 17
139 139 18
140 140 19
141 141 20
142 142 21
143 143 22
144 144 23
145 145
146 146 blob
147 147 mark :2
148 148 data 3
149 149 r0
150 150
151 151 commit refs/heads/default
152 152 mark :3
153 153 committer "debugbuilddag" <debugbuilddag> 0 -0000
154 154 data 2
155 155 r0
156 156 M 644 :1 mf
157 157 M 644 :2 nf0
158 158 M 644 :2 of
159 159
160 160 blob
161 161 mark :4
162 162 data 68
163 163 0 r0
164 164 1
165 165 2 r1
166 166 3
167 167 4
168 168 5
169 169 6
170 170 7
171 171 8
172 172 9
173 173 10
174 174 11
175 175 12
176 176 13
177 177 14
178 178 15
179 179 16
180 180 17
181 181 18
182 182 19
183 183 20
184 184 21
185 185 22
186 186 23
187 187
188 188 blob
189 189 mark :5
190 190 data 3
191 191 r1
192 192
193 193 blob
194 194 mark :6
195 195 data 3
196 196 r1
197 197
198 198 commit refs/heads/default
199 199 mark :7
200 200 committer "debugbuilddag" <debugbuilddag> 1 -0000
201 201 data 2
202 202 r1
203 203 from :3
204 204 M 644 :4 mf
205 205 M 644 :5 nf1
206 206 M 644 :6 of
207 207
208 208 blob
209 209 mark :8
210 210 data 71
211 211 0 r0
212 212 1
213 213 2 r1
214 214 3
215 215 4 r2
216 216 5
217 217 6
218 218 7
219 219 8
220 220 9
221 221 10
222 222 11
223 223 12
224 224 13
225 225 14
226 226 15
227 227 16
228 228 17
229 229 18
230 230 19
231 231 20
232 232 21
233 233 22
234 234 23
235 235
236 236 blob
237 237 mark :9
238 238 data 3
239 239 r2
240 240
241 241 blob
242 242 mark :10
243 243 data 3
244 244 r2
245 245
246 246 commit refs/heads/name1
247 247 mark :11
248 248 committer "debugbuilddag" <debugbuilddag> 2 -0000
249 249 data 2
250 250 r2
251 251 from :7
252 252 M 644 :8 mf
253 253 M 644 :9 nf2
254 254 M 644 :10 of
255 255
256 256 blob
257 257 mark :12
258 258 data 74
259 259 0 r0
260 260 1
261 261 2 r1
262 262 3
263 263 4 r2
264 264 5
265 265 6 r3
266 266 7
267 267 8
268 268 9
269 269 10
270 270 11
271 271 12
272 272 13
273 273 14
274 274 15
275 275 16
276 276 17
277 277 18
278 278 19
279 279 20
280 280 21
281 281 22
282 282 23
283 283
284 284 blob
285 285 mark :13
286 286 data 3
287 287 r3
288 288
289 289 blob
290 290 mark :14
291 291 data 3
292 292 r3
293 293
294 294 commit refs/heads/name1
295 295 mark :15
296 296 committer "debugbuilddag" <debugbuilddag> 3 -0000
297 297 data 2
298 298 r3
299 299 from :11
300 300 M 644 :12 mf
301 301 M 644 :13 nf3
302 302 M 644 :14 of
303 303
304 304 blob
305 305 mark :16
306 306 data 77
307 307 0 r0
308 308 1
309 309 2 r1
310 310 3
311 311 4 r2
312 312 5
313 313 6 r3
314 314 7
315 315 8 r4
316 316 9
317 317 10
318 318 11
319 319 12
320 320 13
321 321 14
322 322 15
323 323 16
324 324 17
325 325 18
326 326 19
327 327 20
328 328 21
329 329 22
330 330 23
331 331
332 332 blob
333 333 mark :17
334 334 data 3
335 335 r4
336 336
337 337 blob
338 338 mark :18
339 339 data 3
340 340 r4
341 341
342 342 commit refs/heads/name1
343 343 mark :19
344 344 committer "debugbuilddag" <debugbuilddag> 4 -0000
345 345 data 2
346 346 r4
347 347 from :15
348 348 M 644 :16 mf
349 349 M 644 :17 nf4
350 350 M 644 :18 of
351 351
352 352 blob
353 353 mark :20
354 354 data 71
355 355 0 r0
356 356 1
357 357 2 r1
358 358 3
359 359 4
360 360 5
361 361 6
362 362 7
363 363 8
364 364 9
365 365 10 r5
366 366 11
367 367 12
368 368 13
369 369 14
370 370 15
371 371 16
372 372 17
373 373 18
374 374 19
375 375 20
376 376 21
377 377 22
378 378 23
379 379
380 380 blob
381 381 mark :21
382 382 data 3
383 383 r5
384 384
385 385 blob
386 386 mark :22
387 387 data 3
388 388 r5
389 389
390 390 commit refs/heads/name2
391 391 mark :23
392 392 committer "debugbuilddag" <debugbuilddag> 5 -0000
393 393 data 2
394 394 r5
395 395 from :7
396 396 M 644 :20 mf
397 397 M 644 :21 nf5
398 398 M 644 :22 of
399 399
400 400 blob
401 401 mark :24
402 402 data 74
403 403 0 r0
404 404 1
405 405 2 r1
406 406 3
407 407 4
408 408 5
409 409 6
410 410 7
411 411 8
412 412 9
413 413 10 r5
414 414 11
415 415 12 r6
416 416 13
417 417 14
418 418 15
419 419 16
420 420 17
421 421 18
422 422 19
423 423 20
424 424 21
425 425 22
426 426 23
427 427
428 428 blob
429 429 mark :25
430 430 data 3
431 431 r6
432 432
433 433 blob
434 434 mark :26
435 435 data 3
436 436 r6
437 437
438 438 commit refs/heads/name2
439 439 mark :27
440 440 committer "debugbuilddag" <debugbuilddag> 6 -0000
441 441 data 2
442 442 r6
443 443 from :23
444 444 M 644 :24 mf
445 445 M 644 :25 nf6
446 446 M 644 :26 of
447 447
448 448 blob
449 449 mark :28
450 450 data 77
451 451 0 r0
452 452 1
453 453 2 r1
454 454 3
455 455 4
456 456 5
457 457 6
458 458 7
459 459 8
460 460 9
461 461 10 r5
462 462 11
463 463 12 r6
464 464 13
465 465 14 r7
466 466 15
467 467 16
468 468 17
469 469 18
470 470 19
471 471 20
472 472 21
473 473 22
474 474 23
475 475
476 476 blob
477 477 mark :29
478 478 data 3
479 479 r7
480 480
481 481 blob
482 482 mark :30
483 483 data 3
484 484 r7
485 485
486 486 commit refs/heads/name2
487 487 mark :31
488 488 committer "debugbuilddag" <debugbuilddag> 7 -0000
489 489 data 2
490 490 r7
491 491 from :27
492 492 M 644 :28 mf
493 493 M 644 :29 nf7
494 494 M 644 :30 of
495 495
496 496 blob
497 497 mark :32
498 498 data 80
499 499 0 r0
500 500 1
501 501 2 r1
502 502 3
503 503 4
504 504 5
505 505 6
506 506 7
507 507 8
508 508 9
509 509 10 r5
510 510 11
511 511 12 r6
512 512 13
513 513 14 r7
514 514 15
515 515 16 r8
516 516 17
517 517 18
518 518 19
519 519 20
520 520 21
521 521 22
522 522 23
523 523
524 524 blob
525 525 mark :33
526 526 data 3
527 527 r8
528 528
529 529 blob
530 530 mark :34
531 531 data 3
532 532 r8
533 533
534 534 commit refs/heads/name2
535 535 mark :35
536 536 committer "debugbuilddag" <debugbuilddag> 8 -0000
537 537 data 2
538 538 r8
539 539 from :31
540 540 M 644 :32 mf
541 541 M 644 :33 nf8
542 542 M 644 :34 of
543 543
544 544 blob
545 545 mark :36
546 546 data 92
547 547 0 r0
548 548 1
549 549 2 r1
550 550 3
551 551 4 r2
552 552 5
553 553 6 r3
554 554 7
555 555 8 r4
556 556 9
557 557 10 r5
558 558 11
559 559 12 r6
560 560 13
561 561 14 r7
562 562 15
563 563 16 r8
564 564 17
565 565 18 r9
566 566 19
567 567 20
568 568 21
569 569 22
570 570 23
571 571
572 572 blob
573 573 mark :37
574 574 data 3
575 575 r9
576 576
577 577 blob
578 578 mark :38
579 579 data 3
580 580 r9
581 581
582 582 commit refs/heads/both
583 583 mark :39
584 584 committer "debugbuilddag" <debugbuilddag> 9 -0000
585 585 data 2
586 586 r9
587 587 from :35
588 588 merge :19
589 589 M 644 :36 mf
590 590 M 644 :9 nf2
591 591 M 644 :13 nf3
592 592 M 644 :17 nf4
593 593 M 644 :37 nf9
594 594 M 644 :38 of
595 595
596 596 blob
597 597 mark :40
598 598 data 96
599 599 0 r0
600 600 1
601 601 2 r1
602 602 3
603 603 4 r2
604 604 5
605 605 6 r3
606 606 7
607 607 8 r4
608 608 9
609 609 10 r5
610 610 11
611 611 12 r6
612 612 13
613 613 14 r7
614 614 15
615 615 16 r8
616 616 17
617 617 18 r9
618 618 19
619 619 20 r10
620 620 21
621 621 22
622 622 23
623 623
624 624 blob
625 625 mark :41
626 626 data 4
627 627 r10
628 628
629 629 blob
630 630 mark :42
631 631 data 4
632 632 r10
633 633
634 634 commit refs/heads/both
635 635 mark :43
636 636 committer "debugbuilddag" <debugbuilddag> 10 -0000
637 637 data 3
638 638 r10
639 639 from :39
640 640 M 644 :40 mf
641 641 M 644 :41 nf10
642 642 M 644 :42 of
643 643
644 644 blob
645 645 mark :44
646 646 data 100
647 647 0 r0
648 648 1
649 649 2 r1
650 650 3
651 651 4 r2
652 652 5
653 653 6 r3
654 654 7
655 655 8 r4
656 656 9
657 657 10 r5
658 658 11
659 659 12 r6
660 660 13
661 661 14 r7
662 662 15
663 663 16 r8
664 664 17
665 665 18 r9
666 666 19
667 667 20 r10
668 668 21
669 669 22 r11
670 670 23
671 671
672 672 blob
673 673 mark :45
674 674 data 4
675 675 r11
676 676
677 677 blob
678 678 mark :46
679 679 data 4
680 680 r11
681 681
682 682 commit refs/heads/both
683 683 mark :47
684 684 committer "debugbuilddag" <debugbuilddag> 11 -0000
685 685 data 3
686 686 r11
687 687 from :43
688 688 M 644 :44 mf
689 689 M 644 :45 nf11
690 690 M 644 :46 of
691 691
692 692 commit refs/heads/both
693 693 mark :48
694 694 committer "debugbuilddag" <debugbuilddag> 12 -0000
695 695 data 3
696 696 r12
697 697 from :43
698 698 D nf10
699 699
700 700 commit refs/heads/both
701 701 mark :49
702 702 committer "test" <test> 13 -0000
703 703 data 13
704 704 debugbuilddag
705 705 from :47
706 706 merge :48
707 707 D nf10
708 708
709 709 $ cat fastexport.marks
710 710 e1767c7564f83127d75331428473dd0512b36cc6
711 711 2c436e3f677d989438ddd9a7e5e4d56e016dfd35
712 712 ae6ae30a671be09096aaaf51217b3691eec0eee0
713 713 016f8fd6128ac4bd19ec5a6ae128dadc3873b13f
714 714 a0e6fc91007068df3bc60f46ce0a893a73189b54
715 715 1a085e1daf625e186ee0064c64ff41731a901f24
716 716 bf4022f1addd28523fb1122ac6166a29da58d34c
717 717 2c45ad1c720111830380baa89a6a16cae1bef688
718 718 180506669a19f4b8317009fc6fa0043966d1ffb4
719 719 1ebc486e6a5c2c8ca7e531cf0b63dfcc071ec324
720 720 29863c4219cd68e0f57aecd5ffc12ba83313f26b
721 721 d20e5eeac6991189eefad45cd8ea0f6a32ce8122
722 722 710c4580a600b8aadc63fa3d7bb0fab71b127c04
723 723 fa27314b56d7b6f90c1caeebb2a74730b3747574
724 724 46148e496a8a75fde9e203b1ded69ec99289af27
725 725 e5548c667d7eeb6c326e723c579888341329c9fe
726 726 3c1407305701051cbed9f9cb9a68bdfb5997c235
727 727 e2ed51893b0a54bd7fef5a406a0c489d668f19c3
728 728 e8bc3a6ab9aef589f5db504f401953449a3c3a10
729 729 558f3a23efc0a1a972e14d5314a65918791b77be
730 730 0dbd89c185f53a1727c54cd1ce256482fa23968e
731 731 f84faeb138605b36d74324c6d0ea76a9099c3567
732 732 4baee2f72e9eeae2aef5b9e1ec416020090672ef
733 733 412c5793886eaaabb31debd36695f6215a719865
734 734 a0eafc60760d32b690564b8588ba042cc63e0c74
735 735 a53842517de32d2f926c38a170c29dc90ae3348a
736 736 94093a13175f1cfcbbfddaa0ceafbd3a89784b91
737 737 d2f0d76af0be0da17ec88190215eadb8706689ab
738 738 639939af794373d6c2ab12c2ef637cd220174389
739 739 cc8921e2b19a88147643ea825459ffa140e3d704
740 740 82c6c8b3ac6873fadd9083323b02cc6a53659130
741 741 c6cc0b14a3e6e61906242d6fce28b9510c9f9208
742 742 093593169cb4716f94e52ed7561bb84b36b7eb9d
743 743 034df75dc138e7507e061d26170b4c44321a5d92
744 744 0d0219415f18c43636163fff4160f41600951a25
745 745 f13693f6e6052eeb189521945fef56892e812fdb
746 746 1239c633b8a7a7283825dba9171bf285e5790852
747 747 34b655bd51e8573b8e85c1c1476a94d8573babef
748 748 0767d147d86e1546593bda50f1e11276c0ac8f1a
749 749 284ca43bbbe82e89c0f1d977e8ac6cfb969c05ec
750 750 15315ab9e272ec81ae8d847996e5bdecd5635b0b
751 751 78c10aaf21f49d518c7ccb8318c29abb5d4e5db7
752 752 9220596cb068dfc73e2f7e695dc8ad0858a936db
753 753 32abd0da49b7c7ee756298fc46a15584d6aedc99
754 754 33fbc651630ffa7ccbebfe4eb91320a873e7291c
755 755 868d828870663d075cdcff502d26cf8445ce068e
756 756 2cbd52c10e88ce604402dc83a869ec4f07765b3d
757 757 4f31c9604af676986343d775b05695f535e8db5e
758 758 e5c379648af4c9fa3b5546ab7ee6e61a36082830
759 759
760 760 $ hg fastexport --export-marks fastexport.marks2 -r 0
761 761 blob
762 762 mark :1
763 763 data 65
764 764 0 r0
765 765 1
766 766 2
767 767 3
768 768 4
769 769 5
770 770 6
771 771 7
772 772 8
773 773 9
774 774 10
775 775 11
776 776 12
777 777 13
778 778 14
779 779 15
780 780 16
781 781 17
782 782 18
783 783 19
784 784 20
785 785 21
786 786 22
787 787 23
788 788
789 789 blob
790 790 mark :2
791 791 data 3
792 792 r0
793 793
794 794 commit refs/heads/default
795 795 mark :3
796 796 committer "debugbuilddag" <debugbuilddag> 0 -0000
797 797 data 2
798 798 r0
799 799 M 644 :1 mf
800 800 M 644 :2 nf0
801 801 M 644 :2 of
802 802
803 803 $ cat fastexport.marks2
804 804 e1767c7564f83127d75331428473dd0512b36cc6
805 805 2c436e3f677d989438ddd9a7e5e4d56e016dfd35
806 806 ae6ae30a671be09096aaaf51217b3691eec0eee0
807 807 $ hg fastexport --import-marks fastexport.marks2 -r 1
808 808 blob
809 809 mark :4
810 810 data 68
811 811 0 r0
812 812 1
813 813 2 r1
814 814 3
815 815 4
816 816 5
817 817 6
818 818 7
819 819 8
820 820 9
821 821 10
822 822 11
823 823 12
824 824 13
825 825 14
826 826 15
827 827 16
828 828 17
829 829 18
830 830 19
831 831 20
832 832 21
833 833 22
834 834 23
835 835
836 836 blob
837 837 mark :5
838 838 data 3
839 839 r1
840 840
841 841 blob
842 842 mark :6
843 843 data 3
844 844 r1
845 845
846 846 commit refs/heads/default
847 847 mark :7
848 848 committer "debugbuilddag" <debugbuilddag> 1 -0000
849 849 data 2
850 850 r1
851 851 from :3
852 852 M 644 :4 mf
853 853 M 644 :5 nf1
854 854 M 644 :6 of
855 855
856 $ echo foo > of
857 $ hg commit --user '<badname> <bad email>' --date 'Fri Jan 02 00:00:00 1970 +0000' -m 'Testcommit'
858 $ hg fastexport --import-marks fastexport.marks -r tip
859 blob
860 mark :50
861 data 4
862 foo
863
864 abort: Unable to parse user into person and email for revision 4f71ca786403919cd16669d94ff7cd1c09437a44
865 [255]
General Comments 0
You need to be logged in to leave comments. Login now