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