##// END OF EJS Templates
merge: with stable
Augie Fackler -
r48843:f82c4e8a merge default
parent child Browse files
Show More
@@ -1,1004 +1,1004 b''
1 1 # patchbomb.py - sending Mercurial changesets as patch emails
2 2 #
3 3 # Copyright 2005-2009 Olivia Mackall <olivia@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
8 8 '''command to send changesets as (a series of) patch emails
9 9
10 10 The series is started off with a "[PATCH 0 of N]" introduction, which
11 11 describes the series as a whole.
12 12
13 13 Each patch email has a Subject line of "[PATCH M of N] ...", using the
14 14 first line of the changeset description as the subject text. The
15 15 message contains two or three body parts:
16 16
17 17 - The changeset description.
18 18 - [Optional] The result of running diffstat on the patch.
19 19 - The patch itself, as generated by :hg:`export`.
20 20
21 21 Each message refers to the first in the series using the In-Reply-To
22 22 and References headers, so they will show up as a sequence in threaded
23 23 mail and news readers, and in mail archives.
24 24
25 25 To configure other defaults, add a section like this to your
26 26 configuration file::
27 27
28 28 [email]
29 29 from = My Name <my@email>
30 30 to = recipient1, recipient2, ...
31 31 cc = cc1, cc2, ...
32 32 bcc = bcc1, bcc2, ...
33 33 reply-to = address1, address2, ...
34 34
35 35 Use ``[patchbomb]`` as configuration section name if you need to
36 36 override global ``[email]`` address settings.
37 37
38 38 Then you can use the :hg:`email` command to mail a series of
39 39 changesets as a patchbomb.
40 40
41 41 You can also either configure the method option in the email section
42 42 to be a sendmail compatible mailer or fill out the [smtp] section so
43 43 that the patchbomb extension can automatically send patchbombs
44 44 directly from the commandline. See the [email] and [smtp] sections in
45 45 hgrc(5) for details.
46 46
47 47 By default, :hg:`email` will prompt for a ``To`` or ``CC`` header if
48 48 you do not supply one via configuration or the command line. You can
49 49 override this to never prompt by configuring an empty value::
50 50
51 51 [email]
52 52 cc =
53 53
54 54 You can control the default inclusion of an introduction message with the
55 55 ``patchbomb.intro`` configuration option. The configuration is always
56 56 overwritten by command line flags like --intro and --desc::
57 57
58 58 [patchbomb]
59 59 intro=auto # include introduction message if more than 1 patch (default)
60 60 intro=never # never include an introduction message
61 61 intro=always # always include an introduction message
62 62
63 63 You can specify a template for flags to be added in subject prefixes. Flags
64 64 specified by --flag option are exported as ``{flags}`` keyword::
65 65
66 66 [patchbomb]
67 67 flagtemplate = "{separate(' ',
68 68 ifeq(branch, 'default', '', branch|upper),
69 69 flags)}"
70 70
71 71 You can set patchbomb to always ask for confirmation by setting
72 72 ``patchbomb.confirm`` to true.
73 73 '''
74 74 from __future__ import absolute_import
75 75
76 76 import email.encoders as emailencoders
77 77 import email.mime.base as emimebase
78 78 import email.mime.multipart as emimemultipart
79 79 import email.utils as eutil
80 80 import errno
81 81 import os
82 82 import socket
83 83
84 84 from mercurial.i18n import _
85 85 from mercurial.pycompat import open
86 86 from mercurial.node import bin
87 87 from mercurial import (
88 88 cmdutil,
89 89 commands,
90 90 encoding,
91 91 error,
92 92 formatter,
93 93 hg,
94 94 mail,
95 95 patch,
96 96 pycompat,
97 97 registrar,
98 98 scmutil,
99 99 templater,
100 100 util,
101 101 )
102 102 from mercurial.utils import (
103 103 dateutil,
104 104 urlutil,
105 105 )
106 106
107 107 stringio = util.stringio
108 108
109 109 cmdtable = {}
110 110 command = registrar.command(cmdtable)
111 111
112 112 configtable = {}
113 113 configitem = registrar.configitem(configtable)
114 114
115 115 configitem(
116 116 b'patchbomb',
117 117 b'bundletype',
118 118 default=None,
119 119 )
120 120 configitem(
121 121 b'patchbomb',
122 122 b'bcc',
123 123 default=None,
124 124 )
125 125 configitem(
126 126 b'patchbomb',
127 127 b'cc',
128 128 default=None,
129 129 )
130 130 configitem(
131 131 b'patchbomb',
132 132 b'confirm',
133 133 default=False,
134 134 )
135 135 configitem(
136 136 b'patchbomb',
137 137 b'flagtemplate',
138 138 default=None,
139 139 )
140 140 configitem(
141 141 b'patchbomb',
142 142 b'from',
143 143 default=None,
144 144 )
145 145 configitem(
146 146 b'patchbomb',
147 147 b'intro',
148 148 default=b'auto',
149 149 )
150 150 configitem(
151 151 b'patchbomb',
152 152 b'publicurl',
153 153 default=None,
154 154 )
155 155 configitem(
156 156 b'patchbomb',
157 157 b'reply-to',
158 158 default=None,
159 159 )
160 160 configitem(
161 161 b'patchbomb',
162 162 b'to',
163 163 default=None,
164 164 )
165 165
166 166 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
167 167 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
168 168 # be specifying the version(s) of Mercurial they are tested with, or
169 169 # leave the attribute unspecified.
170 170 testedwith = b'ships-with-hg-core'
171 171
172 172
173 173 def _addpullheader(seq, ctx):
174 174 """Add a header pointing to a public URL where the changeset is available"""
175 175 repo = ctx.repo()
176 176 # experimental config: patchbomb.publicurl
177 177 # waiting for some logic that check that the changeset are available on the
178 178 # destination before patchbombing anything.
179 179 publicurl = repo.ui.config(b'patchbomb', b'publicurl')
180 180 if publicurl:
181 181 return b'Available At %s\n# hg pull %s -r %s' % (
182 182 publicurl,
183 183 publicurl,
184 184 ctx,
185 185 )
186 186 return None
187 187
188 188
189 189 def uisetup(ui):
190 190 cmdutil.extraexport.append(b'pullurl')
191 191 cmdutil.extraexportmap[b'pullurl'] = _addpullheader
192 192
193 193
194 194 def reposetup(ui, repo):
195 195 if not repo.local():
196 196 return
197 197 repo._wlockfreeprefix.add(b'last-email.txt')
198 198
199 199
200 200 def prompt(ui, prompt, default=None, rest=b':'):
201 201 if default:
202 202 prompt += b' [%s]' % default
203 203 return ui.prompt(prompt + rest, default)
204 204
205 205
206 206 def introwanted(ui, opts, number):
207 207 '''is an introductory message apparently wanted?'''
208 208 introconfig = ui.config(b'patchbomb', b'intro')
209 209 if opts.get(b'intro') or opts.get(b'desc'):
210 210 intro = True
211 211 elif introconfig == b'always':
212 212 intro = True
213 213 elif introconfig == b'never':
214 214 intro = False
215 215 elif introconfig == b'auto':
216 216 intro = number > 1
217 217 else:
218 218 ui.write_err(
219 219 _(b'warning: invalid patchbomb.intro value "%s"\n') % introconfig
220 220 )
221 221 ui.write_err(_(b'(should be one of always, never, auto)\n'))
222 222 intro = number > 1
223 223 return intro
224 224
225 225
226 226 def _formatflags(ui, repo, rev, flags):
227 227 """build flag string optionally by template"""
228 228 tmpl = ui.config(b'patchbomb', b'flagtemplate')
229 229 if not tmpl:
230 230 return b' '.join(flags)
231 231 out = util.stringio()
232 232 spec = formatter.literal_templatespec(templater.unquotestring(tmpl))
233 233 with formatter.templateformatter(ui, out, b'patchbombflag', {}, spec) as fm:
234 234 fm.startitem()
235 235 fm.context(ctx=repo[rev])
236 236 fm.write(b'flags', b'%s', fm.formatlist(flags, name=b'flag'))
237 237 return out.getvalue()
238 238
239 239
240 240 def _formatprefix(ui, repo, rev, flags, idx, total, numbered):
241 241 """build prefix to patch subject"""
242 242 flag = _formatflags(ui, repo, rev, flags)
243 243 if flag:
244 244 flag = b' ' + flag
245 245
246 246 if not numbered:
247 247 return b'[PATCH%s]' % flag
248 248 else:
249 249 tlen = len(b"%d" % total)
250 250 return b'[PATCH %0*d of %d%s]' % (tlen, idx, total, flag)
251 251
252 252
253 253 def makepatch(
254 254 ui,
255 255 repo,
256 256 rev,
257 257 patchlines,
258 258 opts,
259 259 _charsets,
260 260 idx,
261 261 total,
262 262 numbered,
263 263 patchname=None,
264 264 ):
265 265
266 266 desc = []
267 267 node = None
268 268 body = b''
269 269
270 270 for line in patchlines:
271 271 if line.startswith(b'#'):
272 272 if line.startswith(b'# Node ID'):
273 273 node = line.split()[-1]
274 274 continue
275 275 if line.startswith(b'diff -r') or line.startswith(b'diff --git'):
276 276 break
277 277 desc.append(line)
278 278
279 279 if not patchname and not node:
280 280 raise ValueError
281 281
282 282 if opts.get(b'attach') and not opts.get(b'body'):
283 283 body = (
284 284 b'\n'.join(desc[1:]).strip()
285 285 or b'Patch subject is complete summary.'
286 286 )
287 287 body += b'\n\n\n'
288 288
289 289 if opts.get(b'plain'):
290 290 while patchlines and patchlines[0].startswith(b'# '):
291 291 patchlines.pop(0)
292 292 if patchlines:
293 293 patchlines.pop(0)
294 294 while patchlines and not patchlines[0].strip():
295 295 patchlines.pop(0)
296 296
297 297 ds = patch.diffstat(patchlines)
298 298 if opts.get(b'diffstat'):
299 299 body += ds + b'\n\n'
300 300
301 301 addattachment = opts.get(b'attach') or opts.get(b'inline')
302 302 if not addattachment or opts.get(b'body'):
303 303 body += b'\n'.join(patchlines)
304 304
305 305 if addattachment:
306 306 msg = emimemultipart.MIMEMultipart()
307 307 if body:
308 308 msg.attach(mail.mimeencode(ui, body, _charsets, opts.get(b'test')))
309 309 p = mail.mimetextpatch(
310 310 b'\n'.join(patchlines), 'x-patch', opts.get(b'test')
311 311 )
312 312 binnode = bin(node)
313 313 # if node is mq patch, it will have the patch file's name as a tag
314 314 if not patchname:
315 315 patchtags = [
316 316 t
317 317 for t in repo.nodetags(binnode)
318 318 if t.endswith(b'.patch') or t.endswith(b'.diff')
319 319 ]
320 320 if patchtags:
321 321 patchname = patchtags[0]
322 322 elif total > 1:
323 323 patchname = cmdutil.makefilename(
324 324 repo[node], b'%b-%n.patch', seqno=idx, total=total
325 325 )
326 326 else:
327 327 patchname = cmdutil.makefilename(repo[node], b'%b.patch')
328 328 disposition = r'inline'
329 329 if opts.get(b'attach'):
330 330 disposition = r'attachment'
331 331 p['Content-Disposition'] = (
332 332 disposition + '; filename=' + encoding.strfromlocal(patchname)
333 333 )
334 334 msg.attach(p)
335 335 else:
336 336 msg = mail.mimetextpatch(body, display=opts.get(b'test'))
337 337
338 338 prefix = _formatprefix(
339 339 ui, repo, rev, opts.get(b'flag'), idx, total, numbered
340 340 )
341 341 subj = desc[0].strip().rstrip(b'. ')
342 342 if not numbered:
343 343 subj = b' '.join([prefix, opts.get(b'subject') or subj])
344 344 else:
345 345 subj = b' '.join([prefix, subj])
346 346 msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get(b'test'))
347 347 msg['X-Mercurial-Node'] = pycompat.sysstr(node)
348 348 msg['X-Mercurial-Series-Index'] = '%i' % idx
349 349 msg['X-Mercurial-Series-Total'] = '%i' % total
350 350 return msg, subj, ds
351 351
352 352
353 353 def _getpatches(repo, revs, **opts):
354 354 """return a list of patches for a list of revisions
355 355
356 356 Each patch in the list is itself a list of lines.
357 357 """
358 358 ui = repo.ui
359 359 prev = repo[b'.'].rev()
360 360 for r in revs:
361 361 if r == prev and (repo[None].files() or repo[None].deleted()):
362 362 ui.warn(_(b'warning: working directory has uncommitted changes\n'))
363 363 output = stringio()
364 364 cmdutil.exportfile(
365 365 repo, [r], output, opts=patch.difffeatureopts(ui, opts, git=True)
366 366 )
367 367 yield output.getvalue().split(b'\n')
368 368
369 369
370 370 def _getbundle(repo, dest, **opts):
371 371 """return a bundle containing changesets missing in "dest"
372 372
373 373 The `opts` keyword-arguments are the same as the one accepted by the
374 374 `bundle` command.
375 375
376 376 The bundle is a returned as a single in-memory binary blob.
377 377 """
378 378 ui = repo.ui
379 379 tmpdir = pycompat.mkdtemp(prefix=b'hg-email-bundle-')
380 380 tmpfn = os.path.join(tmpdir, b'bundle')
381 381 btype = ui.config(b'patchbomb', b'bundletype')
382 382 if btype:
383 383 opts['type'] = btype
384 384 try:
385 385 dests = []
386 386 if dest:
387 387 dests = [dest]
388 388 commands.bundle(ui, repo, tmpfn, *dests, **opts)
389 389 return util.readfile(tmpfn)
390 390 finally:
391 391 try:
392 392 os.unlink(tmpfn)
393 393 except OSError:
394 394 pass
395 395 os.rmdir(tmpdir)
396 396
397 397
398 398 def _getdescription(repo, defaultbody, sender, **opts):
399 399 """obtain the body of the introduction message and return it
400 400
401 401 This is also used for the body of email with an attached bundle.
402 402
403 403 The body can be obtained either from the command line option or entered by
404 404 the user through the editor.
405 405 """
406 406 ui = repo.ui
407 407 if opts.get('desc'):
408 408 body = open(opts.get('desc')).read()
409 409 else:
410 410 ui.write(
411 411 _(b'\nWrite the introductory message for the patch series.\n\n')
412 412 )
413 413 body = ui.edit(
414 414 defaultbody, sender, repopath=repo.path, action=b'patchbombbody'
415 415 )
416 416 # Save series description in case sendmail fails
417 417 msgfile = repo.vfs(b'last-email.txt', b'wb')
418 418 msgfile.write(body)
419 419 msgfile.close()
420 420 return body
421 421
422 422
423 423 def _getbundlemsgs(repo, sender, bundle, **opts):
424 424 """Get the full email for sending a given bundle
425 425
426 426 This function returns a list of "email" tuples (subject, content, None).
427 427 The list is always one message long in that case.
428 428 """
429 429 ui = repo.ui
430 430 _charsets = mail._charsets(ui)
431 431 subj = opts.get('subject') or prompt(
432 432 ui, b'Subject:', b'A bundle for your repository'
433 433 )
434 434
435 435 body = _getdescription(repo, b'', sender, **opts)
436 436 msg = emimemultipart.MIMEMultipart()
437 437 if body:
438 438 msg.attach(mail.mimeencode(ui, body, _charsets, opts.get('test')))
439 439 datapart = emimebase.MIMEBase('application', 'x-mercurial-bundle')
440 440 datapart.set_payload(bundle)
441 441 bundlename = b'%s.hg' % opts.get('bundlename', b'bundle')
442 442 datapart.add_header(
443 443 'Content-Disposition',
444 444 'attachment',
445 445 filename=encoding.strfromlocal(bundlename),
446 446 )
447 447 emailencoders.encode_base64(datapart)
448 448 msg.attach(datapart)
449 449 msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get('test'))
450 450 return [(msg, subj, None)]
451 451
452 452
453 453 def _makeintro(repo, sender, revs, patches, **opts):
454 454 """make an introduction email, asking the user for content if needed
455 455
456 456 email is returned as (subject, body, cumulative-diffstat)"""
457 457 ui = repo.ui
458 458 _charsets = mail._charsets(ui)
459 459
460 460 # use the last revision which is likely to be a bookmarked head
461 461 prefix = _formatprefix(
462 462 ui, repo, revs.last(), opts.get('flag'), 0, len(patches), numbered=True
463 463 )
464 464 subj = opts.get('subject') or prompt(
465 465 ui, b'(optional) Subject: ', rest=prefix, default=b''
466 466 )
467 467 if not subj:
468 468 return None # skip intro if the user doesn't bother
469 469
470 470 subj = prefix + b' ' + subj
471 471
472 472 body = b''
473 473 if opts.get('diffstat'):
474 474 # generate a cumulative diffstat of the whole patch series
475 475 diffstat = patch.diffstat(sum(patches, []))
476 476 body = b'\n' + diffstat
477 477 else:
478 478 diffstat = None
479 479
480 480 body = _getdescription(repo, body, sender, **opts)
481 481 msg = mail.mimeencode(ui, body, _charsets, opts.get('test'))
482 482 msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get('test'))
483 483 return (msg, subj, diffstat)
484 484
485 485
486 486 def _getpatchmsgs(repo, sender, revs, patchnames=None, **opts):
487 487 """return a list of emails from a list of patches
488 488
489 489 This involves introduction message creation if necessary.
490 490
491 491 This function returns a list of "email" tuples (subject, content, None).
492 492 """
493 493 bytesopts = pycompat.byteskwargs(opts)
494 494 ui = repo.ui
495 495 _charsets = mail._charsets(ui)
496 496 patches = list(_getpatches(repo, revs, **opts))
497 497 msgs = []
498 498
499 499 ui.write(_(b'this patch series consists of %d patches.\n\n') % len(patches))
500 500
501 501 # build the intro message, or skip it if the user declines
502 502 if introwanted(ui, bytesopts, len(patches)):
503 503 msg = _makeintro(repo, sender, revs, patches, **opts)
504 504 if msg:
505 505 msgs.append(msg)
506 506
507 507 # are we going to send more than one message?
508 508 numbered = len(msgs) + len(patches) > 1
509 509
510 510 # now generate the actual patch messages
511 511 name = None
512 512 assert len(revs) == len(patches)
513 513 for i, (r, p) in enumerate(zip(revs, patches)):
514 514 if patchnames:
515 515 name = patchnames[i]
516 516 msg = makepatch(
517 517 ui,
518 518 repo,
519 519 r,
520 520 p,
521 521 bytesopts,
522 522 _charsets,
523 523 i + 1,
524 524 len(patches),
525 525 numbered,
526 526 name,
527 527 )
528 528 msgs.append(msg)
529 529
530 530 return msgs
531 531
532 532
533 533 def _getoutgoing(repo, dest, revs):
534 534 '''Return the revisions present locally but not in dest'''
535 535 ui = repo.ui
536 paths = urlutil.get_push_paths(repo, ui, [dest])
536 paths = urlutil.get_push_paths(repo, ui, [dest] if dest else None)
537 537 safe_paths = [urlutil.hidepassword(p.rawloc) for p in paths]
538 538 ui.status(_(b'comparing with %s\n') % b','.join(safe_paths))
539 539
540 540 revs = [r for r in revs if r >= 0]
541 541 if not revs:
542 542 revs = [repo.changelog.tiprev()]
543 543 revs = repo.revs(b'outgoing(%s) and ::%ld', dest or b'', revs)
544 544 if not revs:
545 545 ui.status(_(b"no changes found\n"))
546 546 return revs
547 547
548 548
549 549 def _msgid(node, timestamp):
550 550 try:
551 551 hostname = encoding.strfromlocal(encoding.environ[b'HGHOSTNAME'])
552 552 except KeyError:
553 553 hostname = socket.getfqdn()
554 554 return '<%s.%d@%s>' % (node, timestamp, hostname)
555 555
556 556
557 557 emailopts = [
558 558 (b'', b'body', None, _(b'send patches as inline message text (default)')),
559 559 (b'a', b'attach', None, _(b'send patches as attachments')),
560 560 (b'i', b'inline', None, _(b'send patches as inline attachments')),
561 561 (
562 562 b'',
563 563 b'bcc',
564 564 [],
565 565 _(b'email addresses of blind carbon copy recipients'),
566 566 _(b'EMAIL'),
567 567 ),
568 568 (b'c', b'cc', [], _(b'email addresses of copy recipients'), _(b'EMAIL')),
569 569 (b'', b'confirm', None, _(b'ask for confirmation before sending')),
570 570 (b'd', b'diffstat', None, _(b'add diffstat output to messages')),
571 571 (
572 572 b'',
573 573 b'date',
574 574 b'',
575 575 _(b'use the given date as the sending date'),
576 576 _(b'DATE'),
577 577 ),
578 578 (
579 579 b'',
580 580 b'desc',
581 581 b'',
582 582 _(b'use the given file as the series description'),
583 583 _(b'FILE'),
584 584 ),
585 585 (b'f', b'from', b'', _(b'email address of sender'), _(b'EMAIL')),
586 586 (b'n', b'test', None, _(b'print messages that would be sent')),
587 587 (
588 588 b'm',
589 589 b'mbox',
590 590 b'',
591 591 _(b'write messages to mbox file instead of sending them'),
592 592 _(b'FILE'),
593 593 ),
594 594 (
595 595 b'',
596 596 b'reply-to',
597 597 [],
598 598 _(b'email addresses replies should be sent to'),
599 599 _(b'EMAIL'),
600 600 ),
601 601 (
602 602 b's',
603 603 b'subject',
604 604 b'',
605 605 _(b'subject of first message (intro or single patch)'),
606 606 _(b'TEXT'),
607 607 ),
608 608 (
609 609 b'',
610 610 b'in-reply-to',
611 611 b'',
612 612 _(b'message identifier to reply to'),
613 613 _(b'MSGID'),
614 614 ),
615 615 (b'', b'flag', [], _(b'flags to add in subject prefixes'), _(b'FLAG')),
616 616 (b't', b'to', [], _(b'email addresses of recipients'), _(b'EMAIL')),
617 617 ]
618 618
619 619
620 620 @command(
621 621 b'email',
622 622 [
623 623 (b'g', b'git', None, _(b'use git extended diff format')),
624 624 (b'', b'plain', None, _(b'omit hg patch header')),
625 625 (
626 626 b'o',
627 627 b'outgoing',
628 628 None,
629 629 _(b'send changes not found in the target repository'),
630 630 ),
631 631 (
632 632 b'b',
633 633 b'bundle',
634 634 None,
635 635 _(b'send changes not in target as a binary bundle'),
636 636 ),
637 637 (
638 638 b'B',
639 639 b'bookmark',
640 640 b'',
641 641 _(b'send changes only reachable by given bookmark'),
642 642 _(b'BOOKMARK'),
643 643 ),
644 644 (
645 645 b'',
646 646 b'bundlename',
647 647 b'bundle',
648 648 _(b'name of the bundle attachment file'),
649 649 _(b'NAME'),
650 650 ),
651 651 (b'r', b'rev', [], _(b'a revision to send'), _(b'REV')),
652 652 (
653 653 b'',
654 654 b'force',
655 655 None,
656 656 _(
657 657 b'run even when remote repository is unrelated '
658 658 b'(with -b/--bundle)'
659 659 ),
660 660 ),
661 661 (
662 662 b'',
663 663 b'base',
664 664 [],
665 665 _(
666 666 b'a base changeset to specify instead of a destination '
667 667 b'(with -b/--bundle)'
668 668 ),
669 669 _(b'REV'),
670 670 ),
671 671 (
672 672 b'',
673 673 b'intro',
674 674 None,
675 675 _(b'send an introduction email for a single patch'),
676 676 ),
677 677 ]
678 678 + emailopts
679 679 + cmdutil.remoteopts,
680 680 _(b'hg email [OPTION]... [DEST]...'),
681 681 helpcategory=command.CATEGORY_IMPORT_EXPORT,
682 682 )
683 683 def email(ui, repo, *revs, **opts):
684 684 """send changesets by email
685 685
686 686 By default, diffs are sent in the format generated by
687 687 :hg:`export`, one per message. The series starts with a "[PATCH 0
688 688 of N]" introduction, which describes the series as a whole.
689 689
690 690 Each patch email has a Subject line of "[PATCH M of N] ...", using
691 691 the first line of the changeset description as the subject text.
692 692 The message contains two or three parts. First, the changeset
693 693 description.
694 694
695 695 With the -d/--diffstat option, if the diffstat program is
696 696 installed, the result of running diffstat on the patch is inserted.
697 697
698 698 Finally, the patch itself, as generated by :hg:`export`.
699 699
700 700 With the -d/--diffstat or --confirm options, you will be presented
701 701 with a final summary of all messages and asked for confirmation before
702 702 the messages are sent.
703 703
704 704 By default the patch is included as text in the email body for
705 705 easy reviewing. Using the -a/--attach option will instead create
706 706 an attachment for the patch. With -i/--inline an inline attachment
707 707 will be created. You can include a patch both as text in the email
708 708 body and as a regular or an inline attachment by combining the
709 709 -a/--attach or -i/--inline with the --body option.
710 710
711 711 With -B/--bookmark changesets reachable by the given bookmark are
712 712 selected.
713 713
714 714 With -o/--outgoing, emails will be generated for patches not found
715 715 in the destination repository (or only those which are ancestors
716 716 of the specified revisions if any are provided)
717 717
718 718 With -b/--bundle, changesets are selected as for --outgoing, but a
719 719 single email containing a binary Mercurial bundle as an attachment
720 720 will be sent. Use the ``patchbomb.bundletype`` config option to
721 721 control the bundle type as with :hg:`bundle --type`.
722 722
723 723 With -m/--mbox, instead of previewing each patchbomb message in a
724 724 pager or sending the messages directly, it will create a UNIX
725 725 mailbox file with the patch emails. This mailbox file can be
726 726 previewed with any mail user agent which supports UNIX mbox
727 727 files.
728 728
729 729 With -n/--test, all steps will run, but mail will not be sent.
730 730 You will be prompted for an email recipient address, a subject and
731 731 an introductory message describing the patches of your patchbomb.
732 732 Then when all is done, patchbomb messages are displayed.
733 733
734 734 In case email sending fails, you will find a backup of your series
735 735 introductory message in ``.hg/last-email.txt``.
736 736
737 737 The default behavior of this command can be customized through
738 738 configuration. (See :hg:`help patchbomb` for details)
739 739
740 740 Examples::
741 741
742 742 hg email -r 3000 # send patch 3000 only
743 743 hg email -r 3000 -r 3001 # send patches 3000 and 3001
744 744 hg email -r 3000:3005 # send patches 3000 through 3005
745 745 hg email 3000 # send patch 3000 (deprecated)
746 746
747 747 hg email -o # send all patches not in default
748 748 hg email -o DEST # send all patches not in DEST
749 749 hg email -o -r 3000 # send all ancestors of 3000 not in default
750 750 hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST
751 751
752 752 hg email -B feature # send all ancestors of feature bookmark
753 753
754 754 hg email -b # send bundle of all patches not in default
755 755 hg email -b DEST # send bundle of all patches not in DEST
756 756 hg email -b -r 3000 # bundle of all ancestors of 3000 not in default
757 757 hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
758 758
759 759 hg email -o -m mbox && # generate an mbox file...
760 760 mutt -R -f mbox # ... and view it with mutt
761 761 hg email -o -m mbox && # generate an mbox file ...
762 762 formail -s sendmail \\ # ... and use formail to send from the mbox
763 763 -bm -t < mbox # ... using sendmail
764 764
765 765 Before using this command, you will need to enable email in your
766 766 hgrc. See the [email] section in hgrc(5) for details.
767 767 """
768 768 opts = pycompat.byteskwargs(opts)
769 769
770 770 _charsets = mail._charsets(ui)
771 771
772 772 bundle = opts.get(b'bundle')
773 773 date = opts.get(b'date')
774 774 mbox = opts.get(b'mbox')
775 775 outgoing = opts.get(b'outgoing')
776 776 rev = opts.get(b'rev')
777 777 bookmark = opts.get(b'bookmark')
778 778
779 779 if not (opts.get(b'test') or mbox):
780 780 # really sending
781 781 mail.validateconfig(ui)
782 782
783 783 if not (revs or rev or outgoing or bundle or bookmark):
784 784 raise error.Abort(
785 785 _(b'specify at least one changeset with -B, -r or -o')
786 786 )
787 787
788 788 if outgoing and bundle:
789 789 raise error.Abort(
790 790 _(
791 791 b"--outgoing mode always on with --bundle;"
792 792 b" do not re-specify --outgoing"
793 793 )
794 794 )
795 795 cmdutil.check_at_most_one_arg(opts, b'rev', b'bookmark')
796 796
797 797 if outgoing or bundle:
798 798 if len(revs) > 1:
799 799 raise error.Abort(_(b"too many destinations"))
800 800 if revs:
801 801 dest = revs[0]
802 802 else:
803 803 dest = None
804 804 revs = []
805 805
806 806 if rev:
807 807 if revs:
808 808 raise error.Abort(_(b'use only one form to specify the revision'))
809 809 revs = rev
810 810 elif bookmark:
811 811 if bookmark not in repo._bookmarks:
812 812 raise error.Abort(_(b"bookmark '%s' not found") % bookmark)
813 813 revs = scmutil.bookmarkrevs(repo, bookmark)
814 814
815 815 revs = scmutil.revrange(repo, revs)
816 816 if outgoing:
817 817 revs = _getoutgoing(repo, dest, revs)
818 818 if bundle:
819 819 opts[b'revs'] = [b"%d" % r for r in revs]
820 820
821 821 # check if revision exist on the public destination
822 822 publicurl = repo.ui.config(b'patchbomb', b'publicurl')
823 823 if publicurl:
824 824 repo.ui.debug(b'checking that revision exist in the public repo\n')
825 825 try:
826 826 publicpeer = hg.peer(repo, {}, publicurl)
827 827 except error.RepoError:
828 828 repo.ui.write_err(
829 829 _(b'unable to access public repo: %s\n') % publicurl
830 830 )
831 831 raise
832 832 if not publicpeer.capable(b'known'):
833 833 repo.ui.debug(b'skipping existence checks: public repo too old\n')
834 834 else:
835 835 out = [repo[r] for r in revs]
836 836 known = publicpeer.known(h.node() for h in out)
837 837 missing = []
838 838 for idx, h in enumerate(out):
839 839 if not known[idx]:
840 840 missing.append(h)
841 841 if missing:
842 842 if len(missing) > 1:
843 843 msg = _(b'public "%s" is missing %s and %i others')
844 844 msg %= (publicurl, missing[0], len(missing) - 1)
845 845 else:
846 846 msg = _(b'public url %s is missing %s')
847 847 msg %= (publicurl, missing[0])
848 848 missingrevs = [ctx.rev() for ctx in missing]
849 849 revhint = b' '.join(
850 850 b'-r %s' % h for h in repo.set(b'heads(%ld)', missingrevs)
851 851 )
852 852 hint = _(b"use 'hg push %s %s'") % (publicurl, revhint)
853 853 raise error.Abort(msg, hint=hint)
854 854
855 855 # start
856 856 if date:
857 857 start_time = dateutil.parsedate(date)
858 858 else:
859 859 start_time = dateutil.makedate()
860 860
861 861 def genmsgid(id):
862 862 return _msgid(id[:20], int(start_time[0]))
863 863
864 864 # deprecated config: patchbomb.from
865 865 sender = (
866 866 opts.get(b'from')
867 867 or ui.config(b'email', b'from')
868 868 or ui.config(b'patchbomb', b'from')
869 869 or prompt(ui, b'From', ui.username())
870 870 )
871 871
872 872 if bundle:
873 873 stropts = pycompat.strkwargs(opts)
874 874 bundledata = _getbundle(repo, dest, **stropts)
875 875 bundleopts = stropts.copy()
876 876 bundleopts.pop('bundle', None) # already processed
877 877 msgs = _getbundlemsgs(repo, sender, bundledata, **bundleopts)
878 878 else:
879 879 msgs = _getpatchmsgs(repo, sender, revs, **pycompat.strkwargs(opts))
880 880
881 881 showaddrs = []
882 882
883 883 def getaddrs(header, ask=False, default=None):
884 884 configkey = header.lower()
885 885 opt = header.replace(b'-', b'_').lower()
886 886 addrs = opts.get(opt)
887 887 if addrs:
888 888 showaddrs.append(b'%s: %s' % (header, b', '.join(addrs)))
889 889 return mail.addrlistencode(ui, addrs, _charsets, opts.get(b'test'))
890 890
891 891 # not on the command line: fallback to config and then maybe ask
892 892 addr = ui.config(b'email', configkey) or ui.config(
893 893 b'patchbomb', configkey
894 894 )
895 895 if not addr:
896 896 specified = ui.hasconfig(b'email', configkey) or ui.hasconfig(
897 897 b'patchbomb', configkey
898 898 )
899 899 if not specified and ask:
900 900 addr = prompt(ui, header, default=default)
901 901 if addr:
902 902 showaddrs.append(b'%s: %s' % (header, addr))
903 903 return mail.addrlistencode(ui, [addr], _charsets, opts.get(b'test'))
904 904 elif default:
905 905 return mail.addrlistencode(
906 906 ui, [default], _charsets, opts.get(b'test')
907 907 )
908 908 return []
909 909
910 910 to = getaddrs(b'To', ask=True)
911 911 if not to:
912 912 # we can get here in non-interactive mode
913 913 raise error.Abort(_(b'no recipient addresses provided'))
914 914 cc = getaddrs(b'Cc', ask=True, default=b'')
915 915 bcc = getaddrs(b'Bcc')
916 916 replyto = getaddrs(b'Reply-To')
917 917
918 918 confirm = ui.configbool(b'patchbomb', b'confirm')
919 919 confirm |= bool(opts.get(b'diffstat') or opts.get(b'confirm'))
920 920
921 921 if confirm:
922 922 ui.write(_(b'\nFinal summary:\n\n'), label=b'patchbomb.finalsummary')
923 923 ui.write((b'From: %s\n' % sender), label=b'patchbomb.from')
924 924 for addr in showaddrs:
925 925 ui.write(b'%s\n' % addr, label=b'patchbomb.to')
926 926 for m, subj, ds in msgs:
927 927 ui.write((b'Subject: %s\n' % subj), label=b'patchbomb.subject')
928 928 if ds:
929 929 ui.write(ds, label=b'patchbomb.diffstats')
930 930 ui.write(b'\n')
931 931 if ui.promptchoice(
932 932 _(b'are you sure you want to send (yn)?$$ &Yes $$ &No')
933 933 ):
934 934 raise error.Abort(_(b'patchbomb canceled'))
935 935
936 936 ui.write(b'\n')
937 937
938 938 parent = opts.get(b'in_reply_to') or None
939 939 # angle brackets may be omitted, they're not semantically part of the msg-id
940 940 if parent is not None:
941 941 parent = encoding.strfromlocal(parent)
942 942 if not parent.startswith('<'):
943 943 parent = '<' + parent
944 944 if not parent.endswith('>'):
945 945 parent += '>'
946 946
947 947 sender_addr = eutil.parseaddr(encoding.strfromlocal(sender))[1]
948 948 sender = mail.addressencode(ui, sender, _charsets, opts.get(b'test'))
949 949 sendmail = None
950 950 firstpatch = None
951 951 progress = ui.makeprogress(
952 952 _(b'sending'), unit=_(b'emails'), total=len(msgs)
953 953 )
954 954 for i, (m, subj, ds) in enumerate(msgs):
955 955 try:
956 956 m['Message-Id'] = genmsgid(m['X-Mercurial-Node'])
957 957 if not firstpatch:
958 958 firstpatch = m['Message-Id']
959 959 m['X-Mercurial-Series-Id'] = firstpatch
960 960 except TypeError:
961 961 m['Message-Id'] = genmsgid('patchbomb')
962 962 if parent:
963 963 m['In-Reply-To'] = parent
964 964 m['References'] = parent
965 965 if not parent or 'X-Mercurial-Node' not in m:
966 966 parent = m['Message-Id']
967 967
968 968 m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version().decode()
969 969 m['Date'] = eutil.formatdate(start_time[0], localtime=True)
970 970
971 971 start_time = (start_time[0] + 1, start_time[1])
972 972 m['From'] = sender
973 973 m['To'] = ', '.join(to)
974 974 if cc:
975 975 m['Cc'] = ', '.join(cc)
976 976 if bcc:
977 977 m['Bcc'] = ', '.join(bcc)
978 978 if replyto:
979 979 m['Reply-To'] = ', '.join(replyto)
980 980 if opts.get(b'test'):
981 981 ui.status(_(b'displaying '), subj, b' ...\n')
982 982 ui.pager(b'email')
983 983 generator = mail.Generator(ui, mangle_from_=False)
984 984 try:
985 985 generator.flatten(m, False)
986 986 ui.write(b'\n')
987 987 except IOError as inst:
988 988 if inst.errno != errno.EPIPE:
989 989 raise
990 990 else:
991 991 if not sendmail:
992 992 sendmail = mail.connect(ui, mbox=mbox)
993 993 ui.status(_(b'sending '), subj, b' ...\n')
994 994 progress.update(i, item=subj)
995 995 if not mbox:
996 996 # Exim does not remove the Bcc field
997 997 del m['Bcc']
998 998 fp = stringio()
999 999 generator = mail.Generator(fp, mangle_from_=False)
1000 1000 generator.flatten(m, False)
1001 1001 alldests = to + bcc + cc
1002 1002 sendmail(sender_addr, alldests, fp.getvalue())
1003 1003
1004 1004 progress.complete()
@@ -1,18 +1,17 b''
1 1 [build-system]
2 2 requires = ["setuptools", "wheel"]
3 build-backend = "setuptools.build_meta"
4 3
5 4 [tool.black]
6 5 line-length = 80
7 6 exclude = '''
8 7 build/
9 8 | wheelhouse/
10 9 | dist/
11 10 | packages/
12 11 | \.hg/
13 12 | \.mypy_cache/
14 13 | \.venv/
15 14 | mercurial/thirdparty/
16 15 '''
17 16 skip-string-normalization = true
18 17 quiet = true
@@ -1,42 +1,43 b''
1 1 == New Features ==
2 2 * `debugrebuildfncache` now has an option to rebuild only the index files
3 3
4 4
5 5 == Default Format Change ==
6 6
7 7 These changes affects newly created repositories (or new clone) done with
8 8 Mercurial 6.0.
9 9
10 10
11 11 == New Experimental Features ==
12 12
13 13 * Added a new `web.full-garbage-collection-rate` to control performance. See
14 14 de2e04fe4897a554b9ef433167f11ea4feb2e09c for more information
15 15
16 16 == Bug Fixes ==
17 17
18 18 * `hg fix --working-dir` now correctly works when in an uncommitted merge state
19 19 * `rhg` (Rust fast-path for `hg`) now supports the full config list syntax
20 20 * `rhg` now parses some corner-cases for revsets correctly
21 * `hg email -o` now works again when not mentioning a revision
21 22 * Lots of Windows fixes
22 23 * Lots of miscellaneous other fixes
23 24
24 25 == Backwards Compatibility Changes ==
25 26
26 27
27 28 == Internal API Changes ==
28 29
29 30 The following functions have been removed:
30 31
31 32 * `dirstate.normal`
32 33 * `dirstate.normallookup`
33 34 * `dirstate.otherparent`
34 35 * `dirstate.add`
35 36 * `dirstate.remove`
36 37 * `dirstate.drop`
37 38 * `dirstate.__getitem__`
38 39
39 40 Miscellaneous:
40 41
41 42 * `wireprotov1peer`'s `batchable` is now a simple function and not a generator
42 43 anymore No newline at end of file
@@ -1,3129 +1,3168 b''
1 1 Note for future hackers of patchbomb: this file is a bit heavy on
2 2 wildcards in test expectations due to how many things like hostnames
3 3 tend to make it into outputs. As a result, you may need to perform the
4 4 following regular expression substitutions:
5 5 Mercurial-patchbomb/.* -> Mercurial-patchbomb/* (glob)
6 6 /mixed; boundary="===+[0-9]+==" -> /mixed; boundary="===*== (glob)"
7 7 --===+[0-9]+=+--$ -> --===*=-- (glob)
8 8 --===+[0-9]+=+$ -> --===*= (glob)
9 9
10 10 $ cat > prune-blank-after-boundary.py <<EOF
11 11 > from __future__ import absolute_import, print_function
12 12 > import sys
13 13 > skipblank = False
14 14 > trim = lambda x: x.strip(' \r\n')
15 15 > for l in sys.stdin:
16 16 > if trim(l).endswith('=--') or trim(l).endswith('=='):
17 17 > skipblank = True
18 18 > print(l, end='')
19 19 > continue
20 20 > if not trim(l) and skipblank:
21 21 > continue
22 22 > skipblank = False
23 23 > print(l, end='')
24 24 > EOF
25 25 $ filterboundary() {
26 26 > "$PYTHON" "$TESTTMP/prune-blank-after-boundary.py"
27 27 > }
28 28 $ echo "[extensions]" >> $HGRCPATH
29 29 $ echo "patchbomb=" >> $HGRCPATH
30 30
31 31 $ hg init t
32 32 $ cd t
33 33 $ echo a > a
34 34 $ hg commit -Ama -d '1 0'
35 35 adding a
36 36
37 37 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
38 38 this patch series consists of 1 patches.
39 39
40 40
41 41 displaying [PATCH] a ...
42 42 MIME-Version: 1.0
43 43 Content-Type: text/plain; charset="us-ascii"
44 44 Content-Transfer-Encoding: 7bit
45 45 Subject: [PATCH] a
46 46 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
47 47 X-Mercurial-Series-Index: 1
48 48 X-Mercurial-Series-Total: 1
49 49 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
50 50 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
51 51 User-Agent: Mercurial-patchbomb/* (glob)
52 52 Date: Thu, 01 Jan 1970 00:01:00 +0000
53 53 From: quux
54 54 To: foo
55 55 Cc: bar
56 56
57 57 # HG changeset patch
58 58 # User test
59 59 # Date 1 0
60 60 # Thu Jan 01 00:00:01 1970 +0000
61 61 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
62 62 # Parent 0000000000000000000000000000000000000000
63 63 a
64 64
65 65 diff -r 000000000000 -r 8580ff50825a a
66 66 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
67 67 +++ b/a Thu Jan 01 00:00:01 1970 +0000
68 68 @@ -0,0 +1,1 @@
69 69 +a
70 70
71 71
72 72 If --to is specified on the command line, it should override any
73 73 email.to config setting. Same for --cc:
74 74
75 75 $ hg email --date '1970-1-1 0:1' -n -f quux --to foo --cc bar -r tip \
76 76 > --config email.to=bob@example.com --config email.cc=alice@example.com
77 77 this patch series consists of 1 patches.
78 78
79 79
80 80 displaying [PATCH] a ...
81 81 MIME-Version: 1.0
82 82 Content-Type: text/plain; charset="us-ascii"
83 83 Content-Transfer-Encoding: 7bit
84 84 Subject: [PATCH] a
85 85 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
86 86 X-Mercurial-Series-Index: 1
87 87 X-Mercurial-Series-Total: 1
88 88 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
89 89 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
90 90 User-Agent: Mercurial-patchbomb/* (glob)
91 91 Date: Thu, 01 Jan 1970 00:01:00 +0000
92 92 From: quux
93 93 To: foo
94 94 Cc: bar
95 95
96 96 # HG changeset patch
97 97 # User test
98 98 # Date 1 0
99 99 # Thu Jan 01 00:00:01 1970 +0000
100 100 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
101 101 # Parent 0000000000000000000000000000000000000000
102 102 a
103 103
104 104 diff -r 000000000000 -r 8580ff50825a a
105 105 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
106 106 +++ b/a Thu Jan 01 00:00:01 1970 +0000
107 107 @@ -0,0 +1,1 @@
108 108 +a
109 109
110 110
111 111 $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
112 112 > n
113 113 > EOF
114 114 this patch series consists of 1 patches.
115 115
116 116
117 117 Final summary:
118 118
119 119 From: quux
120 120 To: foo
121 121 Cc: bar
122 122 Subject: [PATCH] a
123 123 a | 1 +
124 124 1 files changed, 1 insertions(+), 0 deletions(-)
125 125
126 126 are you sure you want to send (yn)? n
127 127 abort: patchbomb canceled
128 128 [255]
129 129
130 130 $ hg --config ui.interactive=1 --config patchbomb.confirm=true email -n -f quux -t foo -c bar -r tip<<EOF
131 131 > n
132 132 > EOF
133 133 this patch series consists of 1 patches.
134 134
135 135
136 136 Final summary:
137 137
138 138 From: quux
139 139 To: foo
140 140 Cc: bar
141 141 Subject: [PATCH] a
142 142 a | 1 +
143 143 1 files changed, 1 insertions(+), 0 deletions(-)
144 144
145 145 are you sure you want to send (yn)? n
146 146 abort: patchbomb canceled
147 147 [255]
148 148
149 149
150 150 Test diff.git is respected
151 151 $ hg --config diff.git=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
152 152 this patch series consists of 1 patches.
153 153
154 154
155 155 displaying [PATCH] a ...
156 156 MIME-Version: 1.0
157 157 Content-Type: text/plain; charset="us-ascii"
158 158 Content-Transfer-Encoding: 7bit
159 159 Subject: [PATCH] a
160 160 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
161 161 X-Mercurial-Series-Index: 1
162 162 X-Mercurial-Series-Total: 1
163 163 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
164 164 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
165 165 User-Agent: Mercurial-patchbomb/* (glob)
166 166 Date: Thu, 01 Jan 1970 00:01:00 +0000
167 167 From: quux
168 168 To: foo
169 169 Cc: bar
170 170
171 171 # HG changeset patch
172 172 # User test
173 173 # Date 1 0
174 174 # Thu Jan 01 00:00:01 1970 +0000
175 175 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
176 176 # Parent 0000000000000000000000000000000000000000
177 177 a
178 178
179 179 diff --git a/a b/a
180 180 new file mode 100644
181 181 --- /dev/null
182 182 +++ b/a
183 183 @@ -0,0 +1,1 @@
184 184 +a
185 185
186 186
187 187
188 188 Test breaking format changes aren't
189 189 $ hg --config diff.noprefix=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
190 190 this patch series consists of 1 patches.
191 191
192 192
193 193 displaying [PATCH] a ...
194 194 MIME-Version: 1.0
195 195 Content-Type: text/plain; charset="us-ascii"
196 196 Content-Transfer-Encoding: 7bit
197 197 Subject: [PATCH] a
198 198 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
199 199 X-Mercurial-Series-Index: 1
200 200 X-Mercurial-Series-Total: 1
201 201 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
202 202 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
203 203 User-Agent: Mercurial-patchbomb/* (glob)
204 204 Date: Thu, 01 Jan 1970 00:01:00 +0000
205 205 From: quux
206 206 To: foo
207 207 Cc: bar
208 208
209 209 # HG changeset patch
210 210 # User test
211 211 # Date 1 0
212 212 # Thu Jan 01 00:00:01 1970 +0000
213 213 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
214 214 # Parent 0000000000000000000000000000000000000000
215 215 a
216 216
217 217 diff -r 000000000000 -r 8580ff50825a a
218 218 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
219 219 +++ b/a Thu Jan 01 00:00:01 1970 +0000
220 220 @@ -0,0 +1,1 @@
221 221 +a
222 222
223 223
224 224 $ echo b > b
225 225 $ hg commit -Amb -d '2 0'
226 226 adding b
227 227
228 228 $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip
229 229 this patch series consists of 2 patches.
230 230
231 231
232 232 Write the introductory message for the patch series.
233 233
234 234
235 235 displaying [PATCH 0 of 2] test ...
236 236 MIME-Version: 1.0
237 237 Content-Type: text/plain; charset="us-ascii"
238 238 Content-Transfer-Encoding: 7bit
239 239 Subject: [PATCH 0 of 2] test
240 240 Message-Id: <patchbomb.120@test-hostname>
241 241 User-Agent: Mercurial-patchbomb/* (glob)
242 242 Date: Thu, 01 Jan 1970 00:02:00 +0000
243 243 From: quux
244 244 To: foo
245 245 Cc: bar
246 246
247 247
248 248 displaying [PATCH 1 of 2] a ...
249 249 MIME-Version: 1.0
250 250 Content-Type: text/plain; charset="us-ascii"
251 251 Content-Transfer-Encoding: 7bit
252 252 Subject: [PATCH 1 of 2] a
253 253 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
254 254 X-Mercurial-Series-Index: 1
255 255 X-Mercurial-Series-Total: 2
256 256 Message-Id: <8580ff50825a50c8f716.121@test-hostname>
257 257 X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname>
258 258 In-Reply-To: <patchbomb.120@test-hostname>
259 259 References: <patchbomb.120@test-hostname>
260 260 User-Agent: Mercurial-patchbomb/* (glob)
261 261 Date: Thu, 01 Jan 1970 00:02:01 +0000
262 262 From: quux
263 263 To: foo
264 264 Cc: bar
265 265
266 266 # HG changeset patch
267 267 # User test
268 268 # Date 1 0
269 269 # Thu Jan 01 00:00:01 1970 +0000
270 270 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
271 271 # Parent 0000000000000000000000000000000000000000
272 272 a
273 273
274 274 diff -r 000000000000 -r 8580ff50825a a
275 275 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
276 276 +++ b/a Thu Jan 01 00:00:01 1970 +0000
277 277 @@ -0,0 +1,1 @@
278 278 +a
279 279
280 280 displaying [PATCH 2 of 2] b ...
281 281 MIME-Version: 1.0
282 282 Content-Type: text/plain; charset="us-ascii"
283 283 Content-Transfer-Encoding: 7bit
284 284 Subject: [PATCH 2 of 2] b
285 285 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
286 286 X-Mercurial-Series-Index: 2
287 287 X-Mercurial-Series-Total: 2
288 288 Message-Id: <97d72e5f12c7e84f8506.122@test-hostname>
289 289 X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname>
290 290 In-Reply-To: <patchbomb.120@test-hostname>
291 291 References: <patchbomb.120@test-hostname>
292 292 User-Agent: Mercurial-patchbomb/* (glob)
293 293 Date: Thu, 01 Jan 1970 00:02:02 +0000
294 294 From: quux
295 295 To: foo
296 296 Cc: bar
297 297
298 298 # HG changeset patch
299 299 # User test
300 300 # Date 2 0
301 301 # Thu Jan 01 00:00:02 1970 +0000
302 302 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
303 303 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
304 304 b
305 305
306 306 diff -r 8580ff50825a -r 97d72e5f12c7 b
307 307 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
308 308 +++ b/b Thu Jan 01 00:00:02 1970 +0000
309 309 @@ -0,0 +1,1 @@
310 310 +b
311 311
312 312
313 313 .hg/last-email.txt
314 314
315 315 $ cat > editor.sh << '__EOF__'
316 316 > echo "a precious introductory message" > "$1"
317 317 > __EOF__
318 318 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg email -n -t foo -s test -r 0:tip > /dev/null
319 319 $ cat .hg/last-email.txt
320 320 a precious introductory message
321 321
322 322 $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \
323 323 > --config extensions.progress= --config progress.assume-tty=1 \
324 324 > --config progress.delay=0 --config progress.refresh=0 \
325 325 > --config progress.width=60 \
326 326 > --config extensions.mocktime=$TESTDIR/mocktime.py
327 327 this patch series consists of 2 patches.
328 328
329 329
330 330 Write the introductory message for the patch series.
331 331
332 332 \r (no-eol) (esc)
333 333 sending [ ] 0/3\r (no-eol) (esc)
334 334 \r (no-eol) (esc)
335 335 \r (no-eol) (esc)
336 336 sending [============> ] 1/3 01s\r (no-eol) (esc)
337 337 \r (no-eol) (esc)
338 338 \r (no-eol) (esc)
339 339 sending [==========================> ] 2/3 01s\r (no-eol) (esc)
340 340 \r (esc)
341 341 sending [PATCH 0 of 2] test ...
342 342 sending [PATCH 1 of 2] a ...
343 343 sending [PATCH 2 of 2] b ...
344 344
345 345 $ cd ..
346 346
347 347 $ hg clone -q t t2
348 348 $ cd t2
349 349 $ echo c > c
350 350 $ hg commit -Amc -d '3 0'
351 351 adding c
352 352
353 353 $ cat > description <<EOF
354 354 > a multiline
355 355 >
356 356 > description
357 357 > EOF
358 358
359 359
360 360 test bundle and description:
361 361 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
362 362 > -c bar -s test -r tip -b --desc description | filterboundary
363 363 searching for changes
364 364 1 changesets found
365 365
366 366 displaying test ...
367 367 Content-Type: multipart/mixed; boundary="===*==" (glob)
368 368 MIME-Version: 1.0
369 369 Subject: test
370 370 Message-Id: <patchbomb.180@test-hostname>
371 371 User-Agent: Mercurial-patchbomb/* (glob)
372 372 Date: Thu, 01 Jan 1970 00:03:00 +0000
373 373 From: quux
374 374 To: foo
375 375 Cc: bar
376 376
377 377 --===*= (glob)
378 378 MIME-Version: 1.0
379 379 Content-Type: text/plain; charset="us-ascii"
380 380 Content-Transfer-Encoding: 7bit
381 381
382 382 a multiline
383 383
384 384 description
385 385
386 386 --===*= (glob)
387 387 Content-Type: application/x-mercurial-bundle
388 388 MIME-Version: 1.0
389 389 Content-Disposition: attachment; filename="bundle.hg"
390 390 Content-Transfer-Encoding: base64
391 391
392 392 SEcyMAAAAA5Db21wcmVzc2lvbj1CWkJaaDkxQVkmU1l91TAVAAAN////vFcSXL9/8H7R09C/578I
393 393 Ak0E4pe4SIIIgQSgGEQOcLABGYYNKgJgmhpp6mmjIZMCZNMhpgBBpkaYJpo9QaZMg02iaY2lCImK
394 394 emk02kmEAeoA0D01ANBoHqHqADTaj1NAAyZqA0Gg0KiYnqaepk0eoNDTCGj1A0eoyBoGjRkYBqAB
395 395 poNMmhkBhENSP0knlYZbqyEIYxkFdpDUS6roBDMgAGhkAqd92kEcgyeMo2MM366gpLNHjfKrhJPN
396 396 vdBCHAEDsYzAvzkHKxy5KWBAmh5e1nFttGChpsxrgmutRG0YrsSLWEBH9h95cbZEKFeUKYykRXHa
397 397 Bkt2OSgELsqqnWKeMudBR+YSZCOSHrwPz7B/Gfou7/L6QV6S0IgclBCitBVHMxMFq/vGwp5WHezM
398 398 JwhKTnH0OkMbmVjrAkQKR7VM2aNSXn+GzLOCzOQm0AJ1TLCpdSgnfFPcY7mGxAOyHXS1YEFVi5O9
399 399 I4EVBBd8VRgN4n1MAm8l6QQ+yB60hkeX/0ZZmKoQRINkEBxEDZU2HjIZMcwWRvZtbRIa5kgkGIb/
400 400 SkImFwIkDtQxyX+LuSKcKEg+6pgKgA==
401 401 --===============*==-- (glob)
402 402
403 403 with a specific bundle type
404 404 (binary part must be different)
405 405
406 406 $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
407 407 > -c bar -s test -r tip -b --desc description \
408 408 > --config patchbomb.bundletype=gzip-v1 | filterboundary
409 409 searching for changes
410 410 1 changesets found
411 411
412 412 displaying test ...
413 413 Content-Type: multipart/mixed; boundary="===*==" (glob)
414 414 MIME-Version: 1.0
415 415 Subject: test
416 416 Message-Id: <patchbomb.180@test-hostname>
417 417 User-Agent: Mercurial-patchbomb/* (glob)
418 418 Date: Thu, 01 Jan 1970 00:03:00 +0000
419 419 From: quux
420 420 To: foo
421 421 Cc: bar
422 422
423 423 --===*= (glob)
424 424 MIME-Version: 1.0
425 425 Content-Type: text/plain; charset="us-ascii"
426 426 Content-Transfer-Encoding: 7bit
427 427
428 428 a multiline
429 429
430 430 description
431 431
432 432 --===*= (glob)
433 433 Content-Type: application/x-mercurial-bundle
434 434 MIME-Version: 1.0
435 435 Content-Disposition: attachment; filename="bundle.hg"
436 436 Content-Transfer-Encoding: base64
437 437
438 438 SEcxMEdaeJxjYGBY8V9n/iLGbtFfJZuNk/euDCpWfrRy/vTrevFCx1/4t7J5LdeL0ix0Opx3kwEL
439 439 wKYXKqUJwqnG5sYWSWmmJsaWlqYWaRaWJpaWiWamZpYWRgZGxolJiabmSQbmZqlcQMV6QGwCxGzG
440 440 CgZcySARUyA2A2LGZKiZ3Y+Lu786z4z4MWXmsrAZCsqrl1az5y21PMcjpbThzWeXGT+/nutbmvvz
441 441 zXYS3BoGxdrJDIYmlimJJiZpRokmqYYmaSYWFknmSSkmhqbmliamiZYWxuYmBhbJBgZcUBNZQe5K
442 442 Epm7xF/LT+RLx/a9juFTomaYO/Rgsx4rwBN+IMCUDLOKAQBrsmti
443 443 (?)
444 444 --===============*==-- (glob)
445 445
446 446 utf-8 patch:
447 447 $ "$PYTHON" -c 'fp = open("utf", "wb"); fp.write(b"h\xC3\xB6mma!\n"); fp.close();'
448 448 $ hg commit -A -d '4 0' \
449 449 > --encoding "utf-8" \
450 450 > -m `"$PYTHON" -c 'import sys; getattr(sys.stdout, "buffer", sys.stdout).write(b"\xc3\xa7a")'`
451 451 adding description
452 452 adding utf
453 453
454 454 no mime encoding for email --test:
455 455 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n
456 456 this patch series consists of 1 patches.
457 457
458 458
459 459 displaying [PATCH] ?a ...
460 460 MIME-Version: 1.0
461 461 Content-Type: text/plain; charset="iso-8859-1"
462 462 Content-Transfer-Encoding: quoted-printable
463 463 Subject: [PATCH] ?a
464 464 X-Mercurial-Node: f81ef97829467e868fc405fccbcfa66217e4d3e6
465 465 X-Mercurial-Series-Index: 1
466 466 X-Mercurial-Series-Total: 1
467 467 Message-Id: <f81ef97829467e868fc4.240@test-hostname>
468 468 X-Mercurial-Series-Id: <f81ef97829467e868fc4.240@test-hostname>
469 469 User-Agent: Mercurial-patchbomb/* (glob)
470 470 Date: Thu, 01 Jan 1970 00:04:00 +0000
471 471 From: quux
472 472 To: foo
473 473 Cc: bar
474 474
475 475 # HG changeset patch
476 476 # User test
477 477 # Date 4 0
478 478 # Thu Jan 01 00:00:04 1970 +0000
479 479 # Node ID f81ef97829467e868fc405fccbcfa66217e4d3e6
480 480 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
481 481 ?a
482 482
483 483 diff -r ff2c9fa2018b -r f81ef9782946 description
484 484 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
485 485 +++ b/description Thu Jan 01 00:00:04 1970 +0000
486 486 @@ -0,0 +1,3 @@
487 487 +a multiline
488 488 +
489 489 +description
490 490 diff -r ff2c9fa2018b -r f81ef9782946 utf
491 491 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
492 492 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
493 493 @@ -0,0 +1,1 @@
494 494 +h=C3=B6mma!
495 495
496 496
497 497 mime encoded mbox (base64):
498 498 $ hg email --date '1970-1-1 0:4' -f 'Q <quux>' -t foo -c bar -r tip -m mbox
499 499 this patch series consists of 1 patches.
500 500
501 501
502 502 sending [PATCH] ?a ...
503 503
504 504 $ cat mbox
505 505 From quux ... ... .. ..:..:.. .... (re)
506 506 MIME-Version: 1.0
507 507 Content-Type: text/plain; charset="utf-8"
508 508 Content-Transfer-Encoding: base64
509 509 Subject: [PATCH] ?a
510 510 X-Mercurial-Node: f81ef97829467e868fc405fccbcfa66217e4d3e6
511 511 X-Mercurial-Series-Index: 1
512 512 X-Mercurial-Series-Total: 1
513 513 Message-Id: <f81ef97829467e868fc4.240@test-hostname>
514 514 X-Mercurial-Series-Id: <f81ef97829467e868fc4.240@test-hostname>
515 515 User-Agent: Mercurial-patchbomb/* (glob)
516 516 Date: Thu, 01 Jan 1970 00:04:00 +0000
517 517 From: Q <quux> (no-py3 !)
518 518 From: =?iso-8859-1?q?Q?= <quux> (py3 !)
519 519 To: foo
520 520 Cc: bar
521 521
522 522 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojICAgICAgVGh1IEph
523 523 biAwMSAwMDowMDowNCAxOTcwICswMDAwCiMgTm9kZSBJRCBmODFlZjk3ODI5NDY3ZTg2OGZjNDA1
524 524 ZmNjYmNmYTY2MjE3ZTRkM2U2CiMgUGFyZW50ICBmZjJjOWZhMjAxOGIxNWZhNzRiMzMzNjNiZGE5
525 525 NTI3MzIzZTJhOTlmCj9hCgpkaWZmIC1yIGZmMmM5ZmEyMDE4YiAtciBmODFlZjk3ODI5NDYgZGVz
526 526 Y3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUgSmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysr
527 527 IGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs
528 528 MyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3JpcHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIg
529 529 ZjgxZWY5NzgyOTQ2IHV0ZgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
530 530 MDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs
531 531 MSBAQAoraMO2bW1hIQo=
532 532
533 533
534 534 >>> import base64
535 535 >>> patch = base64.b64decode(open("mbox").read().split("\n\n")[1])
536 536 >>> if not isinstance(patch, str):
537 537 ... import sys
538 538 ... sys.stdout.flush()
539 539 ... junk = sys.stdout.buffer.write(patch + b"\n")
540 540 ... else:
541 541 ... print(patch)
542 542 # HG changeset patch
543 543 # User test
544 544 # Date 4 0
545 545 # Thu Jan 01 00:00:04 1970 +0000
546 546 # Node ID f81ef97829467e868fc405fccbcfa66217e4d3e6
547 547 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
548 548 ?a
549 549
550 550 diff -r ff2c9fa2018b -r f81ef9782946 description
551 551 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
552 552 +++ b/description Thu Jan 01 00:00:04 1970 +0000
553 553 @@ -0,0 +1,3 @@
554 554 +a multiline
555 555 +
556 556 +description
557 557 diff -r ff2c9fa2018b -r f81ef9782946 utf
558 558 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
559 559 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
560 560 @@ -0,0 +1,1 @@
561 561 +h\xc3\xb6mma! (esc)
562 562
563 563 $ rm mbox
564 564
565 565 mime encoded mbox (quoted-printable):
566 566 $ "$PYTHON" -c 'fp = open("long", "wb"); fp.write(b"%s\nfoo\n\nbar\n" % (b"x" * 1024)); fp.close();'
567 567 $ hg commit -A -d '4 0' -m 'long line'
568 568 adding long
569 569
570 570 no mime encoding for email --test:
571 571 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n
572 572 this patch series consists of 1 patches.
573 573
574 574
575 575 displaying [PATCH] long line ...
576 576 MIME-Version: 1.0
577 577 Content-Type: text/plain; charset="us-ascii"
578 578 Content-Transfer-Encoding: quoted-printable
579 579 Subject: [PATCH] long line
580 580 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
581 581 X-Mercurial-Series-Index: 1
582 582 X-Mercurial-Series-Total: 1
583 583 Message-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
584 584 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
585 585 User-Agent: Mercurial-patchbomb/* (glob)
586 586 Date: Thu, 01 Jan 1970 00:04:00 +0000
587 587 From: quux
588 588 To: foo
589 589 Cc: bar
590 590
591 591 # HG changeset patch
592 592 # User test
593 593 # Date 4 0
594 594 # Thu Jan 01 00:00:04 1970 +0000
595 595 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
596 596 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
597 597 long line
598 598
599 599 diff -r f81ef9782946 -r 0c7b871cb86b long
600 600 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
601 601 +++ b/long Thu Jan 01 00:00:04 1970 +0000
602 602 @@ -0,0 +1,4 @@
603 603 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
604 604 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
605 605 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
606 606 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
607 607 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
608 608 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
609 609 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
610 610 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
611 611 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
612 612 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
613 613 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
614 614 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
615 615 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
616 616 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
617 617 +foo
618 618 +
619 619 +bar
620 620
621 621
622 622 mime encoded mbox (quoted-printable):
623 623 $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
624 624 this patch series consists of 1 patches.
625 625
626 626
627 627 sending [PATCH] long line ...
628 628 $ cat mbox
629 629 From quux ... ... .. ..:..:.. .... (re)
630 630 MIME-Version: 1.0
631 631 Content-Type: text/plain; charset="us-ascii"
632 632 Content-Transfer-Encoding: quoted-printable
633 633 Subject: [PATCH] long line
634 634 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
635 635 X-Mercurial-Series-Index: 1
636 636 X-Mercurial-Series-Total: 1
637 637 Message-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
638 638 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.240@test-hostname>
639 639 User-Agent: Mercurial-patchbomb/* (glob)
640 640 Date: Thu, 01 Jan 1970 00:04:00 +0000
641 641 From: quux
642 642 To: foo
643 643 Cc: bar
644 644
645 645 # HG changeset patch
646 646 # User test
647 647 # Date 4 0
648 648 # Thu Jan 01 00:00:04 1970 +0000
649 649 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
650 650 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
651 651 long line
652 652
653 653 diff -r f81ef9782946 -r 0c7b871cb86b long
654 654 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
655 655 +++ b/long Thu Jan 01 00:00:04 1970 +0000
656 656 @@ -0,0 +1,4 @@
657 657 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
658 658 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
659 659 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
660 660 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
661 661 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
662 662 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
663 663 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
664 664 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
665 665 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
666 666 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
667 667 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
668 668 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
669 669 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
670 670 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
671 671 +foo
672 672 +
673 673 +bar
674 674
675 675
676 676
677 677 $ rm mbox
678 678
679 679 iso-8859-1 patch:
680 680 $ "$PYTHON" -c 'fp = open("isolatin", "wb"); fp.write(b"h\xF6mma!\n"); fp.close();'
681 681 $ hg commit -A -d '5 0' -m 'isolatin 8-bit encoding'
682 682 adding isolatin
683 683
684 684 iso-8859-1 mbox:
685 685 $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
686 686 this patch series consists of 1 patches.
687 687
688 688
689 689 sending [PATCH] isolatin 8-bit encoding ...
690 690 $ cat mbox
691 691 From quux ... ... .. ..:..:.. .... (re)
692 692 MIME-Version: 1.0
693 693 Content-Type: text/plain; charset="iso-8859-1"
694 694 Content-Transfer-Encoding: quoted-printable
695 695 Subject: [PATCH] isolatin 8-bit encoding
696 696 X-Mercurial-Node: 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
697 697 X-Mercurial-Series-Index: 1
698 698 X-Mercurial-Series-Total: 1
699 699 Message-Id: <4d6f44f466c96d89f2e7.300@test-hostname>
700 700 X-Mercurial-Series-Id: <4d6f44f466c96d89f2e7.300@test-hostname>
701 701 User-Agent: Mercurial-patchbomb/* (glob)
702 702 Date: Thu, 01 Jan 1970 00:05:00 +0000
703 703 From: quux
704 704 To: foo
705 705 Cc: bar
706 706
707 707 # HG changeset patch
708 708 # User test
709 709 # Date 5 0
710 710 # Thu Jan 01 00:00:05 1970 +0000
711 711 # Node ID 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
712 712 # Parent 0c7b871cb86b61a1c07e244393603c361e4a178d
713 713 isolatin 8-bit encoding
714 714
715 715 diff -r 0c7b871cb86b -r 4d6f44f466c9 isolatin
716 716 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
717 717 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
718 718 @@ -0,0 +1,1 @@
719 719 +h=F6mma!
720 720
721 721
722 722
723 723 test diffstat for single patch:
724 724 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2
725 725 this patch series consists of 1 patches.
726 726
727 727
728 728 Final summary:
729 729
730 730 From: quux
731 731 To: foo
732 732 Cc: bar
733 733 Subject: [PATCH] test
734 734 c | 1 +
735 735 1 files changed, 1 insertions(+), 0 deletions(-)
736 736
737 737 are you sure you want to send (yn)? y
738 738
739 739 displaying [PATCH] test ...
740 740 MIME-Version: 1.0
741 741 Content-Type: text/plain; charset="us-ascii"
742 742 Content-Transfer-Encoding: 7bit
743 743 Subject: [PATCH] test
744 744 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
745 745 X-Mercurial-Series-Index: 1
746 746 X-Mercurial-Series-Total: 1
747 747 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
748 748 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
749 749 User-Agent: Mercurial-patchbomb/* (glob)
750 750 Date: Thu, 01 Jan 1970 00:01:00 +0000
751 751 From: quux
752 752 To: foo
753 753 Cc: bar
754 754
755 755 c | 1 +
756 756 1 files changed, 1 insertions(+), 0 deletions(-)
757 757
758 758
759 759 # HG changeset patch
760 760 # User test
761 761 # Date 3 0
762 762 # Thu Jan 01 00:00:03 1970 +0000
763 763 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
764 764 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
765 765 c
766 766
767 767 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
768 768 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
769 769 +++ b/c Thu Jan 01 00:00:03 1970 +0000
770 770 @@ -0,0 +1,1 @@
771 771 +c
772 772
773 773
774 774 test diffstat for multiple patches:
775 775 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \
776 776 > -r 0:1
777 777 this patch series consists of 2 patches.
778 778
779 779
780 780 Write the introductory message for the patch series.
781 781
782 782
783 783 Final summary:
784 784
785 785 From: quux
786 786 To: foo
787 787 Cc: bar
788 788 Subject: [PATCH 0 of 2] test
789 789 a | 1 +
790 790 b | 1 +
791 791 2 files changed, 2 insertions(+), 0 deletions(-)
792 792 Subject: [PATCH 1 of 2] a
793 793 a | 1 +
794 794 1 files changed, 1 insertions(+), 0 deletions(-)
795 795 Subject: [PATCH 2 of 2] b
796 796 b | 1 +
797 797 1 files changed, 1 insertions(+), 0 deletions(-)
798 798
799 799 are you sure you want to send (yn)? y
800 800
801 801 displaying [PATCH 0 of 2] test ...
802 802 MIME-Version: 1.0
803 803 Content-Type: text/plain; charset="us-ascii"
804 804 Content-Transfer-Encoding: 7bit
805 805 Subject: [PATCH 0 of 2] test
806 806 Message-Id: <patchbomb.60@test-hostname>
807 807 User-Agent: Mercurial-patchbomb/* (glob)
808 808 Date: Thu, 01 Jan 1970 00:01:00 +0000
809 809 From: quux
810 810 To: foo
811 811 Cc: bar
812 812
813 813
814 814 a | 1 +
815 815 b | 1 +
816 816 2 files changed, 2 insertions(+), 0 deletions(-)
817 817
818 818 displaying [PATCH 1 of 2] a ...
819 819 MIME-Version: 1.0
820 820 Content-Type: text/plain; charset="us-ascii"
821 821 Content-Transfer-Encoding: 7bit
822 822 Subject: [PATCH 1 of 2] a
823 823 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
824 824 X-Mercurial-Series-Index: 1
825 825 X-Mercurial-Series-Total: 2
826 826 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
827 827 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
828 828 In-Reply-To: <patchbomb.60@test-hostname>
829 829 References: <patchbomb.60@test-hostname>
830 830 User-Agent: Mercurial-patchbomb/* (glob)
831 831 Date: Thu, 01 Jan 1970 00:01:01 +0000
832 832 From: quux
833 833 To: foo
834 834 Cc: bar
835 835
836 836 a | 1 +
837 837 1 files changed, 1 insertions(+), 0 deletions(-)
838 838
839 839
840 840 # HG changeset patch
841 841 # User test
842 842 # Date 1 0
843 843 # Thu Jan 01 00:00:01 1970 +0000
844 844 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
845 845 # Parent 0000000000000000000000000000000000000000
846 846 a
847 847
848 848 diff -r 000000000000 -r 8580ff50825a a
849 849 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
850 850 +++ b/a Thu Jan 01 00:00:01 1970 +0000
851 851 @@ -0,0 +1,1 @@
852 852 +a
853 853
854 854 displaying [PATCH 2 of 2] b ...
855 855 MIME-Version: 1.0
856 856 Content-Type: text/plain; charset="us-ascii"
857 857 Content-Transfer-Encoding: 7bit
858 858 Subject: [PATCH 2 of 2] b
859 859 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
860 860 X-Mercurial-Series-Index: 2
861 861 X-Mercurial-Series-Total: 2
862 862 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
863 863 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
864 864 In-Reply-To: <patchbomb.60@test-hostname>
865 865 References: <patchbomb.60@test-hostname>
866 866 User-Agent: Mercurial-patchbomb/* (glob)
867 867 Date: Thu, 01 Jan 1970 00:01:02 +0000
868 868 From: quux
869 869 To: foo
870 870 Cc: bar
871 871
872 872 b | 1 +
873 873 1 files changed, 1 insertions(+), 0 deletions(-)
874 874
875 875
876 876 # HG changeset patch
877 877 # User test
878 878 # Date 2 0
879 879 # Thu Jan 01 00:00:02 1970 +0000
880 880 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
881 881 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
882 882 b
883 883
884 884 diff -r 8580ff50825a -r 97d72e5f12c7 b
885 885 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
886 886 +++ b/b Thu Jan 01 00:00:02 1970 +0000
887 887 @@ -0,0 +1,1 @@
888 888 +b
889 889
890 890
891 891 test inline for single patch:
892 892 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | filterboundary
893 893 this patch series consists of 1 patches.
894 894
895 895
896 896 displaying [PATCH] test ...
897 897 Content-Type: multipart/mixed; boundary="===*==" (glob)
898 898 MIME-Version: 1.0
899 899 Subject: [PATCH] test
900 900 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
901 901 X-Mercurial-Series-Index: 1
902 902 X-Mercurial-Series-Total: 1
903 903 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
904 904 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
905 905 User-Agent: Mercurial-patchbomb/* (glob)
906 906 Date: Thu, 01 Jan 1970 00:01:00 +0000
907 907 From: quux
908 908 To: foo
909 909 Cc: bar
910 910
911 911 --===*= (glob)
912 912 MIME-Version: 1.0
913 913 Content-Type: text/x-patch; charset="us-ascii"
914 914 Content-Transfer-Encoding: 7bit
915 915 Content-Disposition: inline; filename=t2.patch
916 916
917 917 # HG changeset patch
918 918 # User test
919 919 # Date 3 0
920 920 # Thu Jan 01 00:00:03 1970 +0000
921 921 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
922 922 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
923 923 c
924 924
925 925 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
926 926 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
927 927 +++ b/c Thu Jan 01 00:00:03 1970 +0000
928 928 @@ -0,0 +1,1 @@
929 929 +c
930 930
931 931 --===*=-- (glob)
932 932
933 933
934 934 test inline for single patch (quoted-printable):
935 935 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | filterboundary
936 936 this patch series consists of 1 patches.
937 937
938 938
939 939 displaying [PATCH] test ...
940 940 Content-Type: multipart/mixed; boundary="===*==" (glob)
941 941 MIME-Version: 1.0
942 942 Subject: [PATCH] test
943 943 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
944 944 X-Mercurial-Series-Index: 1
945 945 X-Mercurial-Series-Total: 1
946 946 Message-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
947 947 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
948 948 User-Agent: Mercurial-patchbomb/* (glob)
949 949 Date: Thu, 01 Jan 1970 00:01:00 +0000
950 950 From: quux
951 951 To: foo
952 952 Cc: bar
953 953
954 954 --===*= (glob)
955 955 MIME-Version: 1.0
956 956 Content-Type: text/x-patch; charset="us-ascii"
957 957 Content-Transfer-Encoding: quoted-printable
958 958 Content-Disposition: inline; filename=t2.patch
959 959
960 960 # HG changeset patch
961 961 # User test
962 962 # Date 4 0
963 963 # Thu Jan 01 00:00:04 1970 +0000
964 964 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
965 965 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
966 966 long line
967 967
968 968 diff -r f81ef9782946 -r 0c7b871cb86b long
969 969 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
970 970 +++ b/long Thu Jan 01 00:00:04 1970 +0000
971 971 @@ -0,0 +1,4 @@
972 972 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
973 973 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
974 974 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
975 975 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
976 976 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
977 977 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
978 978 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
979 979 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
980 980 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
981 981 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
982 982 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
983 983 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
984 984 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
985 985 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
986 986 +foo
987 987 +
988 988 +bar
989 989
990 990 --===*=-- (glob)
991 991
992 992 test inline for multiple patches:
993 993 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
994 994 > -r 0:1 -r 4 | filterboundary
995 995 this patch series consists of 3 patches.
996 996
997 997
998 998 Write the introductory message for the patch series.
999 999
1000 1000
1001 1001 displaying [PATCH 0 of 3] test ...
1002 1002 MIME-Version: 1.0
1003 1003 Content-Type: text/plain; charset="us-ascii"
1004 1004 Content-Transfer-Encoding: 7bit
1005 1005 Subject: [PATCH 0 of 3] test
1006 1006 Message-Id: <patchbomb.60@test-hostname>
1007 1007 User-Agent: Mercurial-patchbomb/* (glob)
1008 1008 Date: Thu, 01 Jan 1970 00:01:00 +0000
1009 1009 From: quux
1010 1010 To: foo
1011 1011 Cc: bar
1012 1012
1013 1013
1014 1014 displaying [PATCH 1 of 3] a ...
1015 1015 Content-Type: multipart/mixed; boundary="===*==" (glob)
1016 1016 MIME-Version: 1.0
1017 1017 Subject: [PATCH 1 of 3] a
1018 1018 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1019 1019 X-Mercurial-Series-Index: 1
1020 1020 X-Mercurial-Series-Total: 3
1021 1021 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1022 1022 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1023 1023 In-Reply-To: <patchbomb.60@test-hostname>
1024 1024 References: <patchbomb.60@test-hostname>
1025 1025 User-Agent: Mercurial-patchbomb/* (glob)
1026 1026 Date: Thu, 01 Jan 1970 00:01:01 +0000
1027 1027 From: quux
1028 1028 To: foo
1029 1029 Cc: bar
1030 1030
1031 1031 --===*= (glob)
1032 1032 MIME-Version: 1.0
1033 1033 Content-Type: text/x-patch; charset="us-ascii"
1034 1034 Content-Transfer-Encoding: 7bit
1035 1035 Content-Disposition: inline; filename=t2-1.patch
1036 1036
1037 1037 # HG changeset patch
1038 1038 # User test
1039 1039 # Date 1 0
1040 1040 # Thu Jan 01 00:00:01 1970 +0000
1041 1041 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1042 1042 # Parent 0000000000000000000000000000000000000000
1043 1043 a
1044 1044
1045 1045 diff -r 000000000000 -r 8580ff50825a a
1046 1046 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1047 1047 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1048 1048 @@ -0,0 +1,1 @@
1049 1049 +a
1050 1050
1051 1051 --===*=-- (glob)
1052 1052 displaying [PATCH 2 of 3] b ...
1053 1053 Content-Type: multipart/mixed; boundary="===*==" (glob)
1054 1054 MIME-Version: 1.0
1055 1055 Subject: [PATCH 2 of 3] b
1056 1056 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1057 1057 X-Mercurial-Series-Index: 2
1058 1058 X-Mercurial-Series-Total: 3
1059 1059 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1060 1060 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1061 1061 In-Reply-To: <patchbomb.60@test-hostname>
1062 1062 References: <patchbomb.60@test-hostname>
1063 1063 User-Agent: Mercurial-patchbomb/* (glob)
1064 1064 Date: Thu, 01 Jan 1970 00:01:02 +0000
1065 1065 From: quux
1066 1066 To: foo
1067 1067 Cc: bar
1068 1068
1069 1069 --===*= (glob)
1070 1070 MIME-Version: 1.0
1071 1071 Content-Type: text/x-patch; charset="us-ascii"
1072 1072 Content-Transfer-Encoding: 7bit
1073 1073 Content-Disposition: inline; filename=t2-2.patch
1074 1074
1075 1075 # HG changeset patch
1076 1076 # User test
1077 1077 # Date 2 0
1078 1078 # Thu Jan 01 00:00:02 1970 +0000
1079 1079 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1080 1080 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1081 1081 b
1082 1082
1083 1083 diff -r 8580ff50825a -r 97d72e5f12c7 b
1084 1084 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1085 1085 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1086 1086 @@ -0,0 +1,1 @@
1087 1087 +b
1088 1088
1089 1089 --===*=-- (glob)
1090 1090 displaying [PATCH 3 of 3] long line ...
1091 1091 Content-Type: multipart/mixed; boundary="===*==" (glob)
1092 1092 MIME-Version: 1.0
1093 1093 Subject: [PATCH 3 of 3] long line
1094 1094 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
1095 1095 X-Mercurial-Series-Index: 3
1096 1096 X-Mercurial-Series-Total: 3
1097 1097 Message-Id: <0c7b871cb86b61a1c07e.63@test-hostname>
1098 1098 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1099 1099 In-Reply-To: <patchbomb.60@test-hostname>
1100 1100 References: <patchbomb.60@test-hostname>
1101 1101 User-Agent: Mercurial-patchbomb/* (glob)
1102 1102 Date: Thu, 01 Jan 1970 00:01:03 +0000
1103 1103 From: quux
1104 1104 To: foo
1105 1105 Cc: bar
1106 1106
1107 1107 --===*= (glob)
1108 1108 MIME-Version: 1.0
1109 1109 Content-Type: text/x-patch; charset="us-ascii"
1110 1110 Content-Transfer-Encoding: quoted-printable
1111 1111 Content-Disposition: inline; filename=t2-3.patch
1112 1112
1113 1113 # HG changeset patch
1114 1114 # User test
1115 1115 # Date 4 0
1116 1116 # Thu Jan 01 00:00:04 1970 +0000
1117 1117 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1118 1118 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1119 1119 long line
1120 1120
1121 1121 diff -r f81ef9782946 -r 0c7b871cb86b long
1122 1122 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1123 1123 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1124 1124 @@ -0,0 +1,4 @@
1125 1125 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1126 1126 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1127 1127 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1128 1128 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1129 1129 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1130 1130 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1131 1131 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1132 1132 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1133 1133 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1134 1134 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1135 1135 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1136 1136 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1137 1137 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1138 1138 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1139 1139 +foo
1140 1140 +
1141 1141 +bar
1142 1142
1143 1143 --===*=-- (glob)
1144 1144
1145 1145 test attach for single patch:
1146 1146 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | filterboundary
1147 1147 this patch series consists of 1 patches.
1148 1148
1149 1149
1150 1150 displaying [PATCH] test ...
1151 1151 Content-Type: multipart/mixed; boundary="===*==" (glob)
1152 1152 MIME-Version: 1.0
1153 1153 Subject: [PATCH] test
1154 1154 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1155 1155 X-Mercurial-Series-Index: 1
1156 1156 X-Mercurial-Series-Total: 1
1157 1157 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1158 1158 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1159 1159 User-Agent: Mercurial-patchbomb/* (glob)
1160 1160 Date: Thu, 01 Jan 1970 00:01:00 +0000
1161 1161 From: quux
1162 1162 To: foo
1163 1163 Cc: bar
1164 1164
1165 1165 --===*= (glob)
1166 1166 MIME-Version: 1.0
1167 1167 Content-Type: text/plain; charset="us-ascii"
1168 1168 Content-Transfer-Encoding: 7bit
1169 1169
1170 1170 Patch subject is complete summary.
1171 1171
1172 1172
1173 1173
1174 1174 --===*= (glob)
1175 1175 MIME-Version: 1.0
1176 1176 Content-Type: text/x-patch; charset="us-ascii"
1177 1177 Content-Transfer-Encoding: 7bit
1178 1178 Content-Disposition: attachment; filename=t2.patch
1179 1179
1180 1180 # HG changeset patch
1181 1181 # User test
1182 1182 # Date 3 0
1183 1183 # Thu Jan 01 00:00:03 1970 +0000
1184 1184 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1185 1185 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1186 1186 c
1187 1187
1188 1188 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1189 1189 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1190 1190 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1191 1191 @@ -0,0 +1,1 @@
1192 1192 +c
1193 1193
1194 1194 --===*=-- (glob)
1195 1195
1196 1196 test attach for single patch (quoted-printable):
1197 1197 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | filterboundary
1198 1198 this patch series consists of 1 patches.
1199 1199
1200 1200
1201 1201 displaying [PATCH] test ...
1202 1202 Content-Type: multipart/mixed; boundary="===*==" (glob)
1203 1203 MIME-Version: 1.0
1204 1204 Subject: [PATCH] test
1205 1205 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
1206 1206 X-Mercurial-Series-Index: 1
1207 1207 X-Mercurial-Series-Total: 1
1208 1208 Message-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
1209 1209 X-Mercurial-Series-Id: <0c7b871cb86b61a1c07e.60@test-hostname>
1210 1210 User-Agent: Mercurial-patchbomb/* (glob)
1211 1211 Date: Thu, 01 Jan 1970 00:01:00 +0000
1212 1212 From: quux
1213 1213 To: foo
1214 1214 Cc: bar
1215 1215
1216 1216 --===*= (glob)
1217 1217 MIME-Version: 1.0
1218 1218 Content-Type: text/plain; charset="us-ascii"
1219 1219 Content-Transfer-Encoding: 7bit
1220 1220
1221 1221 Patch subject is complete summary.
1222 1222
1223 1223
1224 1224
1225 1225 --===*= (glob)
1226 1226 MIME-Version: 1.0
1227 1227 Content-Type: text/x-patch; charset="us-ascii"
1228 1228 Content-Transfer-Encoding: quoted-printable
1229 1229 Content-Disposition: attachment; filename=t2.patch
1230 1230
1231 1231 # HG changeset patch
1232 1232 # User test
1233 1233 # Date 4 0
1234 1234 # Thu Jan 01 00:00:04 1970 +0000
1235 1235 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1236 1236 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1237 1237 long line
1238 1238
1239 1239 diff -r f81ef9782946 -r 0c7b871cb86b long
1240 1240 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1241 1241 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1242 1242 @@ -0,0 +1,4 @@
1243 1243 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1244 1244 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1245 1245 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1246 1246 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1247 1247 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1248 1248 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1249 1249 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1250 1250 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1251 1251 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1252 1252 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1253 1253 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1254 1254 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1255 1255 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1256 1256 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1257 1257 +foo
1258 1258 +
1259 1259 +bar
1260 1260
1261 1261 --===*=-- (glob)
1262 1262
1263 1263 test attach and body for single patch:
1264 1264 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2 | filterboundary
1265 1265 this patch series consists of 1 patches.
1266 1266
1267 1267
1268 1268 displaying [PATCH] test ...
1269 1269 Content-Type: multipart/mixed; boundary="===*==" (glob)
1270 1270 MIME-Version: 1.0
1271 1271 Subject: [PATCH] test
1272 1272 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1273 1273 X-Mercurial-Series-Index: 1
1274 1274 X-Mercurial-Series-Total: 1
1275 1275 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1276 1276 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1277 1277 User-Agent: Mercurial-patchbomb/* (glob)
1278 1278 Date: Thu, 01 Jan 1970 00:01:00 +0000
1279 1279 From: quux
1280 1280 To: foo
1281 1281 Cc: bar
1282 1282
1283 1283 --===*= (glob)
1284 1284 MIME-Version: 1.0
1285 1285 Content-Type: text/plain; charset="us-ascii"
1286 1286 Content-Transfer-Encoding: 7bit
1287 1287
1288 1288 # HG changeset patch
1289 1289 # User test
1290 1290 # Date 3 0
1291 1291 # Thu Jan 01 00:00:03 1970 +0000
1292 1292 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1293 1293 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1294 1294 c
1295 1295
1296 1296 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1297 1297 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1298 1298 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1299 1299 @@ -0,0 +1,1 @@
1300 1300 +c
1301 1301
1302 1302 --===*= (glob)
1303 1303 MIME-Version: 1.0
1304 1304 Content-Type: text/x-patch; charset="us-ascii"
1305 1305 Content-Transfer-Encoding: 7bit
1306 1306 Content-Disposition: attachment; filename=t2.patch
1307 1307
1308 1308 # HG changeset patch
1309 1309 # User test
1310 1310 # Date 3 0
1311 1311 # Thu Jan 01 00:00:03 1970 +0000
1312 1312 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1313 1313 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1314 1314 c
1315 1315
1316 1316 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1317 1317 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1318 1318 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1319 1319 @@ -0,0 +1,1 @@
1320 1320 +c
1321 1321
1322 1322 --===*=-- (glob)
1323 1323
1324 1324 test attach for multiple patches:
1325 1325 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
1326 1326 > -r 0:1 -r 4 | filterboundary
1327 1327 this patch series consists of 3 patches.
1328 1328
1329 1329
1330 1330 Write the introductory message for the patch series.
1331 1331
1332 1332
1333 1333 displaying [PATCH 0 of 3] test ...
1334 1334 MIME-Version: 1.0
1335 1335 Content-Type: text/plain; charset="us-ascii"
1336 1336 Content-Transfer-Encoding: 7bit
1337 1337 Subject: [PATCH 0 of 3] test
1338 1338 Message-Id: <patchbomb.60@test-hostname>
1339 1339 User-Agent: Mercurial-patchbomb/* (glob)
1340 1340 Date: Thu, 01 Jan 1970 00:01:00 +0000
1341 1341 From: quux
1342 1342 To: foo
1343 1343 Cc: bar
1344 1344
1345 1345
1346 1346 displaying [PATCH 1 of 3] a ...
1347 1347 Content-Type: multipart/mixed; boundary="===*==" (glob)
1348 1348 MIME-Version: 1.0
1349 1349 Subject: [PATCH 1 of 3] a
1350 1350 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1351 1351 X-Mercurial-Series-Index: 1
1352 1352 X-Mercurial-Series-Total: 3
1353 1353 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1354 1354 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1355 1355 In-Reply-To: <patchbomb.60@test-hostname>
1356 1356 References: <patchbomb.60@test-hostname>
1357 1357 User-Agent: Mercurial-patchbomb/* (glob)
1358 1358 Date: Thu, 01 Jan 1970 00:01:01 +0000
1359 1359 From: quux
1360 1360 To: foo
1361 1361 Cc: bar
1362 1362
1363 1363 --===*= (glob)
1364 1364 MIME-Version: 1.0
1365 1365 Content-Type: text/plain; charset="us-ascii"
1366 1366 Content-Transfer-Encoding: 7bit
1367 1367
1368 1368 Patch subject is complete summary.
1369 1369
1370 1370
1371 1371
1372 1372 --===*= (glob)
1373 1373 MIME-Version: 1.0
1374 1374 Content-Type: text/x-patch; charset="us-ascii"
1375 1375 Content-Transfer-Encoding: 7bit
1376 1376 Content-Disposition: attachment; filename=t2-1.patch
1377 1377
1378 1378 # HG changeset patch
1379 1379 # User test
1380 1380 # Date 1 0
1381 1381 # Thu Jan 01 00:00:01 1970 +0000
1382 1382 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1383 1383 # Parent 0000000000000000000000000000000000000000
1384 1384 a
1385 1385
1386 1386 diff -r 000000000000 -r 8580ff50825a a
1387 1387 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1388 1388 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1389 1389 @@ -0,0 +1,1 @@
1390 1390 +a
1391 1391
1392 1392 --===*=-- (glob)
1393 1393 displaying [PATCH 2 of 3] b ...
1394 1394 Content-Type: multipart/mixed; boundary="===*==" (glob)
1395 1395 MIME-Version: 1.0
1396 1396 Subject: [PATCH 2 of 3] b
1397 1397 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1398 1398 X-Mercurial-Series-Index: 2
1399 1399 X-Mercurial-Series-Total: 3
1400 1400 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1401 1401 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1402 1402 In-Reply-To: <patchbomb.60@test-hostname>
1403 1403 References: <patchbomb.60@test-hostname>
1404 1404 User-Agent: Mercurial-patchbomb/* (glob)
1405 1405 Date: Thu, 01 Jan 1970 00:01:02 +0000
1406 1406 From: quux
1407 1407 To: foo
1408 1408 Cc: bar
1409 1409
1410 1410 --===*= (glob)
1411 1411 MIME-Version: 1.0
1412 1412 Content-Type: text/plain; charset="us-ascii"
1413 1413 Content-Transfer-Encoding: 7bit
1414 1414
1415 1415 Patch subject is complete summary.
1416 1416
1417 1417
1418 1418
1419 1419 --===*= (glob)
1420 1420 MIME-Version: 1.0
1421 1421 Content-Type: text/x-patch; charset="us-ascii"
1422 1422 Content-Transfer-Encoding: 7bit
1423 1423 Content-Disposition: attachment; filename=t2-2.patch
1424 1424
1425 1425 # HG changeset patch
1426 1426 # User test
1427 1427 # Date 2 0
1428 1428 # Thu Jan 01 00:00:02 1970 +0000
1429 1429 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1430 1430 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1431 1431 b
1432 1432
1433 1433 diff -r 8580ff50825a -r 97d72e5f12c7 b
1434 1434 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1435 1435 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1436 1436 @@ -0,0 +1,1 @@
1437 1437 +b
1438 1438
1439 1439 --===*=-- (glob)
1440 1440 displaying [PATCH 3 of 3] long line ...
1441 1441 Content-Type: multipart/mixed; boundary="===*==" (glob)
1442 1442 MIME-Version: 1.0
1443 1443 Subject: [PATCH 3 of 3] long line
1444 1444 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
1445 1445 X-Mercurial-Series-Index: 3
1446 1446 X-Mercurial-Series-Total: 3
1447 1447 Message-Id: <0c7b871cb86b61a1c07e.63@test-hostname>
1448 1448 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1449 1449 In-Reply-To: <patchbomb.60@test-hostname>
1450 1450 References: <patchbomb.60@test-hostname>
1451 1451 User-Agent: Mercurial-patchbomb/* (glob)
1452 1452 Date: Thu, 01 Jan 1970 00:01:03 +0000
1453 1453 From: quux
1454 1454 To: foo
1455 1455 Cc: bar
1456 1456
1457 1457 --===*= (glob)
1458 1458 MIME-Version: 1.0
1459 1459 Content-Type: text/plain; charset="us-ascii"
1460 1460 Content-Transfer-Encoding: 7bit
1461 1461
1462 1462 Patch subject is complete summary.
1463 1463
1464 1464
1465 1465
1466 1466 --===*= (glob)
1467 1467 MIME-Version: 1.0
1468 1468 Content-Type: text/x-patch; charset="us-ascii"
1469 1469 Content-Transfer-Encoding: quoted-printable
1470 1470 Content-Disposition: attachment; filename=t2-3.patch
1471 1471
1472 1472 # HG changeset patch
1473 1473 # User test
1474 1474 # Date 4 0
1475 1475 # Thu Jan 01 00:00:04 1970 +0000
1476 1476 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
1477 1477 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
1478 1478 long line
1479 1479
1480 1480 diff -r f81ef9782946 -r 0c7b871cb86b long
1481 1481 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1482 1482 +++ b/long Thu Jan 01 00:00:04 1970 +0000
1483 1483 @@ -0,0 +1,4 @@
1484 1484 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1485 1485 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1486 1486 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1487 1487 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1488 1488 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1489 1489 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1490 1490 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1491 1491 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1492 1492 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1493 1493 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1494 1494 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1495 1495 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1496 1496 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
1497 1497 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1498 1498 +foo
1499 1499 +
1500 1500 +bar
1501 1501
1502 1502 --===*=-- (glob)
1503 1503
1504 1504 test intro for single patch:
1505 1505 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1506 1506 > -r 2
1507 1507 this patch series consists of 1 patches.
1508 1508
1509 1509
1510 1510 Write the introductory message for the patch series.
1511 1511
1512 1512
1513 1513 displaying [PATCH 0 of 1] test ...
1514 1514 MIME-Version: 1.0
1515 1515 Content-Type: text/plain; charset="us-ascii"
1516 1516 Content-Transfer-Encoding: 7bit
1517 1517 Subject: [PATCH 0 of 1] test
1518 1518 Message-Id: <patchbomb.60@test-hostname>
1519 1519 User-Agent: Mercurial-patchbomb/* (glob)
1520 1520 Date: Thu, 01 Jan 1970 00:01:00 +0000
1521 1521 From: quux
1522 1522 To: foo
1523 1523 Cc: bar
1524 1524
1525 1525
1526 1526 displaying [PATCH 1 of 1] c ...
1527 1527 MIME-Version: 1.0
1528 1528 Content-Type: text/plain; charset="us-ascii"
1529 1529 Content-Transfer-Encoding: 7bit
1530 1530 Subject: [PATCH 1 of 1] c
1531 1531 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1532 1532 X-Mercurial-Series-Index: 1
1533 1533 X-Mercurial-Series-Total: 1
1534 1534 Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1535 1535 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1536 1536 In-Reply-To: <patchbomb.60@test-hostname>
1537 1537 References: <patchbomb.60@test-hostname>
1538 1538 User-Agent: Mercurial-patchbomb/* (glob)
1539 1539 Date: Thu, 01 Jan 1970 00:01:01 +0000
1540 1540 From: quux
1541 1541 To: foo
1542 1542 Cc: bar
1543 1543
1544 1544 # HG changeset patch
1545 1545 # User test
1546 1546 # Date 3 0
1547 1547 # Thu Jan 01 00:00:03 1970 +0000
1548 1548 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1549 1549 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1550 1550 c
1551 1551
1552 1552 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1553 1553 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1554 1554 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1555 1555 @@ -0,0 +1,1 @@
1556 1556 +c
1557 1557
1558 1558
1559 1559 test --desc without --intro for a single patch:
1560 1560 $ echo foo > intro.text
1561 1561 $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \
1562 1562 > -s test -r 2
1563 1563 this patch series consists of 1 patches.
1564 1564
1565 1565
1566 1566 displaying [PATCH 0 of 1] test ...
1567 1567 MIME-Version: 1.0
1568 1568 Content-Type: text/plain; charset="us-ascii"
1569 1569 Content-Transfer-Encoding: 7bit
1570 1570 Subject: [PATCH 0 of 1] test
1571 1571 Message-Id: <patchbomb.60@test-hostname>
1572 1572 User-Agent: Mercurial-patchbomb/* (glob)
1573 1573 Date: Thu, 01 Jan 1970 00:01:00 +0000
1574 1574 From: quux
1575 1575 To: foo
1576 1576 Cc: bar
1577 1577
1578 1578 foo
1579 1579
1580 1580 displaying [PATCH 1 of 1] c ...
1581 1581 MIME-Version: 1.0
1582 1582 Content-Type: text/plain; charset="us-ascii"
1583 1583 Content-Transfer-Encoding: 7bit
1584 1584 Subject: [PATCH 1 of 1] c
1585 1585 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1586 1586 X-Mercurial-Series-Index: 1
1587 1587 X-Mercurial-Series-Total: 1
1588 1588 Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1589 1589 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname>
1590 1590 In-Reply-To: <patchbomb.60@test-hostname>
1591 1591 References: <patchbomb.60@test-hostname>
1592 1592 User-Agent: Mercurial-patchbomb/* (glob)
1593 1593 Date: Thu, 01 Jan 1970 00:01:01 +0000
1594 1594 From: quux
1595 1595 To: foo
1596 1596 Cc: bar
1597 1597
1598 1598 # HG changeset patch
1599 1599 # User test
1600 1600 # Date 3 0
1601 1601 # Thu Jan 01 00:00:03 1970 +0000
1602 1602 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1603 1603 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1604 1604 c
1605 1605
1606 1606 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1607 1607 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1608 1608 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1609 1609 @@ -0,0 +1,1 @@
1610 1610 +c
1611 1611
1612 1612
1613 1613 test intro for multiple patches:
1614 1614 $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
1615 1615 > -r 0:1
1616 1616 this patch series consists of 2 patches.
1617 1617
1618 1618
1619 1619 Write the introductory message for the patch series.
1620 1620
1621 1621
1622 1622 displaying [PATCH 0 of 2] test ...
1623 1623 MIME-Version: 1.0
1624 1624 Content-Type: text/plain; charset="us-ascii"
1625 1625 Content-Transfer-Encoding: 7bit
1626 1626 Subject: [PATCH 0 of 2] test
1627 1627 Message-Id: <patchbomb.60@test-hostname>
1628 1628 User-Agent: Mercurial-patchbomb/* (glob)
1629 1629 Date: Thu, 01 Jan 1970 00:01:00 +0000
1630 1630 From: quux
1631 1631 To: foo
1632 1632 Cc: bar
1633 1633
1634 1634
1635 1635 displaying [PATCH 1 of 2] a ...
1636 1636 MIME-Version: 1.0
1637 1637 Content-Type: text/plain; charset="us-ascii"
1638 1638 Content-Transfer-Encoding: 7bit
1639 1639 Subject: [PATCH 1 of 2] a
1640 1640 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1641 1641 X-Mercurial-Series-Index: 1
1642 1642 X-Mercurial-Series-Total: 2
1643 1643 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1644 1644 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1645 1645 In-Reply-To: <patchbomb.60@test-hostname>
1646 1646 References: <patchbomb.60@test-hostname>
1647 1647 User-Agent: Mercurial-patchbomb/* (glob)
1648 1648 Date: Thu, 01 Jan 1970 00:01:01 +0000
1649 1649 From: quux
1650 1650 To: foo
1651 1651 Cc: bar
1652 1652
1653 1653 # HG changeset patch
1654 1654 # User test
1655 1655 # Date 1 0
1656 1656 # Thu Jan 01 00:00:01 1970 +0000
1657 1657 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1658 1658 # Parent 0000000000000000000000000000000000000000
1659 1659 a
1660 1660
1661 1661 diff -r 000000000000 -r 8580ff50825a a
1662 1662 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1663 1663 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1664 1664 @@ -0,0 +1,1 @@
1665 1665 +a
1666 1666
1667 1667 displaying [PATCH 2 of 2] b ...
1668 1668 MIME-Version: 1.0
1669 1669 Content-Type: text/plain; charset="us-ascii"
1670 1670 Content-Transfer-Encoding: 7bit
1671 1671 Subject: [PATCH 2 of 2] b
1672 1672 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1673 1673 X-Mercurial-Series-Index: 2
1674 1674 X-Mercurial-Series-Total: 2
1675 1675 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1676 1676 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1677 1677 In-Reply-To: <patchbomb.60@test-hostname>
1678 1678 References: <patchbomb.60@test-hostname>
1679 1679 User-Agent: Mercurial-patchbomb/* (glob)
1680 1680 Date: Thu, 01 Jan 1970 00:01:02 +0000
1681 1681 From: quux
1682 1682 To: foo
1683 1683 Cc: bar
1684 1684
1685 1685 # HG changeset patch
1686 1686 # User test
1687 1687 # Date 2 0
1688 1688 # Thu Jan 01 00:00:02 1970 +0000
1689 1689 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1690 1690 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1691 1691 b
1692 1692
1693 1693 diff -r 8580ff50825a -r 97d72e5f12c7 b
1694 1694 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1695 1695 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1696 1696 @@ -0,0 +1,1 @@
1697 1697 +b
1698 1698
1699 1699
1700 1700 test reply-to via config:
1701 1701 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1702 1702 > --config patchbomb.reply-to='baz@example.com'
1703 1703 this patch series consists of 1 patches.
1704 1704
1705 1705
1706 1706 displaying [PATCH] test ...
1707 1707 MIME-Version: 1.0
1708 1708 Content-Type: text/plain; charset="us-ascii"
1709 1709 Content-Transfer-Encoding: 7bit
1710 1710 Subject: [PATCH] test
1711 1711 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1712 1712 X-Mercurial-Series-Index: 1
1713 1713 X-Mercurial-Series-Total: 1
1714 1714 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1715 1715 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1716 1716 User-Agent: Mercurial-patchbomb/* (glob)
1717 1717 Date: Thu, 01 Jan 1970 00:01:00 +0000
1718 1718 From: quux
1719 1719 To: foo
1720 1720 Cc: bar
1721 1721 Reply-To: baz@example.com
1722 1722
1723 1723 # HG changeset patch
1724 1724 # User test
1725 1725 # Date 3 0
1726 1726 # Thu Jan 01 00:00:03 1970 +0000
1727 1727 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1728 1728 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1729 1729 c
1730 1730
1731 1731 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1732 1732 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1733 1733 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1734 1734 @@ -0,0 +1,1 @@
1735 1735 +c
1736 1736
1737 1737
1738 1738 test reply-to via command line:
1739 1739 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
1740 1740 > --reply-to baz --reply-to fred
1741 1741 this patch series consists of 1 patches.
1742 1742
1743 1743
1744 1744 displaying [PATCH] test ...
1745 1745 MIME-Version: 1.0
1746 1746 Content-Type: text/plain; charset="us-ascii"
1747 1747 Content-Transfer-Encoding: 7bit
1748 1748 Subject: [PATCH] test
1749 1749 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1750 1750 X-Mercurial-Series-Index: 1
1751 1751 X-Mercurial-Series-Total: 1
1752 1752 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1753 1753 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1754 1754 User-Agent: Mercurial-patchbomb/* (glob)
1755 1755 Date: Thu, 01 Jan 1970 00:01:00 +0000
1756 1756 From: quux
1757 1757 To: foo
1758 1758 Cc: bar
1759 1759 Reply-To: baz, fred
1760 1760
1761 1761 # HG changeset patch
1762 1762 # User test
1763 1763 # Date 3 0
1764 1764 # Thu Jan 01 00:00:03 1970 +0000
1765 1765 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1766 1766 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1767 1767 c
1768 1768
1769 1769 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1770 1770 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1771 1771 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1772 1772 @@ -0,0 +1,1 @@
1773 1773 +c
1774 1774
1775 1775
1776 1776 tagging csets:
1777 1777 $ hg tag -r0 zero zero.foo
1778 1778 $ hg tag -r1 one one.patch
1779 1779 $ hg tag -r2 two two.diff
1780 1780
1781 1781 test inline for single named patch:
1782 1782 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
1783 1783 > -r 2 | filterboundary
1784 1784 this patch series consists of 1 patches.
1785 1785
1786 1786
1787 1787 displaying [PATCH] test ...
1788 1788 Content-Type: multipart/mixed; boundary="===*==" (glob)
1789 1789 MIME-Version: 1.0
1790 1790 Subject: [PATCH] test
1791 1791 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
1792 1792 X-Mercurial-Series-Index: 1
1793 1793 X-Mercurial-Series-Total: 1
1794 1794 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1795 1795 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
1796 1796 User-Agent: Mercurial-patchbomb/* (glob)
1797 1797 Date: Thu, 01 Jan 1970 00:01:00 +0000
1798 1798 From: quux
1799 1799 To: foo
1800 1800 Cc: bar
1801 1801
1802 1802 --===*= (glob)
1803 1803 MIME-Version: 1.0
1804 1804 Content-Type: text/x-patch; charset="us-ascii"
1805 1805 Content-Transfer-Encoding: 7bit
1806 1806 Content-Disposition: inline; filename=two.diff
1807 1807
1808 1808 # HG changeset patch
1809 1809 # User test
1810 1810 # Date 3 0
1811 1811 # Thu Jan 01 00:00:03 1970 +0000
1812 1812 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
1813 1813 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1814 1814 c
1815 1815
1816 1816 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
1817 1817 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1818 1818 +++ b/c Thu Jan 01 00:00:03 1970 +0000
1819 1819 @@ -0,0 +1,1 @@
1820 1820 +c
1821 1821
1822 1822 --===*=-- (glob)
1823 1823
1824 1824 test inline for multiple named/unnamed patches:
1825 1825 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
1826 1826 > -r 0:1 | filterboundary
1827 1827 this patch series consists of 2 patches.
1828 1828
1829 1829
1830 1830 Write the introductory message for the patch series.
1831 1831
1832 1832
1833 1833 displaying [PATCH 0 of 2] test ...
1834 1834 MIME-Version: 1.0
1835 1835 Content-Type: text/plain; charset="us-ascii"
1836 1836 Content-Transfer-Encoding: 7bit
1837 1837 Subject: [PATCH 0 of 2] test
1838 1838 Message-Id: <patchbomb.60@test-hostname>
1839 1839 User-Agent: Mercurial-patchbomb/* (glob)
1840 1840 Date: Thu, 01 Jan 1970 00:01:00 +0000
1841 1841 From: quux
1842 1842 To: foo
1843 1843 Cc: bar
1844 1844
1845 1845
1846 1846 displaying [PATCH 1 of 2] a ...
1847 1847 Content-Type: multipart/mixed; boundary="===*==" (glob)
1848 1848 MIME-Version: 1.0
1849 1849 Subject: [PATCH 1 of 2] a
1850 1850 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1851 1851 X-Mercurial-Series-Index: 1
1852 1852 X-Mercurial-Series-Total: 2
1853 1853 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
1854 1854 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1855 1855 In-Reply-To: <patchbomb.60@test-hostname>
1856 1856 References: <patchbomb.60@test-hostname>
1857 1857 User-Agent: Mercurial-patchbomb/* (glob)
1858 1858 Date: Thu, 01 Jan 1970 00:01:01 +0000
1859 1859 From: quux
1860 1860 To: foo
1861 1861 Cc: bar
1862 1862
1863 1863 --===*= (glob)
1864 1864 MIME-Version: 1.0
1865 1865 Content-Type: text/x-patch; charset="us-ascii"
1866 1866 Content-Transfer-Encoding: 7bit
1867 1867 Content-Disposition: inline; filename=t2-1.patch
1868 1868
1869 1869 # HG changeset patch
1870 1870 # User test
1871 1871 # Date 1 0
1872 1872 # Thu Jan 01 00:00:01 1970 +0000
1873 1873 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1874 1874 # Parent 0000000000000000000000000000000000000000
1875 1875 a
1876 1876
1877 1877 diff -r 000000000000 -r 8580ff50825a a
1878 1878 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1879 1879 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1880 1880 @@ -0,0 +1,1 @@
1881 1881 +a
1882 1882
1883 1883 --===*=-- (glob)
1884 1884 displaying [PATCH 2 of 2] b ...
1885 1885 Content-Type: multipart/mixed; boundary="===*==" (glob)
1886 1886 MIME-Version: 1.0
1887 1887 Subject: [PATCH 2 of 2] b
1888 1888 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1889 1889 X-Mercurial-Series-Index: 2
1890 1890 X-Mercurial-Series-Total: 2
1891 1891 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
1892 1892 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
1893 1893 In-Reply-To: <patchbomb.60@test-hostname>
1894 1894 References: <patchbomb.60@test-hostname>
1895 1895 User-Agent: Mercurial-patchbomb/* (glob)
1896 1896 Date: Thu, 01 Jan 1970 00:01:02 +0000
1897 1897 From: quux
1898 1898 To: foo
1899 1899 Cc: bar
1900 1900
1901 1901 --===*= (glob)
1902 1902 MIME-Version: 1.0
1903 1903 Content-Type: text/x-patch; charset="us-ascii"
1904 1904 Content-Transfer-Encoding: 7bit
1905 1905 Content-Disposition: inline; filename=one.patch
1906 1906
1907 1907 # HG changeset patch
1908 1908 # User test
1909 1909 # Date 2 0
1910 1910 # Thu Jan 01 00:00:02 1970 +0000
1911 1911 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1912 1912 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1913 1913 b
1914 1914
1915 1915 diff -r 8580ff50825a -r 97d72e5f12c7 b
1916 1916 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1917 1917 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1918 1918 @@ -0,0 +1,1 @@
1919 1919 +b
1920 1920
1921 1921 --===*=-- (glob)
1922 1922
1923 1923
1924 1924 test inreplyto:
1925 1925 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1926 1926 > -r tip
1927 1927 this patch series consists of 1 patches.
1928 1928
1929 1929
1930 1930 displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
1931 1931 MIME-Version: 1.0
1932 1932 Content-Type: text/plain; charset="us-ascii"
1933 1933 Content-Transfer-Encoding: 7bit
1934 1934 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
1935 1935 X-Mercurial-Node: 9cea7492c36bdda2c72e7dd5f35f7fc367adeb2c
1936 1936 X-Mercurial-Series-Index: 1
1937 1937 X-Mercurial-Series-Total: 1
1938 1938 Message-Id: <9cea7492c36bdda2c72e.60@test-hostname>
1939 1939 X-Mercurial-Series-Id: <9cea7492c36bdda2c72e.60@test-hostname>
1940 1940 In-Reply-To: <baz>
1941 1941 References: <baz>
1942 1942 User-Agent: Mercurial-patchbomb/* (glob)
1943 1943 Date: Thu, 01 Jan 1970 00:01:00 +0000
1944 1944 From: quux
1945 1945 To: foo
1946 1946 Cc: bar
1947 1947
1948 1948 # HG changeset patch
1949 1949 # User test
1950 1950 # Date 0 0
1951 1951 # Thu Jan 01 00:00:00 1970 +0000
1952 1952 # Node ID 9cea7492c36bdda2c72e7dd5f35f7fc367adeb2c
1953 1953 # Parent 3b775b32716d9b54291ccddf0a36ceea45449bfb
1954 1954 Added tag two, two.diff for changeset ff2c9fa2018b
1955 1955
1956 1956 diff -r 3b775b32716d -r 9cea7492c36b .hgtags
1957 1957 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
1958 1958 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
1959 1959 @@ -2,3 +2,5 @@
1960 1960 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
1961 1961 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
1962 1962 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
1963 1963 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1964 1964 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1965 1965
1966 1966 no intro message in non-interactive mode
1967 1967 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1968 1968 > -r 0:1
1969 1969 this patch series consists of 2 patches.
1970 1970
1971 1971 (optional) Subject: [PATCH 0 of 2]
1972 1972
1973 1973 displaying [PATCH 1 of 2] a ...
1974 1974 MIME-Version: 1.0
1975 1975 Content-Type: text/plain; charset="us-ascii"
1976 1976 Content-Transfer-Encoding: 7bit
1977 1977 Subject: [PATCH 1 of 2] a
1978 1978 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1979 1979 X-Mercurial-Series-Index: 1
1980 1980 X-Mercurial-Series-Total: 2
1981 1981 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
1982 1982 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
1983 1983 In-Reply-To: <baz>
1984 1984 References: <baz>
1985 1985 User-Agent: Mercurial-patchbomb/* (glob)
1986 1986 Date: Thu, 01 Jan 1970 00:01:00 +0000
1987 1987 From: quux
1988 1988 To: foo
1989 1989 Cc: bar
1990 1990
1991 1991 # HG changeset patch
1992 1992 # User test
1993 1993 # Date 1 0
1994 1994 # Thu Jan 01 00:00:01 1970 +0000
1995 1995 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1996 1996 # Parent 0000000000000000000000000000000000000000
1997 1997 a
1998 1998
1999 1999 diff -r 000000000000 -r 8580ff50825a a
2000 2000 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2001 2001 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2002 2002 @@ -0,0 +1,1 @@
2003 2003 +a
2004 2004
2005 2005 displaying [PATCH 2 of 2] b ...
2006 2006 MIME-Version: 1.0
2007 2007 Content-Type: text/plain; charset="us-ascii"
2008 2008 Content-Transfer-Encoding: 7bit
2009 2009 Subject: [PATCH 2 of 2] b
2010 2010 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2011 2011 X-Mercurial-Series-Index: 2
2012 2012 X-Mercurial-Series-Total: 2
2013 2013 Message-Id: <97d72e5f12c7e84f8506.61@test-hostname>
2014 2014 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
2015 2015 In-Reply-To: <baz>
2016 2016 References: <baz>
2017 2017 User-Agent: Mercurial-patchbomb/* (glob)
2018 2018 Date: Thu, 01 Jan 1970 00:01:01 +0000
2019 2019 From: quux
2020 2020 To: foo
2021 2021 Cc: bar
2022 2022
2023 2023 # HG changeset patch
2024 2024 # User test
2025 2025 # Date 2 0
2026 2026 # Thu Jan 01 00:00:02 1970 +0000
2027 2027 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2028 2028 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2029 2029 b
2030 2030
2031 2031 diff -r 8580ff50825a -r 97d72e5f12c7 b
2032 2032 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2033 2033 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2034 2034 @@ -0,0 +1,1 @@
2035 2035 +b
2036 2036
2037 2037
2038 2038
2039 2039
2040 2040 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
2041 2041 > -s test -r 0:1
2042 2042 this patch series consists of 2 patches.
2043 2043
2044 2044
2045 2045 Write the introductory message for the patch series.
2046 2046
2047 2047
2048 2048 displaying [PATCH 0 of 2] test ...
2049 2049 MIME-Version: 1.0
2050 2050 Content-Type: text/plain; charset="us-ascii"
2051 2051 Content-Transfer-Encoding: 7bit
2052 2052 Subject: [PATCH 0 of 2] test
2053 2053 Message-Id: <patchbomb.60@test-hostname>
2054 2054 In-Reply-To: <baz>
2055 2055 References: <baz>
2056 2056 User-Agent: Mercurial-patchbomb/* (glob)
2057 2057 Date: Thu, 01 Jan 1970 00:01:00 +0000
2058 2058 From: quux
2059 2059 To: foo
2060 2060 Cc: bar
2061 2061
2062 2062
2063 2063 displaying [PATCH 1 of 2] a ...
2064 2064 MIME-Version: 1.0
2065 2065 Content-Type: text/plain; charset="us-ascii"
2066 2066 Content-Transfer-Encoding: 7bit
2067 2067 Subject: [PATCH 1 of 2] a
2068 2068 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2069 2069 X-Mercurial-Series-Index: 1
2070 2070 X-Mercurial-Series-Total: 2
2071 2071 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2072 2072 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2073 2073 In-Reply-To: <patchbomb.60@test-hostname>
2074 2074 References: <patchbomb.60@test-hostname>
2075 2075 User-Agent: Mercurial-patchbomb/* (glob)
2076 2076 Date: Thu, 01 Jan 1970 00:01:01 +0000
2077 2077 From: quux
2078 2078 To: foo
2079 2079 Cc: bar
2080 2080
2081 2081 # HG changeset patch
2082 2082 # User test
2083 2083 # Date 1 0
2084 2084 # Thu Jan 01 00:00:01 1970 +0000
2085 2085 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2086 2086 # Parent 0000000000000000000000000000000000000000
2087 2087 a
2088 2088
2089 2089 diff -r 000000000000 -r 8580ff50825a a
2090 2090 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2091 2091 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2092 2092 @@ -0,0 +1,1 @@
2093 2093 +a
2094 2094
2095 2095 displaying [PATCH 2 of 2] b ...
2096 2096 MIME-Version: 1.0
2097 2097 Content-Type: text/plain; charset="us-ascii"
2098 2098 Content-Transfer-Encoding: 7bit
2099 2099 Subject: [PATCH 2 of 2] b
2100 2100 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2101 2101 X-Mercurial-Series-Index: 2
2102 2102 X-Mercurial-Series-Total: 2
2103 2103 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2104 2104 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2105 2105 In-Reply-To: <patchbomb.60@test-hostname>
2106 2106 References: <patchbomb.60@test-hostname>
2107 2107 User-Agent: Mercurial-patchbomb/* (glob)
2108 2108 Date: Thu, 01 Jan 1970 00:01:02 +0000
2109 2109 From: quux
2110 2110 To: foo
2111 2111 Cc: bar
2112 2112
2113 2113 # HG changeset patch
2114 2114 # User test
2115 2115 # Date 2 0
2116 2116 # Thu Jan 01 00:00:02 1970 +0000
2117 2117 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2118 2118 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2119 2119 b
2120 2120
2121 2121 diff -r 8580ff50825a -r 97d72e5f12c7 b
2122 2122 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2123 2123 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2124 2124 @@ -0,0 +1,1 @@
2125 2125 +b
2126 2126
2127 2127
2128 2128 test single flag for single patch (and no warning when not mailing dirty rev):
2129 2129 $ hg up -qr1
2130 2130 $ echo dirt > a
2131 2131 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
2132 2132 > -r 2 | filterboundary
2133 2133 this patch series consists of 1 patches.
2134 2134
2135 2135
2136 2136 displaying [PATCH fooFlag] test ...
2137 2137 MIME-Version: 1.0
2138 2138 Content-Type: text/plain; charset="us-ascii"
2139 2139 Content-Transfer-Encoding: 7bit
2140 2140 Subject: [PATCH fooFlag] test
2141 2141 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2142 2142 X-Mercurial-Series-Index: 1
2143 2143 X-Mercurial-Series-Total: 1
2144 2144 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2145 2145 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2146 2146 User-Agent: Mercurial-patchbomb/* (glob)
2147 2147 Date: Thu, 01 Jan 1970 00:01:00 +0000
2148 2148 From: quux
2149 2149 To: foo
2150 2150 Cc: bar
2151 2151
2152 2152 # HG changeset patch
2153 2153 # User test
2154 2154 # Date 3 0
2155 2155 # Thu Jan 01 00:00:03 1970 +0000
2156 2156 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
2157 2157 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2158 2158 c
2159 2159
2160 2160 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
2161 2161 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2162 2162 +++ b/c Thu Jan 01 00:00:03 1970 +0000
2163 2163 @@ -0,0 +1,1 @@
2164 2164 +c
2165 2165
2166 2166
2167 2167 test single flag for multiple patches (and warning when mailing dirty rev):
2168 2168 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
2169 2169 > -r 0:1
2170 2170 warning: working directory has uncommitted changes
2171 2171 this patch series consists of 2 patches.
2172 2172
2173 2173
2174 2174 Write the introductory message for the patch series.
2175 2175
2176 2176
2177 2177 displaying [PATCH 0 of 2 fooFlag] test ...
2178 2178 MIME-Version: 1.0
2179 2179 Content-Type: text/plain; charset="us-ascii"
2180 2180 Content-Transfer-Encoding: 7bit
2181 2181 Subject: [PATCH 0 of 2 fooFlag] test
2182 2182 Message-Id: <patchbomb.60@test-hostname>
2183 2183 User-Agent: Mercurial-patchbomb/* (glob)
2184 2184 Date: Thu, 01 Jan 1970 00:01:00 +0000
2185 2185 From: quux
2186 2186 To: foo
2187 2187 Cc: bar
2188 2188
2189 2189
2190 2190 displaying [PATCH 1 of 2 fooFlag] a ...
2191 2191 MIME-Version: 1.0
2192 2192 Content-Type: text/plain; charset="us-ascii"
2193 2193 Content-Transfer-Encoding: 7bit
2194 2194 Subject: [PATCH 1 of 2 fooFlag] a
2195 2195 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2196 2196 X-Mercurial-Series-Index: 1
2197 2197 X-Mercurial-Series-Total: 2
2198 2198 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2199 2199 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2200 2200 In-Reply-To: <patchbomb.60@test-hostname>
2201 2201 References: <patchbomb.60@test-hostname>
2202 2202 User-Agent: Mercurial-patchbomb/* (glob)
2203 2203 Date: Thu, 01 Jan 1970 00:01:01 +0000
2204 2204 From: quux
2205 2205 To: foo
2206 2206 Cc: bar
2207 2207
2208 2208 # HG changeset patch
2209 2209 # User test
2210 2210 # Date 1 0
2211 2211 # Thu Jan 01 00:00:01 1970 +0000
2212 2212 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2213 2213 # Parent 0000000000000000000000000000000000000000
2214 2214 a
2215 2215
2216 2216 diff -r 000000000000 -r 8580ff50825a a
2217 2217 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2218 2218 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2219 2219 @@ -0,0 +1,1 @@
2220 2220 +a
2221 2221
2222 2222 displaying [PATCH 2 of 2 fooFlag] b ...
2223 2223 MIME-Version: 1.0
2224 2224 Content-Type: text/plain; charset="us-ascii"
2225 2225 Content-Transfer-Encoding: 7bit
2226 2226 Subject: [PATCH 2 of 2 fooFlag] b
2227 2227 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2228 2228 X-Mercurial-Series-Index: 2
2229 2229 X-Mercurial-Series-Total: 2
2230 2230 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2231 2231 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2232 2232 In-Reply-To: <patchbomb.60@test-hostname>
2233 2233 References: <patchbomb.60@test-hostname>
2234 2234 User-Agent: Mercurial-patchbomb/* (glob)
2235 2235 Date: Thu, 01 Jan 1970 00:01:02 +0000
2236 2236 From: quux
2237 2237 To: foo
2238 2238 Cc: bar
2239 2239
2240 2240 # HG changeset patch
2241 2241 # User test
2242 2242 # Date 2 0
2243 2243 # Thu Jan 01 00:00:02 1970 +0000
2244 2244 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2245 2245 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2246 2246 b
2247 2247
2248 2248 diff -r 8580ff50825a -r 97d72e5f12c7 b
2249 2249 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2250 2250 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2251 2251 @@ -0,0 +1,1 @@
2252 2252 +b
2253 2253
2254 2254 $ hg revert --no-b a
2255 2255 $ hg up -q
2256 2256
2257 2257 test multiple flags for single patch:
2258 2258 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
2259 2259 > -c bar -s test -r 2
2260 2260 this patch series consists of 1 patches.
2261 2261
2262 2262
2263 2263 displaying [PATCH fooFlag barFlag] test ...
2264 2264 MIME-Version: 1.0
2265 2265 Content-Type: text/plain; charset="us-ascii"
2266 2266 Content-Transfer-Encoding: 7bit
2267 2267 Subject: [PATCH fooFlag barFlag] test
2268 2268 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2269 2269 X-Mercurial-Series-Index: 1
2270 2270 X-Mercurial-Series-Total: 1
2271 2271 Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2272 2272 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname>
2273 2273 User-Agent: Mercurial-patchbomb/* (glob)
2274 2274 Date: Thu, 01 Jan 1970 00:01:00 +0000
2275 2275 From: quux
2276 2276 To: foo
2277 2277 Cc: bar
2278 2278
2279 2279 # HG changeset patch
2280 2280 # User test
2281 2281 # Date 3 0
2282 2282 # Thu Jan 01 00:00:03 1970 +0000
2283 2283 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
2284 2284 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2285 2285 c
2286 2286
2287 2287 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
2288 2288 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2289 2289 +++ b/c Thu Jan 01 00:00:03 1970 +0000
2290 2290 @@ -0,0 +1,1 @@
2291 2291 +c
2292 2292
2293 2293
2294 2294 test multiple flags for multiple patches:
2295 2295 $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
2296 2296 > -c bar -s test -r 0:1
2297 2297 this patch series consists of 2 patches.
2298 2298
2299 2299
2300 2300 Write the introductory message for the patch series.
2301 2301
2302 2302
2303 2303 displaying [PATCH 0 of 2 fooFlag barFlag] test ...
2304 2304 MIME-Version: 1.0
2305 2305 Content-Type: text/plain; charset="us-ascii"
2306 2306 Content-Transfer-Encoding: 7bit
2307 2307 Subject: [PATCH 0 of 2 fooFlag barFlag] test
2308 2308 Message-Id: <patchbomb.60@test-hostname>
2309 2309 User-Agent: Mercurial-patchbomb/* (glob)
2310 2310 Date: Thu, 01 Jan 1970 00:01:00 +0000
2311 2311 From: quux
2312 2312 To: foo
2313 2313 Cc: bar
2314 2314
2315 2315
2316 2316 displaying [PATCH 1 of 2 fooFlag barFlag] a ...
2317 2317 MIME-Version: 1.0
2318 2318 Content-Type: text/plain; charset="us-ascii"
2319 2319 Content-Transfer-Encoding: 7bit
2320 2320 Subject: [PATCH 1 of 2 fooFlag barFlag] a
2321 2321 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2322 2322 X-Mercurial-Series-Index: 1
2323 2323 X-Mercurial-Series-Total: 2
2324 2324 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2325 2325 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2326 2326 In-Reply-To: <patchbomb.60@test-hostname>
2327 2327 References: <patchbomb.60@test-hostname>
2328 2328 User-Agent: Mercurial-patchbomb/* (glob)
2329 2329 Date: Thu, 01 Jan 1970 00:01:01 +0000
2330 2330 From: quux
2331 2331 To: foo
2332 2332 Cc: bar
2333 2333
2334 2334 # HG changeset patch
2335 2335 # User test
2336 2336 # Date 1 0
2337 2337 # Thu Jan 01 00:00:01 1970 +0000
2338 2338 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2339 2339 # Parent 0000000000000000000000000000000000000000
2340 2340 a
2341 2341
2342 2342 diff -r 000000000000 -r 8580ff50825a a
2343 2343 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2344 2344 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2345 2345 @@ -0,0 +1,1 @@
2346 2346 +a
2347 2347
2348 2348 displaying [PATCH 2 of 2 fooFlag barFlag] b ...
2349 2349 MIME-Version: 1.0
2350 2350 Content-Type: text/plain; charset="us-ascii"
2351 2351 Content-Transfer-Encoding: 7bit
2352 2352 Subject: [PATCH 2 of 2 fooFlag barFlag] b
2353 2353 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2354 2354 X-Mercurial-Series-Index: 2
2355 2355 X-Mercurial-Series-Total: 2
2356 2356 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2357 2357 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2358 2358 In-Reply-To: <patchbomb.60@test-hostname>
2359 2359 References: <patchbomb.60@test-hostname>
2360 2360 User-Agent: Mercurial-patchbomb/* (glob)
2361 2361 Date: Thu, 01 Jan 1970 00:01:02 +0000
2362 2362 From: quux
2363 2363 To: foo
2364 2364 Cc: bar
2365 2365
2366 2366 # HG changeset patch
2367 2367 # User test
2368 2368 # Date 2 0
2369 2369 # Thu Jan 01 00:00:02 1970 +0000
2370 2370 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2371 2371 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2372 2372 b
2373 2373
2374 2374 diff -r 8580ff50825a -r 97d72e5f12c7 b
2375 2375 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2376 2376 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2377 2377 @@ -0,0 +1,1 @@
2378 2378 +b
2379 2379
2380 2380
2381 2381 test multi-address parsing:
2382 2382 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \
2383 2383 > -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \
2384 2384 > --config email.bcc='"Quux, A." <quux>'
2385 2385 this patch series consists of 1 patches.
2386 2386
2387 2387
2388 2388 sending [PATCH] test ...
2389 2389 $ cat < tmp.mbox
2390 2390 From quux ... ... .. ..:..:.. .... (re)
2391 2391 MIME-Version: 1.0
2392 2392 Content-Type: text/plain; charset="us-ascii"
2393 2393 Content-Transfer-Encoding: 7bit
2394 2394 Subject: [PATCH] test
2395 2395 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2396 2396 X-Mercurial-Series-Index: 1
2397 2397 X-Mercurial-Series-Total: 1
2398 2398 Message-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2399 2399 X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2400 2400 User-Agent: Mercurial-patchbomb/* (glob)
2401 2401 Date: Tue, 01 Jan 1980 00:01:00 +0000
2402 2402 From: quux
2403 2403 To: spam <spam>, eggs, toast (no-py3 !)
2404 2404 Cc: foo, bar@example.com, "A, B <>" <a@example.com> (no-py3 !)
2405 2405 Bcc: "Quux, A." <quux> (no-py3 !)
2406 2406 To: =?iso-8859-1?q?spam?= <spam>, eggs, toast (py3 !)
2407 2407 Cc: foo, bar@example.com, =?iso-8859-1?q?A=2C_B_=3C=3E?= <a@example.com> (py3 !)
2408 2408 Bcc: =?iso-8859-1?q?Quux=2C_A=2E?= <quux> (py3 !)
2409 2409
2410 2410 # HG changeset patch
2411 2411 # User test
2412 2412 # Date 1 0
2413 2413 # Thu Jan 01 00:00:01 1970 +0000
2414 2414 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2415 2415 # Parent 0000000000000000000000000000000000000000
2416 2416 a
2417 2417
2418 2418 diff -r 000000000000 -r 8580ff50825a a
2419 2419 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2420 2420 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2421 2421 @@ -0,0 +1,1 @@
2422 2422 +a
2423 2423
2424 2424
2425 2425
2426 2426 test flag template:
2427 2427 $ echo foo > intro.text
2428 2428 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0:1 \
2429 2429 > --desc intro.text --subject test \
2430 2430 > --config patchbomb.flagtemplate='R{rev}'
2431 2431 this patch series consists of 2 patches.
2432 2432
2433 2433 Cc:
2434 2434
2435 2435 displaying [PATCH 0 of 2 R1] test ...
2436 2436 MIME-Version: 1.0
2437 2437 Content-Type: text/plain; charset="us-ascii"
2438 2438 Content-Transfer-Encoding: 7bit
2439 2439 Subject: [PATCH 0 of 2 R1] test
2440 2440 Message-Id: <patchbomb.60@test-hostname>
2441 2441 User-Agent: Mercurial-patchbomb/* (glob)
2442 2442 Date: Thu, 01 Jan 1970 00:01:00 +0000
2443 2443 From: quux
2444 2444 To: foo
2445 2445
2446 2446 foo
2447 2447
2448 2448 displaying [PATCH 1 of 2 R0] a ...
2449 2449 MIME-Version: 1.0
2450 2450 Content-Type: text/plain; charset="us-ascii"
2451 2451 Content-Transfer-Encoding: 7bit
2452 2452 Subject: [PATCH 1 of 2 R0] a
2453 2453 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2454 2454 X-Mercurial-Series-Index: 1
2455 2455 X-Mercurial-Series-Total: 2
2456 2456 Message-Id: <8580ff50825a50c8f716.61@test-hostname>
2457 2457 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2458 2458 In-Reply-To: <patchbomb.60@test-hostname>
2459 2459 References: <patchbomb.60@test-hostname>
2460 2460 User-Agent: Mercurial-patchbomb/* (glob)
2461 2461 Date: Thu, 01 Jan 1970 00:01:01 +0000
2462 2462 From: quux
2463 2463 To: foo
2464 2464
2465 2465 # HG changeset patch
2466 2466 # User test
2467 2467 # Date 1 0
2468 2468 # Thu Jan 01 00:00:01 1970 +0000
2469 2469 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2470 2470 # Parent 0000000000000000000000000000000000000000
2471 2471 a
2472 2472
2473 2473 diff -r 000000000000 -r 8580ff50825a a
2474 2474 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2475 2475 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2476 2476 @@ -0,0 +1,1 @@
2477 2477 +a
2478 2478
2479 2479 displaying [PATCH 2 of 2 R1] b ...
2480 2480 MIME-Version: 1.0
2481 2481 Content-Type: text/plain; charset="us-ascii"
2482 2482 Content-Transfer-Encoding: 7bit
2483 2483 Subject: [PATCH 2 of 2 R1] b
2484 2484 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2485 2485 X-Mercurial-Series-Index: 2
2486 2486 X-Mercurial-Series-Total: 2
2487 2487 Message-Id: <97d72e5f12c7e84f8506.62@test-hostname>
2488 2488 X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname>
2489 2489 In-Reply-To: <patchbomb.60@test-hostname>
2490 2490 References: <patchbomb.60@test-hostname>
2491 2491 User-Agent: Mercurial-patchbomb/* (glob)
2492 2492 Date: Thu, 01 Jan 1970 00:01:02 +0000
2493 2493 From: quux
2494 2494 To: foo
2495 2495
2496 2496 # HG changeset patch
2497 2497 # User test
2498 2498 # Date 2 0
2499 2499 # Thu Jan 01 00:00:02 1970 +0000
2500 2500 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2501 2501 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
2502 2502 b
2503 2503
2504 2504 diff -r 8580ff50825a -r 97d72e5f12c7 b
2505 2505 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2506 2506 +++ b/b Thu Jan 01 00:00:02 1970 +0000
2507 2507 @@ -0,0 +1,1 @@
2508 2508 +b
2509 2509
2510 2510
2511 2511 test flag template plus --flag:
2512 2512 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0 --flag 'V2' \
2513 2513 > --config patchbomb.flagtemplate='{branch} {flags}'
2514 2514 this patch series consists of 1 patches.
2515 2515
2516 2516 Cc:
2517 2517
2518 2518 displaying [PATCH default V2] a ...
2519 2519 MIME-Version: 1.0
2520 2520 Content-Type: text/plain; charset="us-ascii"
2521 2521 Content-Transfer-Encoding: 7bit
2522 2522 Subject: [PATCH default V2] a
2523 2523 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2524 2524 X-Mercurial-Series-Index: 1
2525 2525 X-Mercurial-Series-Total: 1
2526 2526 Message-Id: <8580ff50825a50c8f716.60@test-hostname>
2527 2527 X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname>
2528 2528 User-Agent: Mercurial-patchbomb/* (glob)
2529 2529 Date: Thu, 01 Jan 1970 00:01:00 +0000
2530 2530 From: quux
2531 2531 To: foo
2532 2532
2533 2533 # HG changeset patch
2534 2534 # User test
2535 2535 # Date 1 0
2536 2536 # Thu Jan 01 00:00:01 1970 +0000
2537 2537 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2538 2538 # Parent 0000000000000000000000000000000000000000
2539 2539 a
2540 2540
2541 2541 diff -r 000000000000 -r 8580ff50825a a
2542 2542 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2543 2543 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2544 2544 @@ -0,0 +1,1 @@
2545 2545 +a
2546 2546
2547 2547
2548 2548 test multi-byte domain parsing:
2549 2549 >>> with open('toaddress.txt', 'wb') as f:
2550 2550 ... f.write(b'bar@\xfcnicode.com') and None
2551 2551 $ HGENCODING=iso-8859-1
2552 2552 $ export HGENCODING
2553 2553 $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "`cat toaddress.txt`" -s test -r 0
2554 2554 this patch series consists of 1 patches.
2555 2555
2556 2556 Cc:
2557 2557
2558 2558 sending [PATCH] test ...
2559 2559
2560 2560 $ cat tmp.mbox
2561 2561 From quux ... ... .. ..:..:.. .... (re)
2562 2562 MIME-Version: 1.0
2563 2563 Content-Type: text/plain; charset="us-ascii"
2564 2564 Content-Transfer-Encoding: 7bit
2565 2565 Subject: [PATCH] test
2566 2566 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
2567 2567 X-Mercurial-Series-Index: 1
2568 2568 X-Mercurial-Series-Total: 1
2569 2569 Message-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2570 2570 X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname>
2571 2571 User-Agent: Mercurial-patchbomb/* (glob)
2572 2572 Date: Tue, 01 Jan 1980 00:01:00 +0000
2573 2573 From: quux
2574 2574 To: bar@xn--nicode-2ya.com
2575 2575
2576 2576 # HG changeset patch
2577 2577 # User test
2578 2578 # Date 1 0
2579 2579 # Thu Jan 01 00:00:01 1970 +0000
2580 2580 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
2581 2581 # Parent 0000000000000000000000000000000000000000
2582 2582 a
2583 2583
2584 2584 diff -r 000000000000 -r 8580ff50825a a
2585 2585 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2586 2586 +++ b/a Thu Jan 01 00:00:01 1970 +0000
2587 2587 @@ -0,0 +1,1 @@
2588 2588 +a
2589 2589
2590 2590
2591 2591
2592 2592 test outgoing:
2593 2593 $ hg up 1
2594 2594 0 files updated, 0 files merged, 6 files removed, 0 files unresolved
2595 2595
2596 2596 $ hg branch test
2597 2597 marked working directory as branch test
2598 2598 (branches are permanent and global, did you want a bookmark?)
2599 2599
2600 2600 $ echo d > d
2601 2601 $ hg add d
2602 2602 $ hg ci -md -d '4 0'
2603 2603 $ echo d >> d
2604 2604 $ hg ci -mdd -d '5 0'
2605 2605 $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n"
2606 2606 @ 10:3b6f1ec9dde9 dd
2607 2607 |
2608 2608 o 9:2f9fa9b998c5 d
2609 2609 |
2610 2610 | o 8:9cea7492c36b Added tag two, two.diff for changeset ff2c9fa2018b
2611 2611 | |
2612 2612 | o 7:3b775b32716d Added tag one, one.patch for changeset 97d72e5f12c7
2613 2613 | |
2614 2614 | o 6:c41d7353114c Added tag zero, zero.foo for changeset 8580ff50825a
2615 2615 | |
2616 2616 | o 5:4d6f44f466c9 isolatin 8-bit encoding
2617 2617 | |
2618 2618 | o 4:0c7b871cb86b long line
2619 2619 | |
2620 2620 | o 3:f81ef9782946 \xe7a (esc)
2621 2621 | |
2622 2622 | o 2:ff2c9fa2018b c
2623 2623 |/
2624 2624 o 1:97d72e5f12c7 b
2625 2625 |
2626 2626 o 0:8580ff50825a a
2627 2627
2628 2628 $ hg phase --force --secret -r 10
2629
2630 Test without revisions specified
2631 $ hg email --date '1980-1-1 0:1' -n -o -t foo
2632 comparing with $TESTTMP/t
2633 From [test]: test
2634 this patch series consists of 1 patches.
2635
2636 Cc:
2637
2638 displaying [PATCH] d ...
2639 MIME-Version: 1.0
2640 Content-Type: text/plain; charset="us-ascii"
2641 Content-Transfer-Encoding: 7bit
2642 Subject: [PATCH] d
2643 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2644 X-Mercurial-Series-Index: 1
2645 X-Mercurial-Series-Total: 1
2646 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2647 X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2648 User-Agent: Mercurial-patchbomb/* (glob)
2649 Date: Tue, 01 Jan 1980 00:01:00 +0000
2650 From: test
2651 To: foo
2652
2653 # HG changeset patch
2654 # User test
2655 # Date 4 0
2656 # Thu Jan 01 00:00:04 1970 +0000
2657 # Branch test
2658 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2659 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2660 d
2661
2662 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2663 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2664 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2665 @@ -0,0 +1,1 @@
2666 +d
2667
2629 2668 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 'rev(10) or rev(6)'
2630 2669 comparing with ../t
2631 2670 From [test]: test
2632 2671 this patch series consists of 6 patches.
2633 2672
2634 2673
2635 2674 Write the introductory message for the patch series.
2636 2675
2637 2676 Cc:
2638 2677
2639 2678 displaying [PATCH 0 of 6] test ...
2640 2679 MIME-Version: 1.0
2641 2680 Content-Type: text/plain; charset="us-ascii"
2642 2681 Content-Transfer-Encoding: 7bit
2643 2682 Subject: [PATCH 0 of 6] test
2644 2683 Message-Id: <patchbomb.315532860@test-hostname>
2645 2684 User-Agent: Mercurial-patchbomb/* (glob)
2646 2685 Date: Tue, 01 Jan 1980 00:01:00 +0000
2647 2686 From: test
2648 2687 To: foo
2649 2688
2650 2689
2651 2690 displaying [PATCH 1 of 6] c ...
2652 2691 MIME-Version: 1.0
2653 2692 Content-Type: text/plain; charset="us-ascii"
2654 2693 Content-Transfer-Encoding: 7bit
2655 2694 Subject: [PATCH 1 of 6] c
2656 2695 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
2657 2696 X-Mercurial-Series-Index: 1
2658 2697 X-Mercurial-Series-Total: 6
2659 2698 Message-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2660 2699 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2661 2700 In-Reply-To: <patchbomb.315532860@test-hostname>
2662 2701 References: <patchbomb.315532860@test-hostname>
2663 2702 User-Agent: Mercurial-patchbomb/* (glob)
2664 2703 Date: Tue, 01 Jan 1980 00:01:01 +0000
2665 2704 From: test
2666 2705 To: foo
2667 2706
2668 2707 # HG changeset patch
2669 2708 # User test
2670 2709 # Date 3 0
2671 2710 # Thu Jan 01 00:00:03 1970 +0000
2672 2711 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
2673 2712 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2674 2713 c
2675 2714
2676 2715 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
2677 2716 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2678 2717 +++ b/c Thu Jan 01 00:00:03 1970 +0000
2679 2718 @@ -0,0 +1,1 @@
2680 2719 +c
2681 2720
2682 2721 displaying [PATCH 2 of 6] \xe7a ... (esc)
2683 2722 MIME-Version: 1.0
2684 2723 Content-Type: text/plain; charset="iso-8859-1"
2685 2724 Content-Transfer-Encoding: quoted-printable
2686 2725 Subject: [PATCH 2 of 6] \xe7a (esc) (no-py3 !)
2687 2726 Subject: =?utf-8?b?W1BBVENIIDIgb2YgNl0gw6dh?= (py3 !)
2688 2727 X-Mercurial-Node: f81ef97829467e868fc405fccbcfa66217e4d3e6
2689 2728 X-Mercurial-Series-Index: 2
2690 2729 X-Mercurial-Series-Total: 6
2691 2730 Message-Id: <f81ef97829467e868fc4.315532862@test-hostname>
2692 2731 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2693 2732 In-Reply-To: <patchbomb.315532860@test-hostname>
2694 2733 References: <patchbomb.315532860@test-hostname>
2695 2734 User-Agent: Mercurial-patchbomb/* (glob)
2696 2735 Date: Tue, 01 Jan 1980 00:01:02 +0000
2697 2736 From: test
2698 2737 To: foo
2699 2738
2700 2739 # HG changeset patch
2701 2740 # User test
2702 2741 # Date 4 0
2703 2742 # Thu Jan 01 00:00:04 1970 +0000
2704 2743 # Node ID f81ef97829467e868fc405fccbcfa66217e4d3e6
2705 2744 # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
2706 2745 =E7a
2707 2746
2708 2747 diff -r ff2c9fa2018b -r f81ef9782946 description
2709 2748 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2710 2749 +++ b/description Thu Jan 01 00:00:04 1970 +0000
2711 2750 @@ -0,0 +1,3 @@
2712 2751 +a multiline
2713 2752 +
2714 2753 +description
2715 2754 diff -r ff2c9fa2018b -r f81ef9782946 utf
2716 2755 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2717 2756 +++ b/utf Thu Jan 01 00:00:04 1970 +0000
2718 2757 @@ -0,0 +1,1 @@
2719 2758 +h=C3=B6mma!
2720 2759
2721 2760 displaying [PATCH 3 of 6] long line ...
2722 2761 MIME-Version: 1.0
2723 2762 Content-Type: text/plain; charset="us-ascii"
2724 2763 Content-Transfer-Encoding: quoted-printable
2725 2764 Subject: [PATCH 3 of 6] long line
2726 2765 X-Mercurial-Node: 0c7b871cb86b61a1c07e244393603c361e4a178d
2727 2766 X-Mercurial-Series-Index: 3
2728 2767 X-Mercurial-Series-Total: 6
2729 2768 Message-Id: <0c7b871cb86b61a1c07e.315532863@test-hostname>
2730 2769 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2731 2770 In-Reply-To: <patchbomb.315532860@test-hostname>
2732 2771 References: <patchbomb.315532860@test-hostname>
2733 2772 User-Agent: Mercurial-patchbomb/* (glob)
2734 2773 Date: Tue, 01 Jan 1980 00:01:03 +0000
2735 2774 From: test
2736 2775 To: foo
2737 2776
2738 2777 # HG changeset patch
2739 2778 # User test
2740 2779 # Date 4 0
2741 2780 # Thu Jan 01 00:00:04 1970 +0000
2742 2781 # Node ID 0c7b871cb86b61a1c07e244393603c361e4a178d
2743 2782 # Parent f81ef97829467e868fc405fccbcfa66217e4d3e6
2744 2783 long line
2745 2784
2746 2785 diff -r f81ef9782946 -r 0c7b871cb86b long
2747 2786 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2748 2787 +++ b/long Thu Jan 01 00:00:04 1970 +0000
2749 2788 @@ -0,0 +1,4 @@
2750 2789 +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2751 2790 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2752 2791 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2753 2792 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2754 2793 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2755 2794 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2756 2795 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2757 2796 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2758 2797 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2759 2798 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2760 2799 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2761 2800 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2762 2801 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
2763 2802 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2764 2803 +foo
2765 2804 +
2766 2805 +bar
2767 2806
2768 2807 displaying [PATCH 4 of 6] isolatin 8-bit encoding ...
2769 2808 MIME-Version: 1.0
2770 2809 Content-Type: text/plain; charset="iso-8859-1"
2771 2810 Content-Transfer-Encoding: quoted-printable
2772 2811 Subject: [PATCH 4 of 6] isolatin 8-bit encoding
2773 2812 X-Mercurial-Node: 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
2774 2813 X-Mercurial-Series-Index: 4
2775 2814 X-Mercurial-Series-Total: 6
2776 2815 Message-Id: <4d6f44f466c96d89f2e7.315532864@test-hostname>
2777 2816 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2778 2817 In-Reply-To: <patchbomb.315532860@test-hostname>
2779 2818 References: <patchbomb.315532860@test-hostname>
2780 2819 User-Agent: Mercurial-patchbomb/* (glob)
2781 2820 Date: Tue, 01 Jan 1980 00:01:04 +0000
2782 2821 From: test
2783 2822 To: foo
2784 2823
2785 2824 # HG changeset patch
2786 2825 # User test
2787 2826 # Date 5 0
2788 2827 # Thu Jan 01 00:00:05 1970 +0000
2789 2828 # Node ID 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
2790 2829 # Parent 0c7b871cb86b61a1c07e244393603c361e4a178d
2791 2830 isolatin 8-bit encoding
2792 2831
2793 2832 diff -r 0c7b871cb86b -r 4d6f44f466c9 isolatin
2794 2833 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2795 2834 +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
2796 2835 @@ -0,0 +1,1 @@
2797 2836 +h=F6mma!
2798 2837
2799 2838 displaying [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a ...
2800 2839 MIME-Version: 1.0
2801 2840 Content-Type: text/plain; charset="us-ascii"
2802 2841 Content-Transfer-Encoding: 7bit
2803 2842 Subject: [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a
2804 2843 X-Mercurial-Node: c41d7353114ccb07a50a822ad5ddf47051c88ec2
2805 2844 X-Mercurial-Series-Index: 5
2806 2845 X-Mercurial-Series-Total: 6
2807 2846 Message-Id: <c41d7353114ccb07a50a.315532865@test-hostname>
2808 2847 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2809 2848 In-Reply-To: <patchbomb.315532860@test-hostname>
2810 2849 References: <patchbomb.315532860@test-hostname>
2811 2850 User-Agent: Mercurial-patchbomb/* (glob)
2812 2851 Date: Tue, 01 Jan 1980 00:01:05 +0000
2813 2852 From: test
2814 2853 To: foo
2815 2854
2816 2855 # HG changeset patch
2817 2856 # User test
2818 2857 # Date 0 0
2819 2858 # Thu Jan 01 00:00:00 1970 +0000
2820 2859 # Node ID c41d7353114ccb07a50a822ad5ddf47051c88ec2
2821 2860 # Parent 4d6f44f466c96d89f2e7e865a70ff41d8b6eee37
2822 2861 Added tag zero, zero.foo for changeset 8580ff50825a
2823 2862
2824 2863 diff -r 4d6f44f466c9 -r c41d7353114c .hgtags
2825 2864 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2826 2865 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
2827 2866 @@ -0,0 +1,2 @@
2828 2867 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero
2829 2868 +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
2830 2869
2831 2870 displaying [PATCH 6 of 6] d ...
2832 2871 MIME-Version: 1.0
2833 2872 Content-Type: text/plain; charset="us-ascii"
2834 2873 Content-Transfer-Encoding: 7bit
2835 2874 Subject: [PATCH 6 of 6] d
2836 2875 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2837 2876 X-Mercurial-Series-Index: 6
2838 2877 X-Mercurial-Series-Total: 6
2839 2878 Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@test-hostname>
2840 2879 X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname>
2841 2880 In-Reply-To: <patchbomb.315532860@test-hostname>
2842 2881 References: <patchbomb.315532860@test-hostname>
2843 2882 User-Agent: Mercurial-patchbomb/* (glob)
2844 2883 Date: Tue, 01 Jan 1980 00:01:06 +0000
2845 2884 From: test
2846 2885 To: foo
2847 2886
2848 2887 # HG changeset patch
2849 2888 # User test
2850 2889 # Date 4 0
2851 2890 # Thu Jan 01 00:00:04 1970 +0000
2852 2891 # Branch test
2853 2892 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2854 2893 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2855 2894 d
2856 2895
2857 2896 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2858 2897 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2859 2898 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2860 2899 @@ -0,0 +1,1 @@
2861 2900 +d
2862 2901
2863 2902
2864 2903 Don't prompt for a CC header.
2865 2904
2866 2905 $ echo "[email]" >> $HGRCPATH
2867 2906 $ echo "cc=" >> $HGRCPATH
2868 2907
2869 2908 dest#branch URIs:
2870 2909 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2871 2910 comparing with ../t#test
2872 2911 From [test]: test
2873 2912 this patch series consists of 1 patches.
2874 2913
2875 2914
2876 2915 displaying [PATCH] test ...
2877 2916 MIME-Version: 1.0
2878 2917 Content-Type: text/plain; charset="us-ascii"
2879 2918 Content-Transfer-Encoding: 7bit
2880 2919 Subject: [PATCH] test
2881 2920 X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2882 2921 X-Mercurial-Series-Index: 1
2883 2922 X-Mercurial-Series-Total: 1
2884 2923 Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2885 2924 X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname>
2886 2925 User-Agent: Mercurial-patchbomb/* (glob)
2887 2926 Date: Tue, 01 Jan 1980 00:01:00 +0000
2888 2927 From: test
2889 2928 To: foo
2890 2929
2891 2930 # HG changeset patch
2892 2931 # User test
2893 2932 # Date 4 0
2894 2933 # Thu Jan 01 00:00:04 1970 +0000
2895 2934 # Branch test
2896 2935 # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
2897 2936 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
2898 2937 d
2899 2938
2900 2939 diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d
2901 2940 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2902 2941 +++ b/d Thu Jan 01 00:00:04 1970 +0000
2903 2942 @@ -0,0 +1,1 @@
2904 2943 +d
2905 2944
2906 2945 #if no-windows
2907 2946
2908 2947 Set up a fake sendmail program
2909 2948
2910 2949 $ cat > pretendmail.sh << 'EOF'
2911 2950 > #!/bin/sh
2912 2951 > echo "$@"
2913 2952 > cat
2914 2953 > EOF
2915 2954 $ chmod +x pretendmail.sh
2916 2955
2917 2956 $ echo '[email]' >> $HGRCPATH
2918 2957 $ echo "method=`pwd`/pretendmail.sh" >> $HGRCPATH
2919 2958
2920 2959 Test introduction configuration
2921 2960 =================================
2922 2961
2923 2962 $ echo '[patchbomb]' >> $HGRCPATH
2924 2963
2925 2964 "auto" setting
2926 2965 ----------------
2927 2966
2928 2967 $ echo 'intro=auto' >> $HGRCPATH
2929 2968
2930 2969 single rev
2931 2970
2932 2971 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series."
2933 2972 [1]
2934 2973
2935 2974 single rev + flag
2936 2975
2937 2976 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series."
2938 2977 Write the introductory message for the patch series.
2939 2978
2940 2979
2941 2980 Multi rev
2942 2981
2943 2982 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series."
2944 2983 Write the introductory message for the patch series.
2945 2984
2946 2985 "never" setting
2947 2986 -----------------
2948 2987
2949 2988 $ echo 'intro=never' >> $HGRCPATH
2950 2989
2951 2990 single rev
2952 2991
2953 2992 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series."
2954 2993 [1]
2955 2994
2956 2995 single rev + flag
2957 2996
2958 2997 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series."
2959 2998 Write the introductory message for the patch series.
2960 2999
2961 3000
2962 3001 Multi rev
2963 3002
2964 3003 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series."
2965 3004 [1]
2966 3005
2967 3006 Multi rev + flag
2968 3007
2969 3008 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' --intro | grep "Write the introductory message for the patch series."
2970 3009 Write the introductory message for the patch series.
2971 3010
2972 3011 "always" setting
2973 3012 -----------------
2974 3013
2975 3014 $ echo 'intro=always' >> $HGRCPATH
2976 3015
2977 3016 single rev
2978 3017
2979 3018 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series."
2980 3019 Write the introductory message for the patch series.
2981 3020
2982 3021 single rev + flag
2983 3022
2984 3023 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series."
2985 3024 Write the introductory message for the patch series.
2986 3025
2987 3026
2988 3027 Multi rev
2989 3028
2990 3029 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series."
2991 3030 Write the introductory message for the patch series.
2992 3031
2993 3032 Multi rev + flag
2994 3033
2995 3034 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' --intro | grep "Write the introductory message for the patch series."
2996 3035 Write the introductory message for the patch series.
2997 3036
2998 3037 bad value setting
2999 3038 -----------------
3000 3039
3001 3040 $ echo 'intro=oliviawearaclownnose' >> $HGRCPATH
3002 3041
3003 3042 single rev
3004 3043
3005 3044 $ hg email --date '1980-1-1 0:1' -v -t foo -s test -r '10'
3006 3045 From [test]: test
3007 3046 this patch series consists of 1 patches.
3008 3047
3009 3048 warning: invalid patchbomb.intro value "oliviawearaclownnose"
3010 3049 (should be one of always, never, auto)
3011 3050 -f test foo
3012 3051 MIME-Version: 1.0
3013 3052 Content-Type: text/plain; charset="us-ascii"
3014 3053 Content-Transfer-Encoding: 7bit
3015 3054 Subject: [PATCH] test
3016 3055 X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af
3017 3056 X-Mercurial-Series-Index: 1
3018 3057 X-Mercurial-Series-Total: 1
3019 3058 Message-Id: <3b6f1ec9dde933a40a11*> (glob)
3020 3059 X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.*> (glob)
3021 3060 User-Agent: Mercurial-patchbomb/* (glob)
3022 3061 Date: Tue, 01 Jan 1980 00:01:00 +0000
3023 3062 From: test
3024 3063 To: foo
3025 3064
3026 3065 # HG changeset patch
3027 3066 # User test
3028 3067 # Date 5 0
3029 3068 # Thu Jan 01 00:00:05 1970 +0000
3030 3069 # Branch test
3031 3070 # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af
3032 3071 # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
3033 3072 dd
3034 3073
3035 3074 diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d
3036 3075 --- a/d Thu Jan 01 00:00:04 1970 +0000
3037 3076 +++ b/d Thu Jan 01 00:00:05 1970 +0000
3038 3077 @@ -1,1 +1,2 @@
3039 3078 d
3040 3079 +d
3041 3080
3042 3081 sending [PATCH] test ...
3043 3082 sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
3044 3083
3045 3084 Shell characters in addresses
3046 3085
3047 3086 $ hg email --date '1980-1-1 0:1' -v -t '~foo/bar@example.com' -f 'me*@example.com' -r '10'
3048 3087 this patch series consists of 1 patches.
3049 3088
3050 3089 warning: invalid patchbomb.intro value "oliviawearaclownnose"
3051 3090 (should be one of always, never, auto)
3052 3091 -f me*@example.com ~foo/bar@example.com
3053 3092 MIME-Version: 1.0
3054 3093 Content-Type: text/plain; charset="us-ascii"
3055 3094 Content-Transfer-Encoding: 7bit
3056 3095 Subject: [PATCH] dd
3057 3096 X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af
3058 3097 X-Mercurial-Series-Index: 1
3059 3098 X-Mercurial-Series-Total: 1
3060 3099 Message-Id: <3b6f1ec9dde933a40a11.315532860@test-hostname>
3061 3100 X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.315532860@test-hostname>
3062 3101 User-Agent: Mercurial-patchbomb/* (glob)
3063 3102 Date: Tue, 01 Jan 1980 00:01:00 +0000
3064 3103 From: me*@example.com
3065 3104 To: ~foo/bar@example.com
3066 3105
3067 3106 # HG changeset patch
3068 3107 # User test
3069 3108 # Date 5 0
3070 3109 # Thu Jan 01 00:00:05 1970 +0000
3071 3110 # Branch test
3072 3111 # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af
3073 3112 # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
3074 3113 dd
3075 3114
3076 3115 diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d
3077 3116 --- a/d Thu Jan 01 00:00:04 1970 +0000
3078 3117 +++ b/d Thu Jan 01 00:00:05 1970 +0000
3079 3118 @@ -1,1 +1,2 @@
3080 3119 d
3081 3120 +d
3082 3121
3083 3122 sending [PATCH] dd ...
3084 3123 sending mail: $TESTTMP/t2/pretendmail.sh -f 'me*@example.com' '~foo/bar@example.com'
3085 3124
3086 3125 Test pull url header
3087 3126 =================================
3088 3127
3089 3128 basic version
3090 3129
3091 3130 $ echo 'intro=auto' >> $HGRCPATH
3092 3131 $ echo "publicurl=$TESTTMP/t2" >> $HGRCPATH
3093 3132 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep '^#'
3094 3133 abort: public url $TESTTMP/t2 is missing 3b6f1ec9dde9
3095 3134 (use 'hg push $TESTTMP/t2 -r 3b6f1ec9dde9')
3096 3135 [1]
3097 3136
3098 3137 public missing
3099 3138
3100 3139 $ echo 'publicurl=$TESTTMP/missing' >> $HGRCPATH
3101 3140 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10'
3102 3141 unable to access public repo: $TESTTMP/missing
3103 3142 abort: repository $TESTTMP/missing not found
3104 3143 [255]
3105 3144
3106 3145 node missing at public
3107 3146
3108 3147 $ hg clone -r '9' . ../t3
3109 3148 adding changesets
3110 3149 adding manifests
3111 3150 adding file changes
3112 3151 added 3 changesets with 3 changes to 3 files
3113 3152 new changesets 8580ff50825a:2f9fa9b998c5
3114 3153 updating to branch test
3115 3154 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
3116 3155 $ echo 'publicurl=$TESTTMP/t3' >> $HGRCPATH
3117 3156 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10'
3118 3157 abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9
3119 3158 (use 'hg push $TESTTMP/t3 -r 3b6f1ec9dde9')
3120 3159 [255]
3121 3160
3122 3161 multiple heads are missing at public
3123 3162
3124 3163 $ hg email --date '1980-1-1 0:1' -t foo -s test -r '2+10'
3125 3164 abort: public "$TESTTMP/t3" is missing ff2c9fa2018b and 1 others
3126 3165 (use 'hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9')
3127 3166 [255]
3128 3167
3129 3168 #endif
General Comments 0
You need to be logged in to leave comments. Login now