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