##// END OF EJS Templates
patchbomb: Support initial in-reply-to header...
Henrik Stuart <henrik.stuart at edlund.dk> -
r8025:1280934d default
parent child Browse files
Show More
@@ -1,485 +1,487
1 1 '''sending Mercurial changesets as a series of patch emails
2 2
3 3 The series is started off with a "[PATCH 0 of N]" introduction, which
4 4 describes the series as a whole.
5 5
6 6 Each patch email has a Subject line of "[PATCH M of N] ...", using the
7 7 first line of the changeset description as the subject text. The
8 8 message contains two or three body parts:
9 9
10 10 The remainder of the changeset description.
11 11
12 12 [Optional] The result of running diffstat on the patch.
13 13
14 14 The patch itself, as generated by "hg export".
15 15
16 16 Each message refers to all of its predecessors using the In-Reply-To
17 17 and References headers, so they will show up as a sequence in threaded
18 18 mail and news readers, and in mail archives.
19 19
20 20 For each changeset, you will be prompted with a diffstat summary and
21 21 the changeset summary, so you can be sure you are sending the right
22 22 changes.
23 23
24 24 To enable this extension:
25 25
26 26 [extensions]
27 27 hgext.patchbomb =
28 28
29 29 To configure other defaults, add a section like this to your hgrc
30 30 file:
31 31
32 32 [email]
33 33 from = My Name <my@email>
34 34 to = recipient1, recipient2, ...
35 35 cc = cc1, cc2, ...
36 36 bcc = bcc1, bcc2, ...
37 37
38 38 Then you can use the "hg email" command to mail a series of changesets
39 39 as a patchbomb.
40 40
41 41 To avoid sending patches prematurely, it is a good idea to first run
42 42 the "email" command with the "-n" option (test only). You will be
43 43 prompted for an email recipient address, a subject an an introductory
44 44 message describing the patches of your patchbomb. Then when all is
45 45 done, patchbomb messages are displayed. If PAGER environment variable
46 46 is set, your pager will be fired up once for each patchbomb message,
47 47 so you can verify everything is alright.
48 48
49 49 The "-m" (mbox) option is also very useful. Instead of previewing each
50 50 patchbomb message in a pager or sending the messages directly, it will
51 51 create a UNIX mailbox file with the patch emails. This mailbox file
52 52 can be previewed with any mail user agent which supports UNIX mbox
53 53 files, e.g. with mutt:
54 54
55 55 % mutt -R -f mbox
56 56
57 57 When you are previewing the patchbomb messages, you can use `formail'
58 58 (a utility that is commonly installed as part of the procmail
59 59 package), to send each message out:
60 60
61 61 % formail -s sendmail -bm -t < mbox
62 62
63 63 That should be all. Now your patchbomb is on its way out.
64 64
65 65 You can also either configure the method option in the email section
66 66 to be a sendmail compatable mailer or fill out the [smtp] section so
67 67 that the patchbomb extension can automatically send patchbombs
68 68 directly from the commandline. See the [email] and [smtp] sections in
69 69 hgrc(5) for details.'''
70 70
71 71 import os, errno, socket, tempfile, cStringIO
72 72 import email.MIMEMultipart, email.MIMEBase
73 73 import email.Utils, email.Encoders, email.Generator
74 74 from mercurial import cmdutil, commands, hg, mail, patch, util
75 75 from mercurial.i18n import _
76 76 from mercurial.node import bin
77 77
78 78 def prompt(ui, prompt, default=None, rest=': ', empty_ok=False):
79 79 if not ui.interactive:
80 80 return default
81 81 if default:
82 82 prompt += ' [%s]' % default
83 83 prompt += rest
84 84 while True:
85 85 r = ui.prompt(prompt, default=default)
86 86 if r:
87 87 return r
88 88 if default is not None:
89 89 return default
90 90 if empty_ok:
91 91 return r
92 92 ui.warn(_('Please enter a valid value.\n'))
93 93
94 94 def cdiffstat(ui, summary, patchlines):
95 95 s = patch.diffstat(patchlines)
96 96 if summary:
97 97 ui.write(summary, '\n')
98 98 ui.write(s, '\n')
99 99 ans = prompt(ui, _('does the diffstat above look okay? '), 'y')
100 100 if not ans.lower().startswith('y'):
101 101 raise util.Abort(_('diffstat rejected'))
102 102 return s
103 103
104 104 def makepatch(ui, repo, patch, opts, _charsets, idx, total, patchname=None):
105 105
106 106 desc = []
107 107 node = None
108 108 body = ''
109 109
110 110 for line in patch:
111 111 if line.startswith('#'):
112 112 if line.startswith('# Node ID'):
113 113 node = line.split()[-1]
114 114 continue
115 115 if line.startswith('diff -r') or line.startswith('diff --git'):
116 116 break
117 117 desc.append(line)
118 118
119 119 if not patchname and not node:
120 120 raise ValueError
121 121
122 122 if opts.get('attach'):
123 123 body = ('\n'.join(desc[1:]).strip() or
124 124 'Patch subject is complete summary.')
125 125 body += '\n\n\n'
126 126
127 127 if opts.get('plain'):
128 128 while patch and patch[0].startswith('# '):
129 129 patch.pop(0)
130 130 if patch:
131 131 patch.pop(0)
132 132 while patch and not patch[0].strip():
133 133 patch.pop(0)
134 134
135 135 if opts.get('diffstat'):
136 136 body += cdiffstat(ui, '\n'.join(desc), patch) + '\n\n'
137 137
138 138 if opts.get('attach') or opts.get('inline'):
139 139 msg = email.MIMEMultipart.MIMEMultipart()
140 140 if body:
141 141 msg.attach(mail.mimeencode(ui, body, _charsets, opts.get('test')))
142 142 p = mail.mimetextpatch('\n'.join(patch), 'x-patch', opts.get('test'))
143 143 binnode = bin(node)
144 144 # if node is mq patch, it will have patch file name as tag
145 145 if not patchname:
146 146 patchtags = [t for t in repo.nodetags(binnode)
147 147 if t.endswith('.patch') or t.endswith('.diff')]
148 148 if patchtags:
149 149 patchname = patchtags[0]
150 150 elif total > 1:
151 151 patchname = cmdutil.make_filename(repo, '%b-%n.patch',
152 152 binnode, seqno=idx, total=total)
153 153 else:
154 154 patchname = cmdutil.make_filename(repo, '%b.patch', binnode)
155 155 disposition = 'inline'
156 156 if opts.get('attach'):
157 157 disposition = 'attachment'
158 158 p['Content-Disposition'] = disposition + '; filename=' + patchname
159 159 msg.attach(p)
160 160 else:
161 161 body += '\n'.join(patch)
162 162 msg = mail.mimetextpatch(body, display=opts.get('test'))
163 163
164 164 subj = desc[0].strip().rstrip('. ')
165 165 if total == 1 and not opts.get('intro'):
166 166 subj = '[PATCH] ' + (opts.get('subject') or subj)
167 167 else:
168 168 tlen = len(str(total))
169 169 subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, subj)
170 170 msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get('test'))
171 171 msg['X-Mercurial-Node'] = node
172 172 return msg, subj
173 173
174 174 def patchbomb(ui, repo, *revs, **opts):
175 175 '''send changesets by email
176 176
177 177 By default, diffs are sent in the format generated by hg export,
178 178 one per message. The series starts with a "[PATCH 0 of N]"
179 179 introduction, which describes the series as a whole.
180 180
181 181 Each patch email has a Subject line of "[PATCH M of N] ...", using
182 182 the first line of the changeset description as the subject text.
183 183 The message contains two or three body parts. First, the rest of
184 184 the changeset description. Next, (optionally) if the diffstat
185 185 program is installed, the result of running diffstat on the patch.
186 186 Finally, the patch itself, as generated by "hg export".
187 187
188 188 With --outgoing, emails will be generated for patches not found in
189 189 the destination repository (or only those which are ancestors of
190 190 the specified revisions if any are provided)
191 191
192 192 With --bundle, changesets are selected as for --outgoing, but a
193 193 single email containing a binary Mercurial bundle as an attachment
194 194 will be sent.
195 195
196 196 Examples:
197 197
198 198 hg email -r 3000 # send patch 3000 only
199 199 hg email -r 3000 -r 3001 # send patches 3000 and 3001
200 200 hg email -r 3000:3005 # send patches 3000 through 3005
201 201 hg email 3000 # send patch 3000 (deprecated)
202 202
203 203 hg email -o # send all patches not in default
204 204 hg email -o DEST # send all patches not in DEST
205 205 hg email -o -r 3000 # send all ancestors of 3000 not in default
206 206 hg email -o -r 3000 DEST # send all ancestors of 3000 not in DEST
207 207
208 208 hg email -b # send bundle of all patches not in default
209 209 hg email -b DEST # send bundle of all patches not in DEST
210 210 hg email -b -r 3000 # bundle of all ancestors of 3000 not in default
211 211 hg email -b -r 3000 DEST # bundle of all ancestors of 3000 not in DEST
212 212
213 213 Before using this command, you will need to enable email in your
214 214 hgrc. See the [email] section in hgrc(5) for details.
215 215 '''
216 216
217 217 _charsets = mail._charsets(ui)
218 218
219 219 def outgoing(dest, revs):
220 220 '''Return the revisions present locally but not in dest'''
221 221 dest = ui.expandpath(dest or 'default-push', dest or 'default')
222 222 revs = [repo.lookup(rev) for rev in revs]
223 223 other = hg.repository(ui, dest)
224 224 ui.status(_('comparing with %s\n') % dest)
225 225 o = repo.findoutgoing(other)
226 226 if not o:
227 227 ui.status(_("no changes found\n"))
228 228 return []
229 229 o = repo.changelog.nodesbetween(o, revs or None)[0]
230 230 return [str(repo.changelog.rev(r)) for r in o]
231 231
232 232 def getpatches(revs):
233 233 for r in cmdutil.revrange(repo, revs):
234 234 output = cStringIO.StringIO()
235 235 patch.export(repo, [r], fp=output,
236 236 opts=patch.diffopts(ui, opts))
237 237 yield output.getvalue().split('\n')
238 238
239 239 def getbundle(dest):
240 240 tmpdir = tempfile.mkdtemp(prefix='hg-email-bundle-')
241 241 tmpfn = os.path.join(tmpdir, 'bundle')
242 242 try:
243 243 commands.bundle(ui, repo, tmpfn, dest, **opts)
244 244 return open(tmpfn, 'rb').read()
245 245 finally:
246 246 try:
247 247 os.unlink(tmpfn)
248 248 except:
249 249 pass
250 250 os.rmdir(tmpdir)
251 251
252 252 if not (opts.get('test') or opts.get('mbox')):
253 253 # really sending
254 254 mail.validateconfig(ui)
255 255
256 256 if not (revs or opts.get('rev')
257 257 or opts.get('outgoing') or opts.get('bundle')
258 258 or opts.get('patches')):
259 259 raise util.Abort(_('specify at least one changeset with -r or -o'))
260 260
261 261 cmdutil.setremoteconfig(ui, opts)
262 262 if opts.get('outgoing') and opts.get('bundle'):
263 263 raise util.Abort(_("--outgoing mode always on with --bundle;"
264 264 " do not re-specify --outgoing"))
265 265
266 266 if opts.get('outgoing') or opts.get('bundle'):
267 267 if len(revs) > 1:
268 268 raise util.Abort(_("too many destinations"))
269 269 dest = revs and revs[0] or None
270 270 revs = []
271 271
272 272 if opts.get('rev'):
273 273 if revs:
274 274 raise util.Abort(_('use only one form to specify the revision'))
275 275 revs = opts.get('rev')
276 276
277 277 if opts.get('outgoing'):
278 278 revs = outgoing(dest, opts.get('rev'))
279 279 if opts.get('bundle'):
280 280 opts['revs'] = revs
281 281
282 282 # start
283 283 if opts.get('date'):
284 284 start_time = util.parsedate(opts.get('date'))
285 285 else:
286 286 start_time = util.makedate()
287 287
288 288 def genmsgid(id):
289 289 return '<%s.%s@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
290 290
291 291 def getdescription(body, sender):
292 292 if opts.get('desc'):
293 293 body = open(opts.get('desc')).read()
294 294 else:
295 295 ui.write(_('\nWrite the introductory message for the '
296 296 'patch series.\n\n'))
297 297 body = ui.edit(body, sender)
298 298 return body
299 299
300 300 def getpatchmsgs(patches, patchnames=None):
301 301 jumbo = []
302 302 msgs = []
303 303
304 304 ui.write(_('This patch series consists of %d patches.\n\n')
305 305 % len(patches))
306 306
307 307 name = None
308 308 for i, p in enumerate(patches):
309 309 jumbo.extend(p)
310 310 if patchnames:
311 311 name = patchnames[i]
312 312 msg = makepatch(ui, repo, p, opts, _charsets, i + 1,
313 313 len(patches), name)
314 314 msgs.append(msg)
315 315
316 316 if len(patches) > 1 or opts.get('intro'):
317 317 tlen = len(str(len(patches)))
318 318
319 319 subj = '[PATCH %0*d of %d] %s' % (
320 320 tlen, 0, len(patches),
321 321 opts.get('subject') or
322 322 prompt(ui, 'Subject:',
323 323 rest=' [PATCH %0*d of %d] ' % (tlen, 0, len(patches))))
324 324
325 325 body = ''
326 326 if opts.get('diffstat'):
327 327 d = cdiffstat(ui, _('Final summary:\n'), jumbo)
328 328 if d:
329 329 body = '\n' + d
330 330
331 331 body = getdescription(body, sender)
332 332 msg = mail.mimeencode(ui, body, _charsets, opts.get('test'))
333 333 msg['Subject'] = mail.headencode(ui, subj, _charsets,
334 334 opts.get('test'))
335 335
336 336 msgs.insert(0, (msg, subj))
337 337 return msgs
338 338
339 339 def getbundlemsgs(bundle):
340 340 subj = (opts.get('subject')
341 341 or prompt(ui, 'Subject:', 'A bundle for your repository'))
342 342
343 343 body = getdescription('', sender)
344 344 msg = email.MIMEMultipart.MIMEMultipart()
345 345 if body:
346 346 msg.attach(mail.mimeencode(ui, body, _charsets, opts.get('test')))
347 347 datapart = email.MIMEBase.MIMEBase('application', 'x-mercurial-bundle')
348 348 datapart.set_payload(bundle)
349 349 bundlename = '%s.hg' % opts.get('bundlename', 'bundle')
350 350 datapart.add_header('Content-Disposition', 'attachment',
351 351 filename=bundlename)
352 352 email.Encoders.encode_base64(datapart)
353 353 msg.attach(datapart)
354 354 msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get('test'))
355 355 return [(msg, subj)]
356 356
357 357 sender = (opts.get('from') or ui.config('email', 'from') or
358 358 ui.config('patchbomb', 'from') or
359 359 prompt(ui, 'From', ui.username()))
360 360
361 361 # internal option used by pbranches
362 362 patches = opts.get('patches')
363 363 if patches:
364 364 msgs = getpatchmsgs(patches, opts.get('patchnames'))
365 365 elif opts.get('bundle'):
366 366 msgs = getbundlemsgs(getbundle(dest))
367 367 else:
368 368 msgs = getpatchmsgs(list(getpatches(revs)))
369 369
370 370 def getaddrs(opt, prpt, default = None):
371 371 addrs = opts.get(opt) or (ui.config('email', opt) or
372 372 ui.config('patchbomb', opt) or
373 373 prompt(ui, prpt, default)).split(',')
374 374 return [mail.addressencode(ui, a.strip(), _charsets, opts.get('test'))
375 375 for a in addrs if a.strip()]
376 376
377 377 to = getaddrs('to', 'To')
378 378 cc = getaddrs('cc', 'Cc', '')
379 379
380 380 bcc = opts.get('bcc') or (ui.config('email', 'bcc') or
381 381 ui.config('patchbomb', 'bcc') or '').split(',')
382 382 bcc = [mail.addressencode(ui, a.strip(), _charsets, opts.get('test'))
383 383 for a in bcc if a.strip()]
384 384
385 385 ui.write('\n')
386 386
387 parent = None
387 parent = opts.get('in_reply_to') or None
388 388
389 389 sender_addr = email.Utils.parseaddr(sender)[1]
390 390 sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
391 391 sendmail = None
392 392 for m, subj in msgs:
393 393 try:
394 394 m['Message-Id'] = genmsgid(m['X-Mercurial-Node'])
395 395 except TypeError:
396 396 m['Message-Id'] = genmsgid('patchbomb')
397 397 if parent:
398 398 m['In-Reply-To'] = parent
399 399 m['References'] = parent
400 400 else:
401 401 parent = m['Message-Id']
402 402 m['Date'] = util.datestr(start_time, "%a, %d %b %Y %H:%M:%S %1%2")
403 403
404 404 start_time = (start_time[0] + 1, start_time[1])
405 405 m['From'] = sender
406 406 m['To'] = ', '.join(to)
407 407 if cc:
408 408 m['Cc'] = ', '.join(cc)
409 409 if bcc:
410 410 m['Bcc'] = ', '.join(bcc)
411 411 if opts.get('test'):
412 412 ui.status(_('Displaying '), subj, ' ...\n')
413 413 ui.flush()
414 414 if 'PAGER' in os.environ:
415 415 fp = util.popen(os.environ['PAGER'], 'w')
416 416 else:
417 417 fp = ui
418 418 generator = email.Generator.Generator(fp, mangle_from_=False)
419 419 try:
420 420 generator.flatten(m, 0)
421 421 fp.write('\n')
422 422 except IOError, inst:
423 423 if inst.errno != errno.EPIPE:
424 424 raise
425 425 if fp is not ui:
426 426 fp.close()
427 427 elif opts.get('mbox'):
428 428 ui.status(_('Writing '), subj, ' ...\n')
429 429 fp = open(opts.get('mbox'), 'In-Reply-To' in m and 'ab+' or 'wb+')
430 430 generator = email.Generator.Generator(fp, mangle_from_=True)
431 431 date = util.datestr(start_time, '%a %b %d %H:%M:%S %Y')
432 432 fp.write('From %s %s\n' % (sender_addr, date))
433 433 generator.flatten(m, 0)
434 434 fp.write('\n\n')
435 435 fp.close()
436 436 else:
437 437 if not sendmail:
438 438 sendmail = mail.connect(ui)
439 439 ui.status(_('Sending '), subj, ' ...\n')
440 440 # Exim does not remove the Bcc field
441 441 del m['Bcc']
442 442 fp = cStringIO.StringIO()
443 443 generator = email.Generator.Generator(fp, mangle_from_=False)
444 444 generator.flatten(m, 0)
445 445 sendmail(sender, to + bcc + cc, fp.getvalue())
446 446
447 447 emailopts = [
448 448 ('a', 'attach', None, _('send patches as attachments')),
449 449 ('i', 'inline', None, _('send patches as inline attachments')),
450 450 ('', 'bcc', [], _('email addresses of blind carbon copy recipients')),
451 451 ('c', 'cc', [], _('email addresses of copy recipients')),
452 452 ('d', 'diffstat', None, _('add diffstat output to messages')),
453 453 ('', 'date', '', _('use the given date as the sending date')),
454 454 ('', 'desc', '', _('use the given file as the series description')),
455 455 ('f', 'from', '', _('email address of sender')),
456 456 ('n', 'test', None, _('print messages that would be sent')),
457 457 ('m', 'mbox', '',
458 458 _('write messages to mbox file instead of sending them')),
459 459 ('s', 'subject', '',
460 460 _('subject of first message (intro or single patch)')),
461 ('', 'in-reply-to', '',
462 _('"message identifier to reply to"')),
461 463 ('t', 'to', [], _('email addresses of recipients')),
462 464 ]
463 465
464 466
465 467 cmdtable = {
466 468 "email":
467 469 (patchbomb,
468 470 [('g', 'git', None, _('use git extended diff format')),
469 471 ('', 'plain', None, _('omit hg patch header')),
470 472 ('o', 'outgoing', None,
471 473 _('send changes not found in the target repository')),
472 474 ('b', 'bundle', None,
473 475 _('send changes not in target as a binary bundle')),
474 476 ('', 'bundlename', 'bundle',
475 477 _('file name of the bundle attachment')),
476 478 ('r', 'rev', [], _('a revision to send')),
477 479 ('', 'force', None,
478 480 _('run even when remote repository is unrelated (with -b)')),
479 481 ('', 'base', [],
480 482 _('a base changeset to specify instead of a destination (with -b)')),
481 483 ('', 'intro', None,
482 484 _('send an introduction email for a single patch')),
483 485 ] + emailopts + commands.remoteopts,
484 486 _('hg email [OPTION]... [DEST]...'))
485 487 }
@@ -1,119 +1,122
1 1 #!/bin/sh
2 2
3 3 fixheaders()
4 4 {
5 5 sed -e 's/\(Message-Id:.*@\).*/\1/' \
6 6 -e 's/\(In-Reply-To:.*@\).*/\1/' \
7 7 -e 's/\(References:.*@\).*/\1/' \
8 8 -e 's/===.*/===/'
9 9 }
10 10
11 11 echo "[extensions]" >> $HGRCPATH
12 12 echo "patchbomb=" >> $HGRCPATH
13 13
14 14 COLUMNS=80; export COLUMNS
15 15
16 16 hg init t
17 17 cd t
18 18 echo a > a
19 19 hg commit -Ama -d '1 0'
20 20
21 21 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar tip | \
22 22 fixheaders
23 23
24 24 echo b > b
25 25 hg commit -Amb -d '2 0'
26 26
27 27 hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test 0:tip | \
28 28 fixheaders
29 29
30 30 hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip
31 31
32 32 cd ..
33 33
34 34 hg clone -q t t2
35 35 cd t2
36 36 echo c > c
37 37 hg commit -Amc -d '3 0'
38 38
39 39 cat > description <<EOF
40 40 a multiline
41 41
42 42 description
43 43 EOF
44 44
45 45 echo "% test bundle and description"
46 46 hg email --date '1970-1-1 0:3' -n -f quux -t foo \
47 47 -c bar -s test -r tip -b --desc description | \
48 48 fixheaders
49 49
50 50 echo "% utf-8 patch"
51 51 python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
52 52 hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
53 53
54 54 echo "% no mime encoding for email --test"
55 55 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
56 56 echo "% md5sum of 8-bit output"
57 57 $TESTDIR/md5sum.py mailtest
58 58 rm mailtest
59 59
60 60 echo "% mime encoded mbox"
61 61 hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
62 62 cat mbox | fixheaders
63 63 rm mbox
64 64
65 65 echo "% iso-8859-1 patch"
66 66 python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
67 67 hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
68 68
69 69 echo "% fake ascii mbox"
70 70 hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
71 71 fixheaders < mbox > mboxfix
72 72 echo "% md5sum of 8-bit output"
73 73 $TESTDIR/md5sum.py mboxfix
74 74
75 75 echo "% test diffstat for single patch"
76 76 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y 2 | \
77 77 fixheaders
78 78
79 79 echo "% test diffstat for multiple patches"
80 80 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y 0:1 | \
81 81 fixheaders
82 82
83 83 echo "% test inline for single patch"
84 84 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \
85 85 fixheaders
86 86
87 87 echo "% test inline for multiple patches"
88 88 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \
89 89 fixheaders
90 90
91 91 echo "% test attach for single patch"
92 92 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 2 | \
93 93 fixheaders
94 94
95 95 echo "% test attach for multiple patches"
96 96 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a 0:1 | \
97 97 fixheaders
98 98
99 99 echo "% test intro for single patch"
100 100 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test 2 | \
101 101 fixheaders
102 102
103 103 echo "% test intro for multiple patches"
104 104 hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test 0:1 | \
105 105 fixheaders
106 106
107 107 echo "% tagging csets"
108 108 hg tag -r0 zero zero.foo
109 109 hg tag -r1 one one.patch
110 110 hg tag -r2 two two.diff
111 111
112 112 echo "% test inline for single named patch"
113 113 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 2 | \
114 114 fixheaders
115 115
116 116 echo "% test inline for multiple named/unnamed patches"
117 117 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i 0:1 | \
118 118 fixheaders
119 119
120 echo "% test inreplyto"
121 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz tip | \
122 fixheaders
@@ -1,839 +1,874
1 1 adding a
2 2 This patch series consists of 1 patches.
3 3
4 4
5 5 Displaying [PATCH] a ...
6 6 Content-Type: text/plain; charset="us-ascii"
7 7 MIME-Version: 1.0
8 8 Content-Transfer-Encoding: 7bit
9 9 Subject: [PATCH] a
10 10 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
11 11 Message-Id: <8580ff50825a50c8f716.60@
12 12 Date: Thu, 01 Jan 1970 00:01:00 +0000
13 13 From: quux
14 14 To: foo
15 15 Cc: bar
16 16
17 17 # HG changeset patch
18 18 # User test
19 19 # Date 1 0
20 20 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
21 21 # Parent 0000000000000000000000000000000000000000
22 22 a
23 23
24 24 diff -r 000000000000 -r 8580ff50825a a
25 25 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26 26 +++ b/a Thu Jan 01 00:00:01 1970 +0000
27 27 @@ -0,0 +1,1 @@
28 28 +a
29 29
30 30 adding b
31 31 This patch series consists of 2 patches.
32 32
33 33
34 34 Write the introductory message for the patch series.
35 35
36 36
37 37 Displaying [PATCH 0 of 2] test ...
38 38 Content-Type: text/plain; charset="us-ascii"
39 39 MIME-Version: 1.0
40 40 Content-Transfer-Encoding: 7bit
41 41 Subject: [PATCH 0 of 2] test
42 42 Message-Id: <patchbomb.120@
43 43 Date: Thu, 01 Jan 1970 00:02:00 +0000
44 44 From: quux
45 45 To: foo
46 46 Cc: bar
47 47
48 48
49 49 Displaying [PATCH 1 of 2] a ...
50 50 Content-Type: text/plain; charset="us-ascii"
51 51 MIME-Version: 1.0
52 52 Content-Transfer-Encoding: 7bit
53 53 Subject: [PATCH 1 of 2] a
54 54 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
55 55 Message-Id: <8580ff50825a50c8f716.121@
56 56 In-Reply-To: <patchbomb.120@
57 57 References: <patchbomb.120@
58 58 Date: Thu, 01 Jan 1970 00:02:01 +0000
59 59 From: quux
60 60 To: foo
61 61 Cc: bar
62 62
63 63 # HG changeset patch
64 64 # User test
65 65 # Date 1 0
66 66 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
67 67 # Parent 0000000000000000000000000000000000000000
68 68 a
69 69
70 70 diff -r 000000000000 -r 8580ff50825a a
71 71 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
72 72 +++ b/a Thu Jan 01 00:00:01 1970 +0000
73 73 @@ -0,0 +1,1 @@
74 74 +a
75 75
76 76 Displaying [PATCH 2 of 2] b ...
77 77 Content-Type: text/plain; charset="us-ascii"
78 78 MIME-Version: 1.0
79 79 Content-Transfer-Encoding: 7bit
80 80 Subject: [PATCH 2 of 2] b
81 81 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
82 82 Message-Id: <97d72e5f12c7e84f8506.122@
83 83 In-Reply-To: <patchbomb.120@
84 84 References: <patchbomb.120@
85 85 Date: Thu, 01 Jan 1970 00:02:02 +0000
86 86 From: quux
87 87 To: foo
88 88 Cc: bar
89 89
90 90 # HG changeset patch
91 91 # User test
92 92 # Date 2 0
93 93 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
94 94 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
95 95 b
96 96
97 97 diff -r 8580ff50825a -r 97d72e5f12c7 b
98 98 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
99 99 +++ b/b Thu Jan 01 00:00:02 1970 +0000
100 100 @@ -0,0 +1,1 @@
101 101 +b
102 102
103 103 This patch series consists of 2 patches.
104 104
105 105
106 106 Write the introductory message for the patch series.
107 107
108 108
109 109 Writing [PATCH 0 of 2] test ...
110 110 Writing [PATCH 1 of 2] a ...
111 111 Writing [PATCH 2 of 2] b ...
112 112 adding c
113 113 % test bundle and description
114 114 searching for changes
115 115 1 changesets found
116 116
117 117 Displaying test ...
118 118 Content-Type: multipart/mixed; boundary="===
119 119 MIME-Version: 1.0
120 120 Subject: test
121 121 Message-Id: <patchbomb.180@
122 122 Date: Thu, 01 Jan 1970 00:03:00 +0000
123 123 From: quux
124 124 To: foo
125 125 Cc: bar
126 126
127 127 --===
128 128 Content-Type: text/plain; charset="us-ascii"
129 129 MIME-Version: 1.0
130 130 Content-Transfer-Encoding: 7bit
131 131
132 132 a multiline
133 133
134 134 description
135 135
136 136 --===
137 137 Content-Type: application/x-mercurial-bundle
138 138 MIME-Version: 1.0
139 139 Content-Disposition: attachment; filename="bundle.hg"
140 140 Content-Transfer-Encoding: base64
141 141
142 142 SEcxMEJaaDkxQVkmU1nvR7I3AAAN////lFYQWj1/4HwRkdC/AywIAk0E4pfoSIIIgQCgGEQOcLAA
143 143 2tA1VPyp4mkeoG0EaaPU0GTT1GjRiNPIg9CZGBqZ6UbU9J+KFU09DNUaGgAAAAAANAGgAAAAA1U8
144 144 oGgAADQGgAANNANAAAAAAZipFLz3XoakCEQB3PVPyHJVi1iYkAAKQAZQGpQGZESInRnCFMqLDla2
145 145 Bx3qfRQeA2N4lnzKkAmP8kR2asievLLXXebVU8Vg4iEBqcJNJAxIapSU6SM4888ZAciRG6MYAIEE
146 146 SlIBpFisgGkyRjX//TMtfcUAEsGu56+YnE1OlTZmzKm8BSu2rvo4rHAYYaadIFFuTy0LYgIkgLVD
147 147 sgVa2F19D1tx9+hgbAygLgQwaIqcDdgA4BjQgIiz/AEP72++llgDKhKducqodGE4B0ETqF3JFOFC
148 148 Q70eyNw=
149 149 --===
150 150 % utf-8 patch
151 151 adding description
152 152 adding utf
153 153 % no mime encoding for email --test
154 154 % md5sum of 8-bit output
155 155 ad877786716d09fd7843cf0ed5e3d2a8 mailtest
156 156 % mime encoded mbox
157 157 This patch series consists of 1 patches.
158 158
159 159
160 160 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
161 161 From quux Thu Jan 01 00:04:01 1970
162 162 Content-Type: text/plain; charset="utf-8"
163 163 MIME-Version: 1.0
164 164 Content-Transfer-Encoding: base64
165 165 Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64
166 166 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
167 167 Message-Id: <c3c9e37db9f4fe4882cd.240@
168 168 Date: Thu, 01 Jan 1970 00:04:00 +0000
169 169 From: quux
170 170 To: foo
171 171 Cc: bar
172 172
173 173 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgYzNj
174 174 OWUzN2RiOWY0ZmU0ODgyY2RhMzliYWY0MmZlZDZiYWQ4YjE1YQojIFBhcmVudCAgZmYyYzlmYTIw
175 175 MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5ZgpjaGFyc2V0PXV0Zi04OyBjb250ZW50LXRy
176 176 YW5zZmVyLWVuY29kaW5nOiBiYXNlNjQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIGMzYzllMzdk
177 177 YjlmNCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
178 178 MDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
179 179 LTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5ZmEy
180 180 MDE4YiAtciBjM2M5ZTM3ZGI5ZjQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDowMDow
181 181 MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
182 182 LTAsMCArMSwxIEBACitow7ZtbWEhCg==
183 183
184 184
185 185 % iso-8859-1 patch
186 186 adding isolatin
187 187 % fake ascii mbox
188 188 This patch series consists of 1 patches.
189 189
190 190
191 191 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
192 192 % md5sum of 8-bit output
193 193 90fae277a4a85255e8262174fcefb59f mboxfix
194 194 % test diffstat for single patch
195 195 This patch series consists of 1 patches.
196 196
197 197 c
198 198
199 199 c | 1 +
200 200 1 files changed, 1 insertions(+), 0 deletions(-)
201 201
202 202
203 203 Displaying [PATCH] test ...
204 204 Content-Type: text/plain; charset="us-ascii"
205 205 MIME-Version: 1.0
206 206 Content-Transfer-Encoding: 7bit
207 207 Subject: [PATCH] test
208 208 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
209 209 Message-Id: <ff2c9fa2018b15fa74b3.60@
210 210 Date: Thu, 01 Jan 1970 00:01:00 +0000
211 211 From: quux
212 212 To: foo
213 213 Cc: bar
214 214
215 215 c | 1 +
216 216 1 files changed, 1 insertions(+), 0 deletions(-)
217 217
218 218
219 219 # HG changeset patch
220 220 # User test
221 221 # Date 3 0
222 222 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
223 223 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
224 224 c
225 225
226 226 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
227 227 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
228 228 +++ b/c Thu Jan 01 00:00:03 1970 +0000
229 229 @@ -0,0 +1,1 @@
230 230 +c
231 231
232 232 % test diffstat for multiple patches
233 233 This patch series consists of 2 patches.
234 234
235 235 a
236 236
237 237 a | 1 +
238 238 1 files changed, 1 insertions(+), 0 deletions(-)
239 239
240 240 b
241 241
242 242 b | 1 +
243 243 1 files changed, 1 insertions(+), 0 deletions(-)
244 244
245 245 Final summary:
246 246
247 247 a | 1 +
248 248 b | 1 +
249 249 2 files changed, 2 insertions(+), 0 deletions(-)
250 250
251 251
252 252 Write the introductory message for the patch series.
253 253
254 254
255 255 Displaying [PATCH 0 of 2] test ...
256 256 Content-Type: text/plain; charset="us-ascii"
257 257 MIME-Version: 1.0
258 258 Content-Transfer-Encoding: 7bit
259 259 Subject: [PATCH 0 of 2] test
260 260 Message-Id: <patchbomb.60@
261 261 Date: Thu, 01 Jan 1970 00:01:00 +0000
262 262 From: quux
263 263 To: foo
264 264 Cc: bar
265 265
266 266
267 267 a | 1 +
268 268 b | 1 +
269 269 2 files changed, 2 insertions(+), 0 deletions(-)
270 270
271 271 Displaying [PATCH 1 of 2] a ...
272 272 Content-Type: text/plain; charset="us-ascii"
273 273 MIME-Version: 1.0
274 274 Content-Transfer-Encoding: 7bit
275 275 Subject: [PATCH 1 of 2] a
276 276 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
277 277 Message-Id: <8580ff50825a50c8f716.61@
278 278 In-Reply-To: <patchbomb.60@
279 279 References: <patchbomb.60@
280 280 Date: Thu, 01 Jan 1970 00:01:01 +0000
281 281 From: quux
282 282 To: foo
283 283 Cc: bar
284 284
285 285 a | 1 +
286 286 1 files changed, 1 insertions(+), 0 deletions(-)
287 287
288 288
289 289 # HG changeset patch
290 290 # User test
291 291 # Date 1 0
292 292 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
293 293 # Parent 0000000000000000000000000000000000000000
294 294 a
295 295
296 296 diff -r 000000000000 -r 8580ff50825a a
297 297 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
298 298 +++ b/a Thu Jan 01 00:00:01 1970 +0000
299 299 @@ -0,0 +1,1 @@
300 300 +a
301 301
302 302 Displaying [PATCH 2 of 2] b ...
303 303 Content-Type: text/plain; charset="us-ascii"
304 304 MIME-Version: 1.0
305 305 Content-Transfer-Encoding: 7bit
306 306 Subject: [PATCH 2 of 2] b
307 307 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
308 308 Message-Id: <97d72e5f12c7e84f8506.62@
309 309 In-Reply-To: <patchbomb.60@
310 310 References: <patchbomb.60@
311 311 Date: Thu, 01 Jan 1970 00:01:02 +0000
312 312 From: quux
313 313 To: foo
314 314 Cc: bar
315 315
316 316 b | 1 +
317 317 1 files changed, 1 insertions(+), 0 deletions(-)
318 318
319 319
320 320 # HG changeset patch
321 321 # User test
322 322 # Date 2 0
323 323 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
324 324 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
325 325 b
326 326
327 327 diff -r 8580ff50825a -r 97d72e5f12c7 b
328 328 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
329 329 +++ b/b Thu Jan 01 00:00:02 1970 +0000
330 330 @@ -0,0 +1,1 @@
331 331 +b
332 332
333 333 % test inline for single patch
334 334 This patch series consists of 1 patches.
335 335
336 336
337 337 Displaying [PATCH] test ...
338 338 Content-Type: multipart/mixed; boundary="===
339 339 MIME-Version: 1.0
340 340 Subject: [PATCH] test
341 341 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
342 342 Message-Id: <ff2c9fa2018b15fa74b3.60@
343 343 Date: Thu, 01 Jan 1970 00:01:00 +0000
344 344 From: quux
345 345 To: foo
346 346 Cc: bar
347 347
348 348 --===
349 349 Content-Type: text/x-patch; charset="us-ascii"
350 350 MIME-Version: 1.0
351 351 Content-Transfer-Encoding: 7bit
352 352 Content-Disposition: inline; filename=t2.patch
353 353
354 354 # HG changeset patch
355 355 # User test
356 356 # Date 3 0
357 357 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
358 358 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
359 359 c
360 360
361 361 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
362 362 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
363 363 +++ b/c Thu Jan 01 00:00:03 1970 +0000
364 364 @@ -0,0 +1,1 @@
365 365 +c
366 366
367 367 --===
368 368 % test inline for multiple patches
369 369 This patch series consists of 2 patches.
370 370
371 371
372 372 Write the introductory message for the patch series.
373 373
374 374
375 375 Displaying [PATCH 0 of 2] test ...
376 376 Content-Type: text/plain; charset="us-ascii"
377 377 MIME-Version: 1.0
378 378 Content-Transfer-Encoding: 7bit
379 379 Subject: [PATCH 0 of 2] test
380 380 Message-Id: <patchbomb.60@
381 381 Date: Thu, 01 Jan 1970 00:01:00 +0000
382 382 From: quux
383 383 To: foo
384 384 Cc: bar
385 385
386 386
387 387 Displaying [PATCH 1 of 2] a ...
388 388 Content-Type: multipart/mixed; boundary="===
389 389 MIME-Version: 1.0
390 390 Subject: [PATCH 1 of 2] a
391 391 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
392 392 Message-Id: <8580ff50825a50c8f716.61@
393 393 In-Reply-To: <patchbomb.60@
394 394 References: <patchbomb.60@
395 395 Date: Thu, 01 Jan 1970 00:01:01 +0000
396 396 From: quux
397 397 To: foo
398 398 Cc: bar
399 399
400 400 --===
401 401 Content-Type: text/x-patch; charset="us-ascii"
402 402 MIME-Version: 1.0
403 403 Content-Transfer-Encoding: 7bit
404 404 Content-Disposition: inline; filename=t2-1.patch
405 405
406 406 # HG changeset patch
407 407 # User test
408 408 # Date 1 0
409 409 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
410 410 # Parent 0000000000000000000000000000000000000000
411 411 a
412 412
413 413 diff -r 000000000000 -r 8580ff50825a a
414 414 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
415 415 +++ b/a Thu Jan 01 00:00:01 1970 +0000
416 416 @@ -0,0 +1,1 @@
417 417 +a
418 418
419 419 --===
420 420 Displaying [PATCH 2 of 2] b ...
421 421 Content-Type: multipart/mixed; boundary="===
422 422 MIME-Version: 1.0
423 423 Subject: [PATCH 2 of 2] b
424 424 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
425 425 Message-Id: <97d72e5f12c7e84f8506.62@
426 426 In-Reply-To: <patchbomb.60@
427 427 References: <patchbomb.60@
428 428 Date: Thu, 01 Jan 1970 00:01:02 +0000
429 429 From: quux
430 430 To: foo
431 431 Cc: bar
432 432
433 433 --===
434 434 Content-Type: text/x-patch; charset="us-ascii"
435 435 MIME-Version: 1.0
436 436 Content-Transfer-Encoding: 7bit
437 437 Content-Disposition: inline; filename=t2-2.patch
438 438
439 439 # HG changeset patch
440 440 # User test
441 441 # Date 2 0
442 442 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
443 443 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
444 444 b
445 445
446 446 diff -r 8580ff50825a -r 97d72e5f12c7 b
447 447 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
448 448 +++ b/b Thu Jan 01 00:00:02 1970 +0000
449 449 @@ -0,0 +1,1 @@
450 450 +b
451 451
452 452 --===
453 453 % test attach for single patch
454 454 This patch series consists of 1 patches.
455 455
456 456
457 457 Displaying [PATCH] test ...
458 458 Content-Type: multipart/mixed; boundary="===
459 459 MIME-Version: 1.0
460 460 Subject: [PATCH] test
461 461 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
462 462 Message-Id: <ff2c9fa2018b15fa74b3.60@
463 463 Date: Thu, 01 Jan 1970 00:01:00 +0000
464 464 From: quux
465 465 To: foo
466 466 Cc: bar
467 467
468 468 --===
469 469 Content-Type: text/plain; charset="us-ascii"
470 470 MIME-Version: 1.0
471 471 Content-Transfer-Encoding: 7bit
472 472
473 473 Patch subject is complete summary.
474 474
475 475
476 476
477 477 --===
478 478 Content-Type: text/x-patch; charset="us-ascii"
479 479 MIME-Version: 1.0
480 480 Content-Transfer-Encoding: 7bit
481 481 Content-Disposition: attachment; filename=t2.patch
482 482
483 483 # HG changeset patch
484 484 # User test
485 485 # Date 3 0
486 486 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
487 487 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
488 488 c
489 489
490 490 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
491 491 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
492 492 +++ b/c Thu Jan 01 00:00:03 1970 +0000
493 493 @@ -0,0 +1,1 @@
494 494 +c
495 495
496 496 --===
497 497 % test attach for multiple patches
498 498 This patch series consists of 2 patches.
499 499
500 500
501 501 Write the introductory message for the patch series.
502 502
503 503
504 504 Displaying [PATCH 0 of 2] test ...
505 505 Content-Type: text/plain; charset="us-ascii"
506 506 MIME-Version: 1.0
507 507 Content-Transfer-Encoding: 7bit
508 508 Subject: [PATCH 0 of 2] test
509 509 Message-Id: <patchbomb.60@
510 510 Date: Thu, 01 Jan 1970 00:01:00 +0000
511 511 From: quux
512 512 To: foo
513 513 Cc: bar
514 514
515 515
516 516 Displaying [PATCH 1 of 2] a ...
517 517 Content-Type: multipart/mixed; boundary="===
518 518 MIME-Version: 1.0
519 519 Subject: [PATCH 1 of 2] a
520 520 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
521 521 Message-Id: <8580ff50825a50c8f716.61@
522 522 In-Reply-To: <patchbomb.60@
523 523 References: <patchbomb.60@
524 524 Date: Thu, 01 Jan 1970 00:01:01 +0000
525 525 From: quux
526 526 To: foo
527 527 Cc: bar
528 528
529 529 --===
530 530 Content-Type: text/plain; charset="us-ascii"
531 531 MIME-Version: 1.0
532 532 Content-Transfer-Encoding: 7bit
533 533
534 534 Patch subject is complete summary.
535 535
536 536
537 537
538 538 --===
539 539 Content-Type: text/x-patch; charset="us-ascii"
540 540 MIME-Version: 1.0
541 541 Content-Transfer-Encoding: 7bit
542 542 Content-Disposition: attachment; filename=t2-1.patch
543 543
544 544 # HG changeset patch
545 545 # User test
546 546 # Date 1 0
547 547 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
548 548 # Parent 0000000000000000000000000000000000000000
549 549 a
550 550
551 551 diff -r 000000000000 -r 8580ff50825a a
552 552 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
553 553 +++ b/a Thu Jan 01 00:00:01 1970 +0000
554 554 @@ -0,0 +1,1 @@
555 555 +a
556 556
557 557 --===
558 558 Displaying [PATCH 2 of 2] b ...
559 559 Content-Type: multipart/mixed; boundary="===
560 560 MIME-Version: 1.0
561 561 Subject: [PATCH 2 of 2] b
562 562 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
563 563 Message-Id: <97d72e5f12c7e84f8506.62@
564 564 In-Reply-To: <patchbomb.60@
565 565 References: <patchbomb.60@
566 566 Date: Thu, 01 Jan 1970 00:01:02 +0000
567 567 From: quux
568 568 To: foo
569 569 Cc: bar
570 570
571 571 --===
572 572 Content-Type: text/plain; charset="us-ascii"
573 573 MIME-Version: 1.0
574 574 Content-Transfer-Encoding: 7bit
575 575
576 576 Patch subject is complete summary.
577 577
578 578
579 579
580 580 --===
581 581 Content-Type: text/x-patch; charset="us-ascii"
582 582 MIME-Version: 1.0
583 583 Content-Transfer-Encoding: 7bit
584 584 Content-Disposition: attachment; filename=t2-2.patch
585 585
586 586 # HG changeset patch
587 587 # User test
588 588 # Date 2 0
589 589 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
590 590 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
591 591 b
592 592
593 593 diff -r 8580ff50825a -r 97d72e5f12c7 b
594 594 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
595 595 +++ b/b Thu Jan 01 00:00:02 1970 +0000
596 596 @@ -0,0 +1,1 @@
597 597 +b
598 598
599 599 --===
600 600 % test intro for single patch
601 601 This patch series consists of 1 patches.
602 602
603 603
604 604 Write the introductory message for the patch series.
605 605
606 606
607 607 Displaying [PATCH 0 of 1] test ...
608 608 Content-Type: text/plain; charset="us-ascii"
609 609 MIME-Version: 1.0
610 610 Content-Transfer-Encoding: 7bit
611 611 Subject: [PATCH 0 of 1] test
612 612 Message-Id: <patchbomb.60@
613 613 Date: Thu, 01 Jan 1970 00:01:00 +0000
614 614 From: quux
615 615 To: foo
616 616 Cc: bar
617 617
618 618
619 619 Displaying [PATCH 1 of 1] c ...
620 620 Content-Type: text/plain; charset="us-ascii"
621 621 MIME-Version: 1.0
622 622 Content-Transfer-Encoding: 7bit
623 623 Subject: [PATCH 1 of 1] c
624 624 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
625 625 Message-Id: <ff2c9fa2018b15fa74b3.61@
626 626 In-Reply-To: <patchbomb.60@
627 627 References: <patchbomb.60@
628 628 Date: Thu, 01 Jan 1970 00:01:01 +0000
629 629 From: quux
630 630 To: foo
631 631 Cc: bar
632 632
633 633 # HG changeset patch
634 634 # User test
635 635 # Date 3 0
636 636 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
637 637 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
638 638 c
639 639
640 640 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
641 641 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
642 642 +++ b/c Thu Jan 01 00:00:03 1970 +0000
643 643 @@ -0,0 +1,1 @@
644 644 +c
645 645
646 646 % test intro for multiple patches
647 647 This patch series consists of 2 patches.
648 648
649 649
650 650 Write the introductory message for the patch series.
651 651
652 652
653 653 Displaying [PATCH 0 of 2] test ...
654 654 Content-Type: text/plain; charset="us-ascii"
655 655 MIME-Version: 1.0
656 656 Content-Transfer-Encoding: 7bit
657 657 Subject: [PATCH 0 of 2] test
658 658 Message-Id: <patchbomb.60@
659 659 Date: Thu, 01 Jan 1970 00:01:00 +0000
660 660 From: quux
661 661 To: foo
662 662 Cc: bar
663 663
664 664
665 665 Displaying [PATCH 1 of 2] a ...
666 666 Content-Type: text/plain; charset="us-ascii"
667 667 MIME-Version: 1.0
668 668 Content-Transfer-Encoding: 7bit
669 669 Subject: [PATCH 1 of 2] a
670 670 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
671 671 Message-Id: <8580ff50825a50c8f716.61@
672 672 In-Reply-To: <patchbomb.60@
673 673 References: <patchbomb.60@
674 674 Date: Thu, 01 Jan 1970 00:01:01 +0000
675 675 From: quux
676 676 To: foo
677 677 Cc: bar
678 678
679 679 # HG changeset patch
680 680 # User test
681 681 # Date 1 0
682 682 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
683 683 # Parent 0000000000000000000000000000000000000000
684 684 a
685 685
686 686 diff -r 000000000000 -r 8580ff50825a a
687 687 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
688 688 +++ b/a Thu Jan 01 00:00:01 1970 +0000
689 689 @@ -0,0 +1,1 @@
690 690 +a
691 691
692 692 Displaying [PATCH 2 of 2] b ...
693 693 Content-Type: text/plain; charset="us-ascii"
694 694 MIME-Version: 1.0
695 695 Content-Transfer-Encoding: 7bit
696 696 Subject: [PATCH 2 of 2] b
697 697 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
698 698 Message-Id: <97d72e5f12c7e84f8506.62@
699 699 In-Reply-To: <patchbomb.60@
700 700 References: <patchbomb.60@
701 701 Date: Thu, 01 Jan 1970 00:01:02 +0000
702 702 From: quux
703 703 To: foo
704 704 Cc: bar
705 705
706 706 # HG changeset patch
707 707 # User test
708 708 # Date 2 0
709 709 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
710 710 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
711 711 b
712 712
713 713 diff -r 8580ff50825a -r 97d72e5f12c7 b
714 714 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
715 715 +++ b/b Thu Jan 01 00:00:02 1970 +0000
716 716 @@ -0,0 +1,1 @@
717 717 +b
718 718
719 719 % tagging csets
720 720 % test inline for single named patch
721 721 This patch series consists of 1 patches.
722 722
723 723
724 724 Displaying [PATCH] test ...
725 725 Content-Type: multipart/mixed; boundary="===
726 726 MIME-Version: 1.0
727 727 Subject: [PATCH] test
728 728 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
729 729 Message-Id: <ff2c9fa2018b15fa74b3.60@
730 730 Date: Thu, 01 Jan 1970 00:01:00 +0000
731 731 From: quux
732 732 To: foo
733 733 Cc: bar
734 734
735 735 --===
736 736 Content-Type: text/x-patch; charset="us-ascii"
737 737 MIME-Version: 1.0
738 738 Content-Transfer-Encoding: 7bit
739 739 Content-Disposition: inline; filename=two.diff
740 740
741 741 # HG changeset patch
742 742 # User test
743 743 # Date 3 0
744 744 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
745 745 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
746 746 c
747 747
748 748 diff -r 97d72e5f12c7 -r ff2c9fa2018b c
749 749 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
750 750 +++ b/c Thu Jan 01 00:00:03 1970 +0000
751 751 @@ -0,0 +1,1 @@
752 752 +c
753 753
754 754 --===
755 755 % test inline for multiple named/unnamed patches
756 756 This patch series consists of 2 patches.
757 757
758 758
759 759 Write the introductory message for the patch series.
760 760
761 761
762 762 Displaying [PATCH 0 of 2] test ...
763 763 Content-Type: text/plain; charset="us-ascii"
764 764 MIME-Version: 1.0
765 765 Content-Transfer-Encoding: 7bit
766 766 Subject: [PATCH 0 of 2] test
767 767 Message-Id: <patchbomb.60@
768 768 Date: Thu, 01 Jan 1970 00:01:00 +0000
769 769 From: quux
770 770 To: foo
771 771 Cc: bar
772 772
773 773
774 774 Displaying [PATCH 1 of 2] a ...
775 775 Content-Type: multipart/mixed; boundary="===
776 776 MIME-Version: 1.0
777 777 Subject: [PATCH 1 of 2] a
778 778 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
779 779 Message-Id: <8580ff50825a50c8f716.61@
780 780 In-Reply-To: <patchbomb.60@
781 781 References: <patchbomb.60@
782 782 Date: Thu, 01 Jan 1970 00:01:01 +0000
783 783 From: quux
784 784 To: foo
785 785 Cc: bar
786 786
787 787 --===
788 788 Content-Type: text/x-patch; charset="us-ascii"
789 789 MIME-Version: 1.0
790 790 Content-Transfer-Encoding: 7bit
791 791 Content-Disposition: inline; filename=t2-1.patch
792 792
793 793 # HG changeset patch
794 794 # User test
795 795 # Date 1 0
796 796 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
797 797 # Parent 0000000000000000000000000000000000000000
798 798 a
799 799
800 800 diff -r 000000000000 -r 8580ff50825a a
801 801 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
802 802 +++ b/a Thu Jan 01 00:00:01 1970 +0000
803 803 @@ -0,0 +1,1 @@
804 804 +a
805 805
806 806 --===
807 807 Displaying [PATCH 2 of 2] b ...
808 808 Content-Type: multipart/mixed; boundary="===
809 809 MIME-Version: 1.0
810 810 Subject: [PATCH 2 of 2] b
811 811 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
812 812 Message-Id: <97d72e5f12c7e84f8506.62@
813 813 In-Reply-To: <patchbomb.60@
814 814 References: <patchbomb.60@
815 815 Date: Thu, 01 Jan 1970 00:01:02 +0000
816 816 From: quux
817 817 To: foo
818 818 Cc: bar
819 819
820 820 --===
821 821 Content-Type: text/x-patch; charset="us-ascii"
822 822 MIME-Version: 1.0
823 823 Content-Transfer-Encoding: 7bit
824 824 Content-Disposition: inline; filename=one.patch
825 825
826 826 # HG changeset patch
827 827 # User test
828 828 # Date 2 0
829 829 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
830 830 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
831 831 b
832 832
833 833 diff -r 8580ff50825a -r 97d72e5f12c7 b
834 834 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
835 835 +++ b/b Thu Jan 01 00:00:02 1970 +0000
836 836 @@ -0,0 +1,1 @@
837 837 +b
838 838
839 839 --===
840 % test inreplyto
841 This patch series consists of 1 patches.
842
843
844 Displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
845 Content-Type: text/plain; charset="us-ascii"
846 MIME-Version: 1.0
847 Content-Transfer-Encoding: 7bit
848 Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
849 X-Mercurial-Node: 2c502b2db30e1ddd5e4ecabd68d9002f6c77a5a3
850 Message-Id: <2c502b2db30e1ddd5e4e.60@
851 In-Reply-To: baz
852 References: baz
853 Date: Thu, 01 Jan 1970 00:01:00 +0000
854 From: quux
855 To: foo
856 Cc: bar
857
858 # HG changeset patch
859 # User test
860 # Date 0 0
861 # Node ID 2c502b2db30e1ddd5e4ecabd68d9002f6c77a5a3
862 # Parent 91c0d1bdb4bc9cfd3b38a53a5ec53e9ae412a275
863 Added tag two, two.diff for changeset ff2c9fa2018b
864
865 diff -r 91c0d1bdb4bc -r 2c502b2db30e .hgtags
866 --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
867 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
868 @@ -2,3 +2,5 @@
869 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
870 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
871 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
872 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
873 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
874
General Comments 0
You need to be logged in to leave comments. Login now