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