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