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