Show More
@@ -1,406 +1,407 b'' | |||||
1 | # mail.py - mail sending bits for mercurial |
|
1 | # mail.py - mail sending bits for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import email |
|
10 | import email | |
11 | import email.charset |
|
11 | import email.charset | |
12 | import email.header |
|
12 | import email.header | |
13 | import email.message |
|
13 | import email.message | |
14 | import email.parser |
|
14 | import email.parser | |
15 | import io |
|
15 | import io | |
16 | import os |
|
16 | import os | |
17 | import smtplib |
|
17 | import smtplib | |
18 | import socket |
|
18 | import socket | |
19 | import time |
|
19 | import time | |
20 |
|
20 | |||
21 | from .i18n import _ |
|
21 | from .i18n import _ | |
22 | from . import ( |
|
22 | from . import ( | |
23 | encoding, |
|
23 | encoding, | |
24 | error, |
|
24 | error, | |
25 | pycompat, |
|
25 | pycompat, | |
26 | sslutil, |
|
26 | sslutil, | |
27 | util, |
|
27 | util, | |
28 | ) |
|
28 | ) | |
29 | from .utils import ( |
|
29 | from .utils import ( | |
30 | procutil, |
|
30 | procutil, | |
31 | stringutil, |
|
31 | stringutil, | |
32 | ) |
|
32 | ) | |
33 |
|
33 | |||
34 | class STARTTLS(smtplib.SMTP): |
|
34 | class STARTTLS(smtplib.SMTP): | |
35 | '''Derived class to verify the peer certificate for STARTTLS. |
|
35 | '''Derived class to verify the peer certificate for STARTTLS. | |
36 |
|
36 | |||
37 | This class allows to pass any keyword arguments to SSL socket creation. |
|
37 | This class allows to pass any keyword arguments to SSL socket creation. | |
38 | ''' |
|
38 | ''' | |
39 | def __init__(self, ui, host=None, **kwargs): |
|
39 | def __init__(self, ui, host=None, **kwargs): | |
40 | smtplib.SMTP.__init__(self, **kwargs) |
|
40 | smtplib.SMTP.__init__(self, **kwargs) | |
41 | self._ui = ui |
|
41 | self._ui = ui | |
42 | self._host = host |
|
42 | self._host = host | |
43 |
|
43 | |||
44 | def starttls(self, keyfile=None, certfile=None): |
|
44 | def starttls(self, keyfile=None, certfile=None): | |
45 | if not self.has_extn("starttls"): |
|
45 | if not self.has_extn("starttls"): | |
46 | msg = "STARTTLS extension not supported by server" |
|
46 | msg = "STARTTLS extension not supported by server" | |
47 | raise smtplib.SMTPException(msg) |
|
47 | raise smtplib.SMTPException(msg) | |
48 | (resp, reply) = self.docmd("STARTTLS") |
|
48 | (resp, reply) = self.docmd("STARTTLS") | |
49 | if resp == 220: |
|
49 | if resp == 220: | |
50 | self.sock = sslutil.wrapsocket(self.sock, keyfile, certfile, |
|
50 | self.sock = sslutil.wrapsocket(self.sock, keyfile, certfile, | |
51 | ui=self._ui, |
|
51 | ui=self._ui, | |
52 | serverhostname=self._host) |
|
52 | serverhostname=self._host) | |
53 | self.file = smtplib.SSLFakeFile(self.sock) |
|
53 | self.file = smtplib.SSLFakeFile(self.sock) | |
54 | self.helo_resp = None |
|
54 | self.helo_resp = None | |
55 | self.ehlo_resp = None |
|
55 | self.ehlo_resp = None | |
56 | self.esmtp_features = {} |
|
56 | self.esmtp_features = {} | |
57 | self.does_esmtp = 0 |
|
57 | self.does_esmtp = 0 | |
58 | return (resp, reply) |
|
58 | return (resp, reply) | |
59 |
|
59 | |||
60 | class SMTPS(smtplib.SMTP): |
|
60 | class SMTPS(smtplib.SMTP): | |
61 | '''Derived class to verify the peer certificate for SMTPS. |
|
61 | '''Derived class to verify the peer certificate for SMTPS. | |
62 |
|
62 | |||
63 | This class allows to pass any keyword arguments to SSL socket creation. |
|
63 | This class allows to pass any keyword arguments to SSL socket creation. | |
64 | ''' |
|
64 | ''' | |
65 | def __init__(self, ui, keyfile=None, certfile=None, host=None, |
|
65 | def __init__(self, ui, keyfile=None, certfile=None, host=None, | |
66 | **kwargs): |
|
66 | **kwargs): | |
67 | self.keyfile = keyfile |
|
67 | self.keyfile = keyfile | |
68 | self.certfile = certfile |
|
68 | self.certfile = certfile | |
69 | smtplib.SMTP.__init__(self, **kwargs) |
|
69 | smtplib.SMTP.__init__(self, **kwargs) | |
70 | self._host = host |
|
70 | self._host = host | |
71 | self.default_port = smtplib.SMTP_SSL_PORT |
|
71 | self.default_port = smtplib.SMTP_SSL_PORT | |
72 | self._ui = ui |
|
72 | self._ui = ui | |
73 |
|
73 | |||
74 | def _get_socket(self, host, port, timeout): |
|
74 | def _get_socket(self, host, port, timeout): | |
75 | if self.debuglevel > 0: |
|
75 | if self.debuglevel > 0: | |
76 | self._ui.debug('connect: %r\n' % ((host, port),)) |
|
76 | self._ui.debug('connect: %r\n' % ((host, port),)) | |
77 | new_socket = socket.create_connection((host, port), timeout) |
|
77 | new_socket = socket.create_connection((host, port), timeout) | |
78 | new_socket = sslutil.wrapsocket(new_socket, |
|
78 | new_socket = sslutil.wrapsocket(new_socket, | |
79 | self.keyfile, self.certfile, |
|
79 | self.keyfile, self.certfile, | |
80 | ui=self._ui, |
|
80 | ui=self._ui, | |
81 | serverhostname=self._host) |
|
81 | serverhostname=self._host) | |
82 | self.file = new_socket.makefile(r'rb') |
|
82 | self.file = new_socket.makefile(r'rb') | |
83 | return new_socket |
|
83 | return new_socket | |
84 |
|
84 | |||
85 | def _pyhastls(): |
|
85 | def _pyhastls(): | |
86 | """Returns true iff Python has TLS support, false otherwise.""" |
|
86 | """Returns true iff Python has TLS support, false otherwise.""" | |
87 | try: |
|
87 | try: | |
88 | import ssl |
|
88 | import ssl | |
89 | getattr(ssl, 'HAS_TLS', False) |
|
89 | getattr(ssl, 'HAS_TLS', False) | |
90 | return True |
|
90 | return True | |
91 | except ImportError: |
|
91 | except ImportError: | |
92 | return False |
|
92 | return False | |
93 |
|
93 | |||
94 | def _smtp(ui): |
|
94 | def _smtp(ui): | |
95 | '''build an smtp connection and return a function to send mail''' |
|
95 | '''build an smtp connection and return a function to send mail''' | |
96 | local_hostname = ui.config('smtp', 'local_hostname') |
|
96 | local_hostname = ui.config('smtp', 'local_hostname') | |
97 | tls = ui.config('smtp', 'tls') |
|
97 | tls = ui.config('smtp', 'tls') | |
98 | # backward compatible: when tls = true, we use starttls. |
|
98 | # backward compatible: when tls = true, we use starttls. | |
99 | starttls = tls == 'starttls' or stringutil.parsebool(tls) |
|
99 | starttls = tls == 'starttls' or stringutil.parsebool(tls) | |
100 | smtps = tls == 'smtps' |
|
100 | smtps = tls == 'smtps' | |
101 | if (starttls or smtps) and not _pyhastls(): |
|
101 | if (starttls or smtps) and not _pyhastls(): | |
102 | raise error.Abort(_("can't use TLS: Python SSL support not installed")) |
|
102 | raise error.Abort(_("can't use TLS: Python SSL support not installed")) | |
103 | mailhost = ui.config('smtp', 'host') |
|
103 | mailhost = ui.config('smtp', 'host') | |
104 | if not mailhost: |
|
104 | if not mailhost: | |
105 | raise error.Abort(_('smtp.host not configured - cannot send mail')) |
|
105 | raise error.Abort(_('smtp.host not configured - cannot send mail')) | |
106 | if smtps: |
|
106 | if smtps: | |
107 | ui.note(_('(using smtps)\n')) |
|
107 | ui.note(_('(using smtps)\n')) | |
108 | s = SMTPS(ui, local_hostname=local_hostname, host=mailhost) |
|
108 | s = SMTPS(ui, local_hostname=local_hostname, host=mailhost) | |
109 | elif starttls: |
|
109 | elif starttls: | |
110 | s = STARTTLS(ui, local_hostname=local_hostname, host=mailhost) |
|
110 | s = STARTTLS(ui, local_hostname=local_hostname, host=mailhost) | |
111 | else: |
|
111 | else: | |
112 | s = smtplib.SMTP(local_hostname=local_hostname) |
|
112 | s = smtplib.SMTP(local_hostname=local_hostname) | |
113 | if smtps: |
|
113 | if smtps: | |
114 | defaultport = 465 |
|
114 | defaultport = 465 | |
115 | else: |
|
115 | else: | |
116 | defaultport = 25 |
|
116 | defaultport = 25 | |
117 | mailport = util.getport(ui.config('smtp', 'port', defaultport)) |
|
117 | mailport = util.getport(ui.config('smtp', 'port', defaultport)) | |
118 | ui.note(_('sending mail: smtp host %s, port %d\n') % |
|
118 | ui.note(_('sending mail: smtp host %s, port %d\n') % | |
119 | (mailhost, mailport)) |
|
119 | (mailhost, mailport)) | |
120 | s.connect(host=mailhost, port=mailport) |
|
120 | s.connect(host=mailhost, port=mailport) | |
121 | if starttls: |
|
121 | if starttls: | |
122 | ui.note(_('(using starttls)\n')) |
|
122 | ui.note(_('(using starttls)\n')) | |
123 | s.ehlo() |
|
123 | s.ehlo() | |
124 | s.starttls() |
|
124 | s.starttls() | |
125 | s.ehlo() |
|
125 | s.ehlo() | |
126 | if starttls or smtps: |
|
126 | if starttls or smtps: | |
127 | ui.note(_('(verifying remote certificate)\n')) |
|
127 | ui.note(_('(verifying remote certificate)\n')) | |
128 | sslutil.validatesocket(s.sock) |
|
128 | sslutil.validatesocket(s.sock) | |
129 | username = ui.config('smtp', 'username') |
|
129 | username = ui.config('smtp', 'username') | |
130 | password = ui.config('smtp', 'password') |
|
130 | password = ui.config('smtp', 'password') | |
131 | if username and not password: |
|
131 | if username and not password: | |
132 | password = ui.getpass() |
|
132 | password = ui.getpass() | |
133 | if username and password: |
|
133 | if username and password: | |
134 | ui.note(_('(authenticating to mail server as %s)\n') % |
|
134 | ui.note(_('(authenticating to mail server as %s)\n') % | |
135 | (username)) |
|
135 | (username)) | |
136 | try: |
|
136 | try: | |
137 | s.login(username, password) |
|
137 | s.login(username, password) | |
138 | except smtplib.SMTPException as inst: |
|
138 | except smtplib.SMTPException as inst: | |
139 | raise error.Abort(inst) |
|
139 | raise error.Abort(inst) | |
140 |
|
140 | |||
141 | def send(sender, recipients, msg): |
|
141 | def send(sender, recipients, msg): | |
142 | try: |
|
142 | try: | |
143 | return s.sendmail(sender, recipients, msg) |
|
143 | return s.sendmail(sender, recipients, msg) | |
144 | except smtplib.SMTPRecipientsRefused as inst: |
|
144 | except smtplib.SMTPRecipientsRefused as inst: | |
145 | recipients = [r[1] for r in inst.recipients.values()] |
|
145 | recipients = [r[1] for r in inst.recipients.values()] | |
146 | raise error.Abort('\n' + '\n'.join(recipients)) |
|
146 | raise error.Abort('\n' + '\n'.join(recipients)) | |
147 | except smtplib.SMTPException as inst: |
|
147 | except smtplib.SMTPException as inst: | |
148 | raise error.Abort(inst) |
|
148 | raise error.Abort(inst) | |
149 |
|
149 | |||
150 | return send |
|
150 | return send | |
151 |
|
151 | |||
152 | def _sendmail(ui, sender, recipients, msg): |
|
152 | def _sendmail(ui, sender, recipients, msg): | |
153 | '''send mail using sendmail.''' |
|
153 | '''send mail using sendmail.''' | |
154 | program = ui.config('email', 'method') |
|
154 | program = ui.config('email', 'method') | |
155 | stremail = lambda x: stringutil.email(encoding.strtolocal(x)) |
|
155 | stremail = lambda x: ( | |
|
156 | procutil.quote(stringutil.email(encoding.strtolocal(x)))) | |||
156 | cmdline = '%s -f %s %s' % (program, stremail(sender), |
|
157 | cmdline = '%s -f %s %s' % (program, stremail(sender), | |
157 | ' '.join(map(stremail, recipients))) |
|
158 | ' '.join(map(stremail, recipients))) | |
158 | ui.note(_('sending mail: %s\n') % cmdline) |
|
159 | ui.note(_('sending mail: %s\n') % cmdline) | |
159 | fp = procutil.popen(cmdline, 'wb') |
|
160 | fp = procutil.popen(cmdline, 'wb') | |
160 | fp.write(util.tonativeeol(msg)) |
|
161 | fp.write(util.tonativeeol(msg)) | |
161 | ret = fp.close() |
|
162 | ret = fp.close() | |
162 | if ret: |
|
163 | if ret: | |
163 | raise error.Abort('%s %s' % ( |
|
164 | raise error.Abort('%s %s' % ( | |
164 | os.path.basename(program.split(None, 1)[0]), |
|
165 | os.path.basename(program.split(None, 1)[0]), | |
165 | procutil.explainexit(ret))) |
|
166 | procutil.explainexit(ret))) | |
166 |
|
167 | |||
167 | def _mbox(mbox, sender, recipients, msg): |
|
168 | def _mbox(mbox, sender, recipients, msg): | |
168 | '''write mails to mbox''' |
|
169 | '''write mails to mbox''' | |
169 | fp = open(mbox, 'ab+') |
|
170 | fp = open(mbox, 'ab+') | |
170 | # Should be time.asctime(), but Windows prints 2-characters day |
|
171 | # Should be time.asctime(), but Windows prints 2-characters day | |
171 | # of month instead of one. Make them print the same thing. |
|
172 | # of month instead of one. Make them print the same thing. | |
172 | date = time.strftime(r'%a %b %d %H:%M:%S %Y', time.localtime()) |
|
173 | date = time.strftime(r'%a %b %d %H:%M:%S %Y', time.localtime()) | |
173 | fp.write('From %s %s\n' % (encoding.strtolocal(sender), |
|
174 | fp.write('From %s %s\n' % (encoding.strtolocal(sender), | |
174 | encoding.strtolocal(date))) |
|
175 | encoding.strtolocal(date))) | |
175 | fp.write(msg) |
|
176 | fp.write(msg) | |
176 | fp.write('\n\n') |
|
177 | fp.write('\n\n') | |
177 | fp.close() |
|
178 | fp.close() | |
178 |
|
179 | |||
179 | def connect(ui, mbox=None): |
|
180 | def connect(ui, mbox=None): | |
180 | '''make a mail connection. return a function to send mail. |
|
181 | '''make a mail connection. return a function to send mail. | |
181 | call as sendmail(sender, list-of-recipients, msg).''' |
|
182 | call as sendmail(sender, list-of-recipients, msg).''' | |
182 | if mbox: |
|
183 | if mbox: | |
183 | open(mbox, 'wb').close() |
|
184 | open(mbox, 'wb').close() | |
184 | return lambda s, r, m: _mbox(mbox, s, r, m) |
|
185 | return lambda s, r, m: _mbox(mbox, s, r, m) | |
185 | if ui.config('email', 'method') == 'smtp': |
|
186 | if ui.config('email', 'method') == 'smtp': | |
186 | return _smtp(ui) |
|
187 | return _smtp(ui) | |
187 | return lambda s, r, m: _sendmail(ui, s, r, m) |
|
188 | return lambda s, r, m: _sendmail(ui, s, r, m) | |
188 |
|
189 | |||
189 | def sendmail(ui, sender, recipients, msg, mbox=None): |
|
190 | def sendmail(ui, sender, recipients, msg, mbox=None): | |
190 | send = connect(ui, mbox=mbox) |
|
191 | send = connect(ui, mbox=mbox) | |
191 | return send(sender, recipients, msg) |
|
192 | return send(sender, recipients, msg) | |
192 |
|
193 | |||
193 | def validateconfig(ui): |
|
194 | def validateconfig(ui): | |
194 | '''determine if we have enough config data to try sending email.''' |
|
195 | '''determine if we have enough config data to try sending email.''' | |
195 | method = ui.config('email', 'method') |
|
196 | method = ui.config('email', 'method') | |
196 | if method == 'smtp': |
|
197 | if method == 'smtp': | |
197 | if not ui.config('smtp', 'host'): |
|
198 | if not ui.config('smtp', 'host'): | |
198 | raise error.Abort(_('smtp specified as email transport, ' |
|
199 | raise error.Abort(_('smtp specified as email transport, ' | |
199 | 'but no smtp host configured')) |
|
200 | 'but no smtp host configured')) | |
200 | else: |
|
201 | else: | |
201 | if not procutil.findexe(method): |
|
202 | if not procutil.findexe(method): | |
202 | raise error.Abort(_('%r specified as email transport, ' |
|
203 | raise error.Abort(_('%r specified as email transport, ' | |
203 | 'but not in PATH') % method) |
|
204 | 'but not in PATH') % method) | |
204 |
|
205 | |||
205 | def codec2iana(cs): |
|
206 | def codec2iana(cs): | |
206 | '''''' |
|
207 | '''''' | |
207 | cs = pycompat.sysbytes(email.charset.Charset(cs).input_charset.lower()) |
|
208 | cs = pycompat.sysbytes(email.charset.Charset(cs).input_charset.lower()) | |
208 |
|
209 | |||
209 | # "latin1" normalizes to "iso8859-1", standard calls for "iso-8859-1" |
|
210 | # "latin1" normalizes to "iso8859-1", standard calls for "iso-8859-1" | |
210 | if cs.startswith("iso") and not cs.startswith("iso-"): |
|
211 | if cs.startswith("iso") and not cs.startswith("iso-"): | |
211 | return "iso-" + cs[3:] |
|
212 | return "iso-" + cs[3:] | |
212 | return cs |
|
213 | return cs | |
213 |
|
214 | |||
214 | def mimetextpatch(s, subtype='plain', display=False): |
|
215 | def mimetextpatch(s, subtype='plain', display=False): | |
215 | '''Return MIME message suitable for a patch. |
|
216 | '''Return MIME message suitable for a patch. | |
216 | Charset will be detected by first trying to decode as us-ascii, then utf-8, |
|
217 | Charset will be detected by first trying to decode as us-ascii, then utf-8, | |
217 | and finally the global encodings. If all those fail, fall back to |
|
218 | and finally the global encodings. If all those fail, fall back to | |
218 | ISO-8859-1, an encoding with that allows all byte sequences. |
|
219 | ISO-8859-1, an encoding with that allows all byte sequences. | |
219 | Transfer encodings will be used if necessary.''' |
|
220 | Transfer encodings will be used if necessary.''' | |
220 |
|
221 | |||
221 | cs = ['us-ascii', 'utf-8', encoding.encoding, encoding.fallbackencoding] |
|
222 | cs = ['us-ascii', 'utf-8', encoding.encoding, encoding.fallbackencoding] | |
222 | if display: |
|
223 | if display: | |
223 | cs = ['us-ascii'] |
|
224 | cs = ['us-ascii'] | |
224 | for charset in cs: |
|
225 | for charset in cs: | |
225 | try: |
|
226 | try: | |
226 | s.decode(pycompat.sysstr(charset)) |
|
227 | s.decode(pycompat.sysstr(charset)) | |
227 | return mimetextqp(s, subtype, codec2iana(charset)) |
|
228 | return mimetextqp(s, subtype, codec2iana(charset)) | |
228 | except UnicodeDecodeError: |
|
229 | except UnicodeDecodeError: | |
229 | pass |
|
230 | pass | |
230 |
|
231 | |||
231 | return mimetextqp(s, subtype, "iso-8859-1") |
|
232 | return mimetextqp(s, subtype, "iso-8859-1") | |
232 |
|
233 | |||
233 | def mimetextqp(body, subtype, charset): |
|
234 | def mimetextqp(body, subtype, charset): | |
234 | '''Return MIME message. |
|
235 | '''Return MIME message. | |
235 | Quoted-printable transfer encoding will be used if necessary. |
|
236 | Quoted-printable transfer encoding will be used if necessary. | |
236 | ''' |
|
237 | ''' | |
237 | cs = email.charset.Charset(charset) |
|
238 | cs = email.charset.Charset(charset) | |
238 | msg = email.message.Message() |
|
239 | msg = email.message.Message() | |
239 | msg.set_type(pycompat.sysstr('text/' + subtype)) |
|
240 | msg.set_type(pycompat.sysstr('text/' + subtype)) | |
240 |
|
241 | |||
241 | for line in body.splitlines(): |
|
242 | for line in body.splitlines(): | |
242 | if len(line) > 950: |
|
243 | if len(line) > 950: | |
243 | cs.body_encoding = email.charset.QP |
|
244 | cs.body_encoding = email.charset.QP | |
244 | break |
|
245 | break | |
245 |
|
246 | |||
246 | # On Python 2, this simply assigns a value. Python 3 inspects |
|
247 | # On Python 2, this simply assigns a value. Python 3 inspects | |
247 | # body and does different things depending on whether it has |
|
248 | # body and does different things depending on whether it has | |
248 | # encode() or decode() attributes. We can get the old behavior |
|
249 | # encode() or decode() attributes. We can get the old behavior | |
249 | # if we pass a str and charset is None and we call set_charset(). |
|
250 | # if we pass a str and charset is None and we call set_charset(). | |
250 | # But we may get into trouble later due to Python attempting to |
|
251 | # But we may get into trouble later due to Python attempting to | |
251 | # encode/decode using the registered charset (or attempting to |
|
252 | # encode/decode using the registered charset (or attempting to | |
252 | # use ascii in the absence of a charset). |
|
253 | # use ascii in the absence of a charset). | |
253 | msg.set_payload(body, cs) |
|
254 | msg.set_payload(body, cs) | |
254 |
|
255 | |||
255 | return msg |
|
256 | return msg | |
256 |
|
257 | |||
257 | def _charsets(ui): |
|
258 | def _charsets(ui): | |
258 | '''Obtains charsets to send mail parts not containing patches.''' |
|
259 | '''Obtains charsets to send mail parts not containing patches.''' | |
259 | charsets = [cs.lower() for cs in ui.configlist('email', 'charsets')] |
|
260 | charsets = [cs.lower() for cs in ui.configlist('email', 'charsets')] | |
260 | fallbacks = [encoding.fallbackencoding.lower(), |
|
261 | fallbacks = [encoding.fallbackencoding.lower(), | |
261 | encoding.encoding.lower(), 'utf-8'] |
|
262 | encoding.encoding.lower(), 'utf-8'] | |
262 | for cs in fallbacks: # find unique charsets while keeping order |
|
263 | for cs in fallbacks: # find unique charsets while keeping order | |
263 | if cs not in charsets: |
|
264 | if cs not in charsets: | |
264 | charsets.append(cs) |
|
265 | charsets.append(cs) | |
265 | return [cs for cs in charsets if not cs.endswith('ascii')] |
|
266 | return [cs for cs in charsets if not cs.endswith('ascii')] | |
266 |
|
267 | |||
267 | def _encode(ui, s, charsets): |
|
268 | def _encode(ui, s, charsets): | |
268 | '''Returns (converted) string, charset tuple. |
|
269 | '''Returns (converted) string, charset tuple. | |
269 | Finds out best charset by cycling through sendcharsets in descending |
|
270 | Finds out best charset by cycling through sendcharsets in descending | |
270 | order. Tries both encoding and fallbackencoding for input. Only as |
|
271 | order. Tries both encoding and fallbackencoding for input. Only as | |
271 | last resort send as is in fake ascii. |
|
272 | last resort send as is in fake ascii. | |
272 | Caveat: Do not use for mail parts containing patches!''' |
|
273 | Caveat: Do not use for mail parts containing patches!''' | |
273 | sendcharsets = charsets or _charsets(ui) |
|
274 | sendcharsets = charsets or _charsets(ui) | |
274 | if not isinstance(s, bytes): |
|
275 | if not isinstance(s, bytes): | |
275 | # We have unicode data, which we need to try and encode to |
|
276 | # We have unicode data, which we need to try and encode to | |
276 | # some reasonable-ish encoding. Try the encodings the user |
|
277 | # some reasonable-ish encoding. Try the encodings the user | |
277 | # wants, and fall back to garbage-in-ascii. |
|
278 | # wants, and fall back to garbage-in-ascii. | |
278 | for ocs in sendcharsets: |
|
279 | for ocs in sendcharsets: | |
279 | try: |
|
280 | try: | |
280 | return s.encode(pycompat.sysstr(ocs)), ocs |
|
281 | return s.encode(pycompat.sysstr(ocs)), ocs | |
281 | except UnicodeEncodeError: |
|
282 | except UnicodeEncodeError: | |
282 | pass |
|
283 | pass | |
283 | except LookupError: |
|
284 | except LookupError: | |
284 | ui.warn(_('ignoring invalid sendcharset: %s\n') % ocs) |
|
285 | ui.warn(_('ignoring invalid sendcharset: %s\n') % ocs) | |
285 | else: |
|
286 | else: | |
286 | # Everything failed, ascii-armor what we've got and send it. |
|
287 | # Everything failed, ascii-armor what we've got and send it. | |
287 | return s.encode('ascii', 'backslashreplace') |
|
288 | return s.encode('ascii', 'backslashreplace') | |
288 | # We have a bytes of unknown encoding. We'll try and guess a valid |
|
289 | # We have a bytes of unknown encoding. We'll try and guess a valid | |
289 | # encoding, falling back to pretending we had ascii even though we |
|
290 | # encoding, falling back to pretending we had ascii even though we | |
290 | # know that's wrong. |
|
291 | # know that's wrong. | |
291 | try: |
|
292 | try: | |
292 | s.decode('ascii') |
|
293 | s.decode('ascii') | |
293 | except UnicodeDecodeError: |
|
294 | except UnicodeDecodeError: | |
294 | for ics in (encoding.encoding, encoding.fallbackencoding): |
|
295 | for ics in (encoding.encoding, encoding.fallbackencoding): | |
295 | try: |
|
296 | try: | |
296 | u = s.decode(ics) |
|
297 | u = s.decode(ics) | |
297 | except UnicodeDecodeError: |
|
298 | except UnicodeDecodeError: | |
298 | continue |
|
299 | continue | |
299 | for ocs in sendcharsets: |
|
300 | for ocs in sendcharsets: | |
300 | try: |
|
301 | try: | |
301 | return u.encode(pycompat.sysstr(ocs)), ocs |
|
302 | return u.encode(pycompat.sysstr(ocs)), ocs | |
302 | except UnicodeEncodeError: |
|
303 | except UnicodeEncodeError: | |
303 | pass |
|
304 | pass | |
304 | except LookupError: |
|
305 | except LookupError: | |
305 | ui.warn(_('ignoring invalid sendcharset: %s\n') % ocs) |
|
306 | ui.warn(_('ignoring invalid sendcharset: %s\n') % ocs) | |
306 | # if ascii, or all conversion attempts fail, send (broken) ascii |
|
307 | # if ascii, or all conversion attempts fail, send (broken) ascii | |
307 | return s, 'us-ascii' |
|
308 | return s, 'us-ascii' | |
308 |
|
309 | |||
309 | def headencode(ui, s, charsets=None, display=False): |
|
310 | def headencode(ui, s, charsets=None, display=False): | |
310 | '''Returns RFC-2047 compliant header from given string.''' |
|
311 | '''Returns RFC-2047 compliant header from given string.''' | |
311 | if not display: |
|
312 | if not display: | |
312 | # split into words? |
|
313 | # split into words? | |
313 | s, cs = _encode(ui, s, charsets) |
|
314 | s, cs = _encode(ui, s, charsets) | |
314 | return str(email.header.Header(s, cs)) |
|
315 | return str(email.header.Header(s, cs)) | |
315 | return s |
|
316 | return s | |
316 |
|
317 | |||
317 | def _addressencode(ui, name, addr, charsets=None): |
|
318 | def _addressencode(ui, name, addr, charsets=None): | |
318 | assert isinstance(addr, bytes) |
|
319 | assert isinstance(addr, bytes) | |
319 | name = headencode(ui, name, charsets) |
|
320 | name = headencode(ui, name, charsets) | |
320 | try: |
|
321 | try: | |
321 | acc, dom = addr.split('@') |
|
322 | acc, dom = addr.split('@') | |
322 | acc.decode('ascii') |
|
323 | acc.decode('ascii') | |
323 | dom = dom.decode(pycompat.sysstr(encoding.encoding)).encode('idna') |
|
324 | dom = dom.decode(pycompat.sysstr(encoding.encoding)).encode('idna') | |
324 | addr = '%s@%s' % (acc, dom) |
|
325 | addr = '%s@%s' % (acc, dom) | |
325 | except UnicodeDecodeError: |
|
326 | except UnicodeDecodeError: | |
326 | raise error.Abort(_('invalid email address: %s') % addr) |
|
327 | raise error.Abort(_('invalid email address: %s') % addr) | |
327 | except ValueError: |
|
328 | except ValueError: | |
328 | try: |
|
329 | try: | |
329 | # too strict? |
|
330 | # too strict? | |
330 | addr.decode('ascii') |
|
331 | addr.decode('ascii') | |
331 | except UnicodeDecodeError: |
|
332 | except UnicodeDecodeError: | |
332 | raise error.Abort(_('invalid local address: %s') % addr) |
|
333 | raise error.Abort(_('invalid local address: %s') % addr) | |
333 | return pycompat.bytesurl( |
|
334 | return pycompat.bytesurl( | |
334 | email.utils.formataddr((name, encoding.strfromlocal(addr)))) |
|
335 | email.utils.formataddr((name, encoding.strfromlocal(addr)))) | |
335 |
|
336 | |||
336 | def addressencode(ui, address, charsets=None, display=False): |
|
337 | def addressencode(ui, address, charsets=None, display=False): | |
337 | '''Turns address into RFC-2047 compliant header.''' |
|
338 | '''Turns address into RFC-2047 compliant header.''' | |
338 | if display or not address: |
|
339 | if display or not address: | |
339 | return address or '' |
|
340 | return address or '' | |
340 | name, addr = email.utils.parseaddr(encoding.strfromlocal(address)) |
|
341 | name, addr = email.utils.parseaddr(encoding.strfromlocal(address)) | |
341 | return _addressencode(ui, name, encoding.strtolocal(addr), charsets) |
|
342 | return _addressencode(ui, name, encoding.strtolocal(addr), charsets) | |
342 |
|
343 | |||
343 | def addrlistencode(ui, addrs, charsets=None, display=False): |
|
344 | def addrlistencode(ui, addrs, charsets=None, display=False): | |
344 | '''Turns a list of addresses into a list of RFC-2047 compliant headers. |
|
345 | '''Turns a list of addresses into a list of RFC-2047 compliant headers. | |
345 | A single element of input list may contain multiple addresses, but output |
|
346 | A single element of input list may contain multiple addresses, but output | |
346 | always has one address per item''' |
|
347 | always has one address per item''' | |
347 | for a in addrs: |
|
348 | for a in addrs: | |
348 | assert isinstance(a, bytes), (r'%r unexpectedly not a bytestr' % a) |
|
349 | assert isinstance(a, bytes), (r'%r unexpectedly not a bytestr' % a) | |
349 | if display: |
|
350 | if display: | |
350 | return [a.strip() for a in addrs if a.strip()] |
|
351 | return [a.strip() for a in addrs if a.strip()] | |
351 |
|
352 | |||
352 | result = [] |
|
353 | result = [] | |
353 | for name, addr in email.utils.getaddresses( |
|
354 | for name, addr in email.utils.getaddresses( | |
354 | [encoding.strfromlocal(a) for a in addrs]): |
|
355 | [encoding.strfromlocal(a) for a in addrs]): | |
355 | if name or addr: |
|
356 | if name or addr: | |
356 | r = _addressencode(ui, name, encoding.strtolocal(addr), charsets) |
|
357 | r = _addressencode(ui, name, encoding.strtolocal(addr), charsets) | |
357 | result.append(r) |
|
358 | result.append(r) | |
358 | return result |
|
359 | return result | |
359 |
|
360 | |||
360 | def mimeencode(ui, s, charsets=None, display=False): |
|
361 | def mimeencode(ui, s, charsets=None, display=False): | |
361 | '''creates mime text object, encodes it if needed, and sets |
|
362 | '''creates mime text object, encodes it if needed, and sets | |
362 | charset and transfer-encoding accordingly.''' |
|
363 | charset and transfer-encoding accordingly.''' | |
363 | cs = 'us-ascii' |
|
364 | cs = 'us-ascii' | |
364 | if not display: |
|
365 | if not display: | |
365 | s, cs = _encode(ui, s, charsets) |
|
366 | s, cs = _encode(ui, s, charsets) | |
366 | return mimetextqp(s, 'plain', cs) |
|
367 | return mimetextqp(s, 'plain', cs) | |
367 |
|
368 | |||
368 | if pycompat.ispy3: |
|
369 | if pycompat.ispy3: | |
369 | def parse(fp): |
|
370 | def parse(fp): | |
370 | ep = email.parser.Parser() |
|
371 | ep = email.parser.Parser() | |
371 | # disable the "universal newlines" mode, which isn't binary safe. |
|
372 | # disable the "universal newlines" mode, which isn't binary safe. | |
372 | # I have no idea if ascii/surrogateescape is correct, but that's |
|
373 | # I have no idea if ascii/surrogateescape is correct, but that's | |
373 | # what the standard Python email parser does. |
|
374 | # what the standard Python email parser does. | |
374 | fp = io.TextIOWrapper(fp, encoding=r'ascii', |
|
375 | fp = io.TextIOWrapper(fp, encoding=r'ascii', | |
375 | errors=r'surrogateescape', newline=chr(10)) |
|
376 | errors=r'surrogateescape', newline=chr(10)) | |
376 | try: |
|
377 | try: | |
377 | return ep.parse(fp) |
|
378 | return ep.parse(fp) | |
378 | finally: |
|
379 | finally: | |
379 | fp.detach() |
|
380 | fp.detach() | |
380 | else: |
|
381 | else: | |
381 | def parse(fp): |
|
382 | def parse(fp): | |
382 | ep = email.parser.Parser() |
|
383 | ep = email.parser.Parser() | |
383 | return ep.parse(fp) |
|
384 | return ep.parse(fp) | |
384 |
|
385 | |||
385 | def headdecode(s): |
|
386 | def headdecode(s): | |
386 | '''Decodes RFC-2047 header''' |
|
387 | '''Decodes RFC-2047 header''' | |
387 | uparts = [] |
|
388 | uparts = [] | |
388 | for part, charset in email.header.decode_header(s): |
|
389 | for part, charset in email.header.decode_header(s): | |
389 | if charset is not None: |
|
390 | if charset is not None: | |
390 | try: |
|
391 | try: | |
391 | uparts.append(part.decode(charset)) |
|
392 | uparts.append(part.decode(charset)) | |
392 | continue |
|
393 | continue | |
393 | except UnicodeDecodeError: |
|
394 | except UnicodeDecodeError: | |
394 | pass |
|
395 | pass | |
395 | # On Python 3, decode_header() may return either bytes or unicode |
|
396 | # On Python 3, decode_header() may return either bytes or unicode | |
396 | # depending on whether the header has =?<charset>? or not |
|
397 | # depending on whether the header has =?<charset>? or not | |
397 | if isinstance(part, type(u'')): |
|
398 | if isinstance(part, type(u'')): | |
398 | uparts.append(part) |
|
399 | uparts.append(part) | |
399 | continue |
|
400 | continue | |
400 | try: |
|
401 | try: | |
401 | uparts.append(part.decode('UTF-8')) |
|
402 | uparts.append(part.decode('UTF-8')) | |
402 | continue |
|
403 | continue | |
403 | except UnicodeDecodeError: |
|
404 | except UnicodeDecodeError: | |
404 | pass |
|
405 | pass | |
405 | uparts.append(part.decode('ISO-8859-1')) |
|
406 | uparts.append(part.decode('ISO-8859-1')) | |
406 | return encoding.unitolocal(u' '.join(uparts)) |
|
407 | return encoding.unitolocal(u' '.join(uparts)) |
@@ -1,430 +1,434 b'' | |||||
1 | # pycompat.py - portability shim for python 3 |
|
1 | # pycompat.py - portability shim for python 3 | |
2 | # |
|
2 | # | |
3 | # This software may be used and distributed according to the terms of the |
|
3 | # This software may be used and distributed according to the terms of the | |
4 | # GNU General Public License version 2 or any later version. |
|
4 | # GNU General Public License version 2 or any later version. | |
5 |
|
5 | |||
6 | """Mercurial portability shim for python 3. |
|
6 | """Mercurial portability shim for python 3. | |
7 |
|
7 | |||
8 | This contains aliases to hide python version-specific details from the core. |
|
8 | This contains aliases to hide python version-specific details from the core. | |
9 | """ |
|
9 | """ | |
10 |
|
10 | |||
11 | from __future__ import absolute_import |
|
11 | from __future__ import absolute_import | |
12 |
|
12 | |||
13 | import getopt |
|
13 | import getopt | |
14 | import inspect |
|
14 | import inspect | |
15 | import os |
|
15 | import os | |
16 | import shlex |
|
16 | import shlex | |
17 | import sys |
|
17 | import sys | |
18 | import tempfile |
|
18 | import tempfile | |
19 |
|
19 | |||
20 | ispy3 = (sys.version_info[0] >= 3) |
|
20 | ispy3 = (sys.version_info[0] >= 3) | |
21 | ispypy = (r'__pypy__' in sys.builtin_module_names) |
|
21 | ispypy = (r'__pypy__' in sys.builtin_module_names) | |
22 |
|
22 | |||
23 | if not ispy3: |
|
23 | if not ispy3: | |
24 | import cookielib |
|
24 | import cookielib | |
25 | import cPickle as pickle |
|
25 | import cPickle as pickle | |
26 | import httplib |
|
26 | import httplib | |
27 | import Queue as queue |
|
27 | import Queue as queue | |
28 | import SocketServer as socketserver |
|
28 | import SocketServer as socketserver | |
29 | import xmlrpclib |
|
29 | import xmlrpclib | |
30 |
|
30 | |||
31 | from .thirdparty.concurrent import futures |
|
31 | from .thirdparty.concurrent import futures | |
32 |
|
32 | |||
33 | def future_set_exception_info(f, exc_info): |
|
33 | def future_set_exception_info(f, exc_info): | |
34 | f.set_exception_info(*exc_info) |
|
34 | f.set_exception_info(*exc_info) | |
35 | else: |
|
35 | else: | |
36 | import concurrent.futures as futures |
|
36 | import concurrent.futures as futures | |
37 | import http.cookiejar as cookielib |
|
37 | import http.cookiejar as cookielib | |
38 | import http.client as httplib |
|
38 | import http.client as httplib | |
39 | import pickle |
|
39 | import pickle | |
40 | import queue as queue |
|
40 | import queue as queue | |
41 | import socketserver |
|
41 | import socketserver | |
42 | import xmlrpc.client as xmlrpclib |
|
42 | import xmlrpc.client as xmlrpclib | |
43 |
|
43 | |||
44 | def future_set_exception_info(f, exc_info): |
|
44 | def future_set_exception_info(f, exc_info): | |
45 | f.set_exception(exc_info[0]) |
|
45 | f.set_exception(exc_info[0]) | |
46 |
|
46 | |||
47 | def identity(a): |
|
47 | def identity(a): | |
48 | return a |
|
48 | return a | |
49 |
|
49 | |||
50 | def _rapply(f, xs): |
|
50 | def _rapply(f, xs): | |
51 | if xs is None: |
|
51 | if xs is None: | |
52 | # assume None means non-value of optional data |
|
52 | # assume None means non-value of optional data | |
53 | return xs |
|
53 | return xs | |
54 | if isinstance(xs, (list, set, tuple)): |
|
54 | if isinstance(xs, (list, set, tuple)): | |
55 | return type(xs)(_rapply(f, x) for x in xs) |
|
55 | return type(xs)(_rapply(f, x) for x in xs) | |
56 | if isinstance(xs, dict): |
|
56 | if isinstance(xs, dict): | |
57 | return type(xs)((_rapply(f, k), _rapply(f, v)) for k, v in xs.items()) |
|
57 | return type(xs)((_rapply(f, k), _rapply(f, v)) for k, v in xs.items()) | |
58 | return f(xs) |
|
58 | return f(xs) | |
59 |
|
59 | |||
60 | def rapply(f, xs): |
|
60 | def rapply(f, xs): | |
61 | """Apply function recursively to every item preserving the data structure |
|
61 | """Apply function recursively to every item preserving the data structure | |
62 |
|
62 | |||
63 | >>> def f(x): |
|
63 | >>> def f(x): | |
64 | ... return 'f(%s)' % x |
|
64 | ... return 'f(%s)' % x | |
65 | >>> rapply(f, None) is None |
|
65 | >>> rapply(f, None) is None | |
66 | True |
|
66 | True | |
67 | >>> rapply(f, 'a') |
|
67 | >>> rapply(f, 'a') | |
68 | 'f(a)' |
|
68 | 'f(a)' | |
69 | >>> rapply(f, {'a'}) == {'f(a)'} |
|
69 | >>> rapply(f, {'a'}) == {'f(a)'} | |
70 | True |
|
70 | True | |
71 | >>> rapply(f, ['a', 'b', None, {'c': 'd'}, []]) |
|
71 | >>> rapply(f, ['a', 'b', None, {'c': 'd'}, []]) | |
72 | ['f(a)', 'f(b)', None, {'f(c)': 'f(d)'}, []] |
|
72 | ['f(a)', 'f(b)', None, {'f(c)': 'f(d)'}, []] | |
73 |
|
73 | |||
74 | >>> xs = [object()] |
|
74 | >>> xs = [object()] | |
75 | >>> rapply(identity, xs) is xs |
|
75 | >>> rapply(identity, xs) is xs | |
76 | True |
|
76 | True | |
77 | """ |
|
77 | """ | |
78 | if f is identity: |
|
78 | if f is identity: | |
79 | # fast path mainly for py2 |
|
79 | # fast path mainly for py2 | |
80 | return xs |
|
80 | return xs | |
81 | return _rapply(f, xs) |
|
81 | return _rapply(f, xs) | |
82 |
|
82 | |||
83 | if ispy3: |
|
83 | if ispy3: | |
84 | import builtins |
|
84 | import builtins | |
85 | import functools |
|
85 | import functools | |
86 | import io |
|
86 | import io | |
87 | import struct |
|
87 | import struct | |
88 |
|
88 | |||
89 | fsencode = os.fsencode |
|
89 | fsencode = os.fsencode | |
90 | fsdecode = os.fsdecode |
|
90 | fsdecode = os.fsdecode | |
91 | oscurdir = os.curdir.encode('ascii') |
|
91 | oscurdir = os.curdir.encode('ascii') | |
92 | oslinesep = os.linesep.encode('ascii') |
|
92 | oslinesep = os.linesep.encode('ascii') | |
93 | osname = os.name.encode('ascii') |
|
93 | osname = os.name.encode('ascii') | |
94 | ospathsep = os.pathsep.encode('ascii') |
|
94 | ospathsep = os.pathsep.encode('ascii') | |
95 | ospardir = os.pardir.encode('ascii') |
|
95 | ospardir = os.pardir.encode('ascii') | |
96 | ossep = os.sep.encode('ascii') |
|
96 | ossep = os.sep.encode('ascii') | |
97 | osaltsep = os.altsep |
|
97 | osaltsep = os.altsep | |
98 | if osaltsep: |
|
98 | if osaltsep: | |
99 | osaltsep = osaltsep.encode('ascii') |
|
99 | osaltsep = osaltsep.encode('ascii') | |
100 |
|
100 | |||
101 | sysplatform = sys.platform.encode('ascii') |
|
101 | sysplatform = sys.platform.encode('ascii') | |
102 | sysexecutable = sys.executable |
|
102 | sysexecutable = sys.executable | |
103 | if sysexecutable: |
|
103 | if sysexecutable: | |
104 | sysexecutable = os.fsencode(sysexecutable) |
|
104 | sysexecutable = os.fsencode(sysexecutable) | |
105 | bytesio = io.BytesIO |
|
105 | bytesio = io.BytesIO | |
106 | # TODO deprecate stringio name, as it is a lie on Python 3. |
|
106 | # TODO deprecate stringio name, as it is a lie on Python 3. | |
107 | stringio = bytesio |
|
107 | stringio = bytesio | |
108 |
|
108 | |||
109 | def maplist(*args): |
|
109 | def maplist(*args): | |
110 | return list(map(*args)) |
|
110 | return list(map(*args)) | |
111 |
|
111 | |||
112 | def rangelist(*args): |
|
112 | def rangelist(*args): | |
113 | return list(range(*args)) |
|
113 | return list(range(*args)) | |
114 |
|
114 | |||
115 | def ziplist(*args): |
|
115 | def ziplist(*args): | |
116 | return list(zip(*args)) |
|
116 | return list(zip(*args)) | |
117 |
|
117 | |||
118 | rawinput = input |
|
118 | rawinput = input | |
119 | getargspec = inspect.getfullargspec |
|
119 | getargspec = inspect.getfullargspec | |
120 |
|
120 | |||
121 | long = int |
|
121 | long = int | |
122 |
|
122 | |||
123 | # TODO: .buffer might not exist if std streams were replaced; we'll need |
|
123 | # TODO: .buffer might not exist if std streams were replaced; we'll need | |
124 | # a silly wrapper to make a bytes stream backed by a unicode one. |
|
124 | # a silly wrapper to make a bytes stream backed by a unicode one. | |
125 | stdin = sys.stdin.buffer |
|
125 | stdin = sys.stdin.buffer | |
126 | stdout = sys.stdout.buffer |
|
126 | stdout = sys.stdout.buffer | |
127 | stderr = sys.stderr.buffer |
|
127 | stderr = sys.stderr.buffer | |
128 |
|
128 | |||
129 | # Since Python 3 converts argv to wchar_t type by Py_DecodeLocale() on Unix, |
|
129 | # Since Python 3 converts argv to wchar_t type by Py_DecodeLocale() on Unix, | |
130 | # we can use os.fsencode() to get back bytes argv. |
|
130 | # we can use os.fsencode() to get back bytes argv. | |
131 | # |
|
131 | # | |
132 | # https://hg.python.org/cpython/file/v3.5.1/Programs/python.c#l55 |
|
132 | # https://hg.python.org/cpython/file/v3.5.1/Programs/python.c#l55 | |
133 | # |
|
133 | # | |
134 | # TODO: On Windows, the native argv is wchar_t, so we'll need a different |
|
134 | # TODO: On Windows, the native argv is wchar_t, so we'll need a different | |
135 | # workaround to simulate the Python 2 (i.e. ANSI Win32 API) behavior. |
|
135 | # workaround to simulate the Python 2 (i.e. ANSI Win32 API) behavior. | |
136 | if getattr(sys, 'argv', None) is not None: |
|
136 | if getattr(sys, 'argv', None) is not None: | |
137 | sysargv = list(map(os.fsencode, sys.argv)) |
|
137 | sysargv = list(map(os.fsencode, sys.argv)) | |
138 |
|
138 | |||
139 | bytechr = struct.Struct(r'>B').pack |
|
139 | bytechr = struct.Struct(r'>B').pack | |
140 | byterepr = b'%r'.__mod__ |
|
140 | byterepr = b'%r'.__mod__ | |
141 |
|
141 | |||
142 | class bytestr(bytes): |
|
142 | class bytestr(bytes): | |
143 | """A bytes which mostly acts as a Python 2 str |
|
143 | """A bytes which mostly acts as a Python 2 str | |
144 |
|
144 | |||
145 | >>> bytestr(), bytestr(bytearray(b'foo')), bytestr(u'ascii'), bytestr(1) |
|
145 | >>> bytestr(), bytestr(bytearray(b'foo')), bytestr(u'ascii'), bytestr(1) | |
146 | ('', 'foo', 'ascii', '1') |
|
146 | ('', 'foo', 'ascii', '1') | |
147 | >>> s = bytestr(b'foo') |
|
147 | >>> s = bytestr(b'foo') | |
148 | >>> assert s is bytestr(s) |
|
148 | >>> assert s is bytestr(s) | |
149 |
|
149 | |||
150 | __bytes__() should be called if provided: |
|
150 | __bytes__() should be called if provided: | |
151 |
|
151 | |||
152 | >>> class bytesable(object): |
|
152 | >>> class bytesable(object): | |
153 | ... def __bytes__(self): |
|
153 | ... def __bytes__(self): | |
154 | ... return b'bytes' |
|
154 | ... return b'bytes' | |
155 | >>> bytestr(bytesable()) |
|
155 | >>> bytestr(bytesable()) | |
156 | 'bytes' |
|
156 | 'bytes' | |
157 |
|
157 | |||
158 | There's no implicit conversion from non-ascii str as its encoding is |
|
158 | There's no implicit conversion from non-ascii str as its encoding is | |
159 | unknown: |
|
159 | unknown: | |
160 |
|
160 | |||
161 | >>> bytestr(chr(0x80)) # doctest: +ELLIPSIS |
|
161 | >>> bytestr(chr(0x80)) # doctest: +ELLIPSIS | |
162 | Traceback (most recent call last): |
|
162 | Traceback (most recent call last): | |
163 | ... |
|
163 | ... | |
164 | UnicodeEncodeError: ... |
|
164 | UnicodeEncodeError: ... | |
165 |
|
165 | |||
166 | Comparison between bytestr and bytes should work: |
|
166 | Comparison between bytestr and bytes should work: | |
167 |
|
167 | |||
168 | >>> assert bytestr(b'foo') == b'foo' |
|
168 | >>> assert bytestr(b'foo') == b'foo' | |
169 | >>> assert b'foo' == bytestr(b'foo') |
|
169 | >>> assert b'foo' == bytestr(b'foo') | |
170 | >>> assert b'f' in bytestr(b'foo') |
|
170 | >>> assert b'f' in bytestr(b'foo') | |
171 | >>> assert bytestr(b'f') in b'foo' |
|
171 | >>> assert bytestr(b'f') in b'foo' | |
172 |
|
172 | |||
173 | Sliced elements should be bytes, not integer: |
|
173 | Sliced elements should be bytes, not integer: | |
174 |
|
174 | |||
175 | >>> s[1], s[:2] |
|
175 | >>> s[1], s[:2] | |
176 | (b'o', b'fo') |
|
176 | (b'o', b'fo') | |
177 | >>> list(s), list(reversed(s)) |
|
177 | >>> list(s), list(reversed(s)) | |
178 | ([b'f', b'o', b'o'], [b'o', b'o', b'f']) |
|
178 | ([b'f', b'o', b'o'], [b'o', b'o', b'f']) | |
179 |
|
179 | |||
180 | As bytestr type isn't propagated across operations, you need to cast |
|
180 | As bytestr type isn't propagated across operations, you need to cast | |
181 | bytes to bytestr explicitly: |
|
181 | bytes to bytestr explicitly: | |
182 |
|
182 | |||
183 | >>> s = bytestr(b'foo').upper() |
|
183 | >>> s = bytestr(b'foo').upper() | |
184 | >>> t = bytestr(s) |
|
184 | >>> t = bytestr(s) | |
185 | >>> s[0], t[0] |
|
185 | >>> s[0], t[0] | |
186 | (70, b'F') |
|
186 | (70, b'F') | |
187 |
|
187 | |||
188 | Be careful to not pass a bytestr object to a function which expects |
|
188 | Be careful to not pass a bytestr object to a function which expects | |
189 | bytearray-like behavior. |
|
189 | bytearray-like behavior. | |
190 |
|
190 | |||
191 | >>> t = bytes(t) # cast to bytes |
|
191 | >>> t = bytes(t) # cast to bytes | |
192 | >>> assert type(t) is bytes |
|
192 | >>> assert type(t) is bytes | |
193 | """ |
|
193 | """ | |
194 |
|
194 | |||
195 | def __new__(cls, s=b''): |
|
195 | def __new__(cls, s=b''): | |
196 | if isinstance(s, bytestr): |
|
196 | if isinstance(s, bytestr): | |
197 | return s |
|
197 | return s | |
198 | if (not isinstance(s, (bytes, bytearray)) |
|
198 | if (not isinstance(s, (bytes, bytearray)) | |
199 | and not hasattr(s, u'__bytes__')): # hasattr-py3-only |
|
199 | and not hasattr(s, u'__bytes__')): # hasattr-py3-only | |
200 | s = str(s).encode(u'ascii') |
|
200 | s = str(s).encode(u'ascii') | |
201 | return bytes.__new__(cls, s) |
|
201 | return bytes.__new__(cls, s) | |
202 |
|
202 | |||
203 | def __getitem__(self, key): |
|
203 | def __getitem__(self, key): | |
204 | s = bytes.__getitem__(self, key) |
|
204 | s = bytes.__getitem__(self, key) | |
205 | if not isinstance(s, bytes): |
|
205 | if not isinstance(s, bytes): | |
206 | s = bytechr(s) |
|
206 | s = bytechr(s) | |
207 | return s |
|
207 | return s | |
208 |
|
208 | |||
209 | def __iter__(self): |
|
209 | def __iter__(self): | |
210 | return iterbytestr(bytes.__iter__(self)) |
|
210 | return iterbytestr(bytes.__iter__(self)) | |
211 |
|
211 | |||
212 | def __repr__(self): |
|
212 | def __repr__(self): | |
213 | return bytes.__repr__(self)[1:] # drop b'' |
|
213 | return bytes.__repr__(self)[1:] # drop b'' | |
214 |
|
214 | |||
215 | def iterbytestr(s): |
|
215 | def iterbytestr(s): | |
216 | """Iterate bytes as if it were a str object of Python 2""" |
|
216 | """Iterate bytes as if it were a str object of Python 2""" | |
217 | return map(bytechr, s) |
|
217 | return map(bytechr, s) | |
218 |
|
218 | |||
219 | def maybebytestr(s): |
|
219 | def maybebytestr(s): | |
220 | """Promote bytes to bytestr""" |
|
220 | """Promote bytes to bytestr""" | |
221 | if isinstance(s, bytes): |
|
221 | if isinstance(s, bytes): | |
222 | return bytestr(s) |
|
222 | return bytestr(s) | |
223 | return s |
|
223 | return s | |
224 |
|
224 | |||
225 | def sysbytes(s): |
|
225 | def sysbytes(s): | |
226 | """Convert an internal str (e.g. keyword, __doc__) back to bytes |
|
226 | """Convert an internal str (e.g. keyword, __doc__) back to bytes | |
227 |
|
227 | |||
228 | This never raises UnicodeEncodeError, but only ASCII characters |
|
228 | This never raises UnicodeEncodeError, but only ASCII characters | |
229 | can be round-trip by sysstr(sysbytes(s)). |
|
229 | can be round-trip by sysstr(sysbytes(s)). | |
230 | """ |
|
230 | """ | |
231 | return s.encode(u'utf-8') |
|
231 | return s.encode(u'utf-8') | |
232 |
|
232 | |||
233 | def sysstr(s): |
|
233 | def sysstr(s): | |
234 | """Return a keyword str to be passed to Python functions such as |
|
234 | """Return a keyword str to be passed to Python functions such as | |
235 | getattr() and str.encode() |
|
235 | getattr() and str.encode() | |
236 |
|
236 | |||
237 | This never raises UnicodeDecodeError. Non-ascii characters are |
|
237 | This never raises UnicodeDecodeError. Non-ascii characters are | |
238 | considered invalid and mapped to arbitrary but unique code points |
|
238 | considered invalid and mapped to arbitrary but unique code points | |
239 | such that 'sysstr(a) != sysstr(b)' for all 'a != b'. |
|
239 | such that 'sysstr(a) != sysstr(b)' for all 'a != b'. | |
240 | """ |
|
240 | """ | |
241 | if isinstance(s, builtins.str): |
|
241 | if isinstance(s, builtins.str): | |
242 | return s |
|
242 | return s | |
243 | return s.decode(u'latin-1') |
|
243 | return s.decode(u'latin-1') | |
244 |
|
244 | |||
245 | def strurl(url): |
|
245 | def strurl(url): | |
246 | """Converts a bytes url back to str""" |
|
246 | """Converts a bytes url back to str""" | |
247 | if isinstance(url, bytes): |
|
247 | if isinstance(url, bytes): | |
248 | return url.decode(u'ascii') |
|
248 | return url.decode(u'ascii') | |
249 | return url |
|
249 | return url | |
250 |
|
250 | |||
251 | def bytesurl(url): |
|
251 | def bytesurl(url): | |
252 | """Converts a str url to bytes by encoding in ascii""" |
|
252 | """Converts a str url to bytes by encoding in ascii""" | |
253 | if isinstance(url, str): |
|
253 | if isinstance(url, str): | |
254 | return url.encode(u'ascii') |
|
254 | return url.encode(u'ascii') | |
255 | return url |
|
255 | return url | |
256 |
|
256 | |||
257 | def raisewithtb(exc, tb): |
|
257 | def raisewithtb(exc, tb): | |
258 | """Raise exception with the given traceback""" |
|
258 | """Raise exception with the given traceback""" | |
259 | raise exc.with_traceback(tb) |
|
259 | raise exc.with_traceback(tb) | |
260 |
|
260 | |||
261 | def getdoc(obj): |
|
261 | def getdoc(obj): | |
262 | """Get docstring as bytes; may be None so gettext() won't confuse it |
|
262 | """Get docstring as bytes; may be None so gettext() won't confuse it | |
263 | with _('')""" |
|
263 | with _('')""" | |
264 | doc = getattr(obj, u'__doc__', None) |
|
264 | doc = getattr(obj, u'__doc__', None) | |
265 | if doc is None: |
|
265 | if doc is None: | |
266 | return doc |
|
266 | return doc | |
267 | return sysbytes(doc) |
|
267 | return sysbytes(doc) | |
268 |
|
268 | |||
269 | def _wrapattrfunc(f): |
|
269 | def _wrapattrfunc(f): | |
270 | @functools.wraps(f) |
|
270 | @functools.wraps(f) | |
271 | def w(object, name, *args): |
|
271 | def w(object, name, *args): | |
272 | return f(object, sysstr(name), *args) |
|
272 | return f(object, sysstr(name), *args) | |
273 | return w |
|
273 | return w | |
274 |
|
274 | |||
275 | # these wrappers are automagically imported by hgloader |
|
275 | # these wrappers are automagically imported by hgloader | |
276 | delattr = _wrapattrfunc(builtins.delattr) |
|
276 | delattr = _wrapattrfunc(builtins.delattr) | |
277 | getattr = _wrapattrfunc(builtins.getattr) |
|
277 | getattr = _wrapattrfunc(builtins.getattr) | |
278 | hasattr = _wrapattrfunc(builtins.hasattr) |
|
278 | hasattr = _wrapattrfunc(builtins.hasattr) | |
279 | setattr = _wrapattrfunc(builtins.setattr) |
|
279 | setattr = _wrapattrfunc(builtins.setattr) | |
280 | xrange = builtins.range |
|
280 | xrange = builtins.range | |
281 | unicode = str |
|
281 | unicode = str | |
282 |
|
282 | |||
283 | def open(name, mode=b'r', buffering=-1, encoding=None): |
|
283 | def open(name, mode=b'r', buffering=-1, encoding=None): | |
284 | return builtins.open(name, sysstr(mode), buffering, encoding) |
|
284 | return builtins.open(name, sysstr(mode), buffering, encoding) | |
285 |
|
285 | |||
286 | safehasattr = _wrapattrfunc(builtins.hasattr) |
|
286 | safehasattr = _wrapattrfunc(builtins.hasattr) | |
287 |
|
287 | |||
288 | def _getoptbwrapper(orig, args, shortlist, namelist): |
|
288 | def _getoptbwrapper(orig, args, shortlist, namelist): | |
289 | """ |
|
289 | """ | |
290 | Takes bytes arguments, converts them to unicode, pass them to |
|
290 | Takes bytes arguments, converts them to unicode, pass them to | |
291 | getopt.getopt(), convert the returned values back to bytes and then |
|
291 | getopt.getopt(), convert the returned values back to bytes and then | |
292 | return them for Python 3 compatibility as getopt.getopt() don't accepts |
|
292 | return them for Python 3 compatibility as getopt.getopt() don't accepts | |
293 | bytes on Python 3. |
|
293 | bytes on Python 3. | |
294 | """ |
|
294 | """ | |
295 | args = [a.decode('latin-1') for a in args] |
|
295 | args = [a.decode('latin-1') for a in args] | |
296 | shortlist = shortlist.decode('latin-1') |
|
296 | shortlist = shortlist.decode('latin-1') | |
297 | namelist = [a.decode('latin-1') for a in namelist] |
|
297 | namelist = [a.decode('latin-1') for a in namelist] | |
298 | opts, args = orig(args, shortlist, namelist) |
|
298 | opts, args = orig(args, shortlist, namelist) | |
299 | opts = [(a[0].encode('latin-1'), a[1].encode('latin-1')) |
|
299 | opts = [(a[0].encode('latin-1'), a[1].encode('latin-1')) | |
300 | for a in opts] |
|
300 | for a in opts] | |
301 | args = [a.encode('latin-1') for a in args] |
|
301 | args = [a.encode('latin-1') for a in args] | |
302 | return opts, args |
|
302 | return opts, args | |
303 |
|
303 | |||
304 | def strkwargs(dic): |
|
304 | def strkwargs(dic): | |
305 | """ |
|
305 | """ | |
306 | Converts the keys of a python dictonary to str i.e. unicodes so that |
|
306 | Converts the keys of a python dictonary to str i.e. unicodes so that | |
307 | they can be passed as keyword arguments as dictonaries with bytes keys |
|
307 | they can be passed as keyword arguments as dictonaries with bytes keys | |
308 | can't be passed as keyword arguments to functions on Python 3. |
|
308 | can't be passed as keyword arguments to functions on Python 3. | |
309 | """ |
|
309 | """ | |
310 | dic = dict((k.decode('latin-1'), v) for k, v in dic.iteritems()) |
|
310 | dic = dict((k.decode('latin-1'), v) for k, v in dic.iteritems()) | |
311 | return dic |
|
311 | return dic | |
312 |
|
312 | |||
313 | def byteskwargs(dic): |
|
313 | def byteskwargs(dic): | |
314 | """ |
|
314 | """ | |
315 | Converts keys of python dictonaries to bytes as they were converted to |
|
315 | Converts keys of python dictonaries to bytes as they were converted to | |
316 | str to pass that dictonary as a keyword argument on Python 3. |
|
316 | str to pass that dictonary as a keyword argument on Python 3. | |
317 | """ |
|
317 | """ | |
318 | dic = dict((k.encode('latin-1'), v) for k, v in dic.iteritems()) |
|
318 | dic = dict((k.encode('latin-1'), v) for k, v in dic.iteritems()) | |
319 | return dic |
|
319 | return dic | |
320 |
|
320 | |||
321 | # TODO: handle shlex.shlex(). |
|
321 | # TODO: handle shlex.shlex(). | |
322 | def shlexsplit(s, comments=False, posix=True): |
|
322 | def shlexsplit(s, comments=False, posix=True): | |
323 | """ |
|
323 | """ | |
324 | Takes bytes argument, convert it to str i.e. unicodes, pass that into |
|
324 | Takes bytes argument, convert it to str i.e. unicodes, pass that into | |
325 | shlex.split(), convert the returned value to bytes and return that for |
|
325 | shlex.split(), convert the returned value to bytes and return that for | |
326 | Python 3 compatibility as shelx.split() don't accept bytes on Python 3. |
|
326 | Python 3 compatibility as shelx.split() don't accept bytes on Python 3. | |
327 | """ |
|
327 | """ | |
328 | ret = shlex.split(s.decode('latin-1'), comments, posix) |
|
328 | ret = shlex.split(s.decode('latin-1'), comments, posix) | |
329 | return [a.encode('latin-1') for a in ret] |
|
329 | return [a.encode('latin-1') for a in ret] | |
330 |
|
330 | |||
|
331 | shlexquote = shlex.quote | |||
|
332 | ||||
331 | else: |
|
333 | else: | |
332 | import cStringIO |
|
334 | import cStringIO | |
|
335 | import pipes | |||
333 |
|
336 | |||
334 | xrange = xrange |
|
337 | xrange = xrange | |
335 | unicode = unicode |
|
338 | unicode = unicode | |
336 | bytechr = chr |
|
339 | bytechr = chr | |
337 | byterepr = repr |
|
340 | byterepr = repr | |
338 | bytestr = str |
|
341 | bytestr = str | |
339 | iterbytestr = iter |
|
342 | iterbytestr = iter | |
340 | maybebytestr = identity |
|
343 | maybebytestr = identity | |
341 | sysbytes = identity |
|
344 | sysbytes = identity | |
342 | sysstr = identity |
|
345 | sysstr = identity | |
343 | strurl = identity |
|
346 | strurl = identity | |
344 | bytesurl = identity |
|
347 | bytesurl = identity | |
345 |
|
348 | |||
346 | # this can't be parsed on Python 3 |
|
349 | # this can't be parsed on Python 3 | |
347 | exec('def raisewithtb(exc, tb):\n' |
|
350 | exec('def raisewithtb(exc, tb):\n' | |
348 | ' raise exc, None, tb\n') |
|
351 | ' raise exc, None, tb\n') | |
349 |
|
352 | |||
350 | def fsencode(filename): |
|
353 | def fsencode(filename): | |
351 | """ |
|
354 | """ | |
352 | Partial backport from os.py in Python 3, which only accepts bytes. |
|
355 | Partial backport from os.py in Python 3, which only accepts bytes. | |
353 | In Python 2, our paths should only ever be bytes, a unicode path |
|
356 | In Python 2, our paths should only ever be bytes, a unicode path | |
354 | indicates a bug. |
|
357 | indicates a bug. | |
355 | """ |
|
358 | """ | |
356 | if isinstance(filename, str): |
|
359 | if isinstance(filename, str): | |
357 | return filename |
|
360 | return filename | |
358 | else: |
|
361 | else: | |
359 | raise TypeError( |
|
362 | raise TypeError( | |
360 | r"expect str, not %s" % type(filename).__name__) |
|
363 | r"expect str, not %s" % type(filename).__name__) | |
361 |
|
364 | |||
362 | # In Python 2, fsdecode() has a very chance to receive bytes. So it's |
|
365 | # In Python 2, fsdecode() has a very chance to receive bytes. So it's | |
363 | # better not to touch Python 2 part as it's already working fine. |
|
366 | # better not to touch Python 2 part as it's already working fine. | |
364 | fsdecode = identity |
|
367 | fsdecode = identity | |
365 |
|
368 | |||
366 | def getdoc(obj): |
|
369 | def getdoc(obj): | |
367 | return getattr(obj, '__doc__', None) |
|
370 | return getattr(obj, '__doc__', None) | |
368 |
|
371 | |||
369 | _notset = object() |
|
372 | _notset = object() | |
370 |
|
373 | |||
371 | def safehasattr(thing, attr): |
|
374 | def safehasattr(thing, attr): | |
372 | return getattr(thing, attr, _notset) is not _notset |
|
375 | return getattr(thing, attr, _notset) is not _notset | |
373 |
|
376 | |||
374 | def _getoptbwrapper(orig, args, shortlist, namelist): |
|
377 | def _getoptbwrapper(orig, args, shortlist, namelist): | |
375 | return orig(args, shortlist, namelist) |
|
378 | return orig(args, shortlist, namelist) | |
376 |
|
379 | |||
377 | strkwargs = identity |
|
380 | strkwargs = identity | |
378 | byteskwargs = identity |
|
381 | byteskwargs = identity | |
379 |
|
382 | |||
380 | oscurdir = os.curdir |
|
383 | oscurdir = os.curdir | |
381 | oslinesep = os.linesep |
|
384 | oslinesep = os.linesep | |
382 | osname = os.name |
|
385 | osname = os.name | |
383 | ospathsep = os.pathsep |
|
386 | ospathsep = os.pathsep | |
384 | ospardir = os.pardir |
|
387 | ospardir = os.pardir | |
385 | ossep = os.sep |
|
388 | ossep = os.sep | |
386 | osaltsep = os.altsep |
|
389 | osaltsep = os.altsep | |
387 | long = long |
|
390 | long = long | |
388 | stdin = sys.stdin |
|
391 | stdin = sys.stdin | |
389 | stdout = sys.stdout |
|
392 | stdout = sys.stdout | |
390 | stderr = sys.stderr |
|
393 | stderr = sys.stderr | |
391 | if getattr(sys, 'argv', None) is not None: |
|
394 | if getattr(sys, 'argv', None) is not None: | |
392 | sysargv = sys.argv |
|
395 | sysargv = sys.argv | |
393 | sysplatform = sys.platform |
|
396 | sysplatform = sys.platform | |
394 | sysexecutable = sys.executable |
|
397 | sysexecutable = sys.executable | |
395 | shlexsplit = shlex.split |
|
398 | shlexsplit = shlex.split | |
|
399 | shlexquote = pipes.quote | |||
396 | bytesio = cStringIO.StringIO |
|
400 | bytesio = cStringIO.StringIO | |
397 | stringio = bytesio |
|
401 | stringio = bytesio | |
398 | maplist = map |
|
402 | maplist = map | |
399 | rangelist = range |
|
403 | rangelist = range | |
400 | ziplist = zip |
|
404 | ziplist = zip | |
401 | rawinput = raw_input |
|
405 | rawinput = raw_input | |
402 | getargspec = inspect.getargspec |
|
406 | getargspec = inspect.getargspec | |
403 |
|
407 | |||
404 | isjython = sysplatform.startswith(b'java') |
|
408 | isjython = sysplatform.startswith(b'java') | |
405 |
|
409 | |||
406 | isdarwin = sysplatform.startswith(b'darwin') |
|
410 | isdarwin = sysplatform.startswith(b'darwin') | |
407 | islinux = sysplatform.startswith(b'linux') |
|
411 | islinux = sysplatform.startswith(b'linux') | |
408 | isposix = osname == b'posix' |
|
412 | isposix = osname == b'posix' | |
409 | iswindows = osname == b'nt' |
|
413 | iswindows = osname == b'nt' | |
410 |
|
414 | |||
411 | def getoptb(args, shortlist, namelist): |
|
415 | def getoptb(args, shortlist, namelist): | |
412 | return _getoptbwrapper(getopt.getopt, args, shortlist, namelist) |
|
416 | return _getoptbwrapper(getopt.getopt, args, shortlist, namelist) | |
413 |
|
417 | |||
414 | def gnugetoptb(args, shortlist, namelist): |
|
418 | def gnugetoptb(args, shortlist, namelist): | |
415 | return _getoptbwrapper(getopt.gnu_getopt, args, shortlist, namelist) |
|
419 | return _getoptbwrapper(getopt.gnu_getopt, args, shortlist, namelist) | |
416 |
|
420 | |||
417 | def mkdtemp(suffix=b'', prefix=b'tmp', dir=None): |
|
421 | def mkdtemp(suffix=b'', prefix=b'tmp', dir=None): | |
418 | return tempfile.mkdtemp(suffix, prefix, dir) |
|
422 | return tempfile.mkdtemp(suffix, prefix, dir) | |
419 |
|
423 | |||
420 | # text=True is not supported; use util.from/tonativeeol() instead |
|
424 | # text=True is not supported; use util.from/tonativeeol() instead | |
421 | def mkstemp(suffix=b'', prefix=b'tmp', dir=None): |
|
425 | def mkstemp(suffix=b'', prefix=b'tmp', dir=None): | |
422 | return tempfile.mkstemp(suffix, prefix, dir) |
|
426 | return tempfile.mkstemp(suffix, prefix, dir) | |
423 |
|
427 | |||
424 | # mode must include 'b'ytes as encoding= is not supported |
|
428 | # mode must include 'b'ytes as encoding= is not supported | |
425 | def namedtempfile(mode=b'w+b', bufsize=-1, suffix=b'', prefix=b'tmp', dir=None, |
|
429 | def namedtempfile(mode=b'w+b', bufsize=-1, suffix=b'', prefix=b'tmp', dir=None, | |
426 | delete=True): |
|
430 | delete=True): | |
427 | mode = sysstr(mode) |
|
431 | mode = sysstr(mode) | |
428 | assert r'b' in mode |
|
432 | assert r'b' in mode | |
429 | return tempfile.NamedTemporaryFile(mode, bufsize, suffix=suffix, |
|
433 | return tempfile.NamedTemporaryFile(mode, bufsize, suffix=suffix, | |
430 | prefix=prefix, dir=dir, delete=delete) |
|
434 | prefix=prefix, dir=dir, delete=delete) |
@@ -1,541 +1,542 b'' | |||||
1 | # procutil.py - utility for managing processes and executable environment |
|
1 | # procutil.py - utility for managing processes and executable environment | |
2 | # |
|
2 | # | |
3 | # Copyright 2005 K. Thananchayan <thananck@yahoo.com> |
|
3 | # Copyright 2005 K. Thananchayan <thananck@yahoo.com> | |
4 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
4 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | |
5 | # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> |
|
5 | # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> | |
6 | # |
|
6 | # | |
7 | # This software may be used and distributed according to the terms of the |
|
7 | # This software may be used and distributed according to the terms of the | |
8 | # GNU General Public License version 2 or any later version. |
|
8 | # GNU General Public License version 2 or any later version. | |
9 |
|
9 | |||
10 | from __future__ import absolute_import |
|
10 | from __future__ import absolute_import | |
11 |
|
11 | |||
12 | import contextlib |
|
12 | import contextlib | |
13 | import errno |
|
13 | import errno | |
14 | import imp |
|
14 | import imp | |
15 | import io |
|
15 | import io | |
16 | import os |
|
16 | import os | |
17 | import signal |
|
17 | import signal | |
18 | import subprocess |
|
18 | import subprocess | |
19 | import sys |
|
19 | import sys | |
20 | import time |
|
20 | import time | |
21 |
|
21 | |||
22 | from ..i18n import _ |
|
22 | from ..i18n import _ | |
23 |
|
23 | |||
24 | from .. import ( |
|
24 | from .. import ( | |
25 | encoding, |
|
25 | encoding, | |
26 | error, |
|
26 | error, | |
27 | policy, |
|
27 | policy, | |
28 | pycompat, |
|
28 | pycompat, | |
29 | ) |
|
29 | ) | |
30 |
|
30 | |||
31 | osutil = policy.importmod(r'osutil') |
|
31 | osutil = policy.importmod(r'osutil') | |
32 |
|
32 | |||
33 | stderr = pycompat.stderr |
|
33 | stderr = pycompat.stderr | |
34 | stdin = pycompat.stdin |
|
34 | stdin = pycompat.stdin | |
35 | stdout = pycompat.stdout |
|
35 | stdout = pycompat.stdout | |
36 |
|
36 | |||
37 | def isatty(fp): |
|
37 | def isatty(fp): | |
38 | try: |
|
38 | try: | |
39 | return fp.isatty() |
|
39 | return fp.isatty() | |
40 | except AttributeError: |
|
40 | except AttributeError: | |
41 | return False |
|
41 | return False | |
42 |
|
42 | |||
43 | # glibc determines buffering on first write to stdout - if we replace a TTY |
|
43 | # glibc determines buffering on first write to stdout - if we replace a TTY | |
44 | # destined stdout with a pipe destined stdout (e.g. pager), we want line |
|
44 | # destined stdout with a pipe destined stdout (e.g. pager), we want line | |
45 | # buffering (or unbuffered, on Windows) |
|
45 | # buffering (or unbuffered, on Windows) | |
46 | if isatty(stdout): |
|
46 | if isatty(stdout): | |
47 | if pycompat.iswindows: |
|
47 | if pycompat.iswindows: | |
48 | # Windows doesn't support line buffering |
|
48 | # Windows doesn't support line buffering | |
49 | stdout = os.fdopen(stdout.fileno(), r'wb', 0) |
|
49 | stdout = os.fdopen(stdout.fileno(), r'wb', 0) | |
50 | else: |
|
50 | else: | |
51 | stdout = os.fdopen(stdout.fileno(), r'wb', 1) |
|
51 | stdout = os.fdopen(stdout.fileno(), r'wb', 1) | |
52 |
|
52 | |||
53 | if pycompat.iswindows: |
|
53 | if pycompat.iswindows: | |
54 | from .. import windows as platform |
|
54 | from .. import windows as platform | |
55 | stdout = platform.winstdout(stdout) |
|
55 | stdout = platform.winstdout(stdout) | |
56 | else: |
|
56 | else: | |
57 | from .. import posix as platform |
|
57 | from .. import posix as platform | |
58 |
|
58 | |||
59 | findexe = platform.findexe |
|
59 | findexe = platform.findexe | |
60 | _gethgcmd = platform.gethgcmd |
|
60 | _gethgcmd = platform.gethgcmd | |
61 | getuser = platform.getuser |
|
61 | getuser = platform.getuser | |
62 | getpid = os.getpid |
|
62 | getpid = os.getpid | |
63 | hidewindow = platform.hidewindow |
|
63 | hidewindow = platform.hidewindow | |
64 | quotecommand = platform.quotecommand |
|
64 | quotecommand = platform.quotecommand | |
65 | readpipe = platform.readpipe |
|
65 | readpipe = platform.readpipe | |
66 | setbinary = platform.setbinary |
|
66 | setbinary = platform.setbinary | |
67 | setsignalhandler = platform.setsignalhandler |
|
67 | setsignalhandler = platform.setsignalhandler | |
68 | shellquote = platform.shellquote |
|
68 | shellquote = platform.shellquote | |
69 | shellsplit = platform.shellsplit |
|
69 | shellsplit = platform.shellsplit | |
70 | spawndetached = platform.spawndetached |
|
70 | spawndetached = platform.spawndetached | |
71 | sshargs = platform.sshargs |
|
71 | sshargs = platform.sshargs | |
72 | testpid = platform.testpid |
|
72 | testpid = platform.testpid | |
|
73 | quote = pycompat.shlexquote | |||
73 |
|
74 | |||
74 | try: |
|
75 | try: | |
75 | setprocname = osutil.setprocname |
|
76 | setprocname = osutil.setprocname | |
76 | except AttributeError: |
|
77 | except AttributeError: | |
77 | pass |
|
78 | pass | |
78 | try: |
|
79 | try: | |
79 | unblocksignal = osutil.unblocksignal |
|
80 | unblocksignal = osutil.unblocksignal | |
80 | except AttributeError: |
|
81 | except AttributeError: | |
81 | pass |
|
82 | pass | |
82 |
|
83 | |||
83 | closefds = pycompat.isposix |
|
84 | closefds = pycompat.isposix | |
84 |
|
85 | |||
85 | def explainexit(code): |
|
86 | def explainexit(code): | |
86 | """return a message describing a subprocess status |
|
87 | """return a message describing a subprocess status | |
87 | (codes from kill are negative - not os.system/wait encoding)""" |
|
88 | (codes from kill are negative - not os.system/wait encoding)""" | |
88 | if code >= 0: |
|
89 | if code >= 0: | |
89 | return _("exited with status %d") % code |
|
90 | return _("exited with status %d") % code | |
90 | return _("killed by signal %d") % -code |
|
91 | return _("killed by signal %d") % -code | |
91 |
|
92 | |||
92 | class _pfile(object): |
|
93 | class _pfile(object): | |
93 | """File-like wrapper for a stream opened by subprocess.Popen()""" |
|
94 | """File-like wrapper for a stream opened by subprocess.Popen()""" | |
94 |
|
95 | |||
95 | def __init__(self, proc, fp): |
|
96 | def __init__(self, proc, fp): | |
96 | self._proc = proc |
|
97 | self._proc = proc | |
97 | self._fp = fp |
|
98 | self._fp = fp | |
98 |
|
99 | |||
99 | def close(self): |
|
100 | def close(self): | |
100 | # unlike os.popen(), this returns an integer in subprocess coding |
|
101 | # unlike os.popen(), this returns an integer in subprocess coding | |
101 | self._fp.close() |
|
102 | self._fp.close() | |
102 | return self._proc.wait() |
|
103 | return self._proc.wait() | |
103 |
|
104 | |||
104 | def __iter__(self): |
|
105 | def __iter__(self): | |
105 | return iter(self._fp) |
|
106 | return iter(self._fp) | |
106 |
|
107 | |||
107 | def __getattr__(self, attr): |
|
108 | def __getattr__(self, attr): | |
108 | return getattr(self._fp, attr) |
|
109 | return getattr(self._fp, attr) | |
109 |
|
110 | |||
110 | def __enter__(self): |
|
111 | def __enter__(self): | |
111 | return self |
|
112 | return self | |
112 |
|
113 | |||
113 | def __exit__(self, exc_type, exc_value, exc_tb): |
|
114 | def __exit__(self, exc_type, exc_value, exc_tb): | |
114 | self.close() |
|
115 | self.close() | |
115 |
|
116 | |||
116 | def popen(cmd, mode='rb', bufsize=-1): |
|
117 | def popen(cmd, mode='rb', bufsize=-1): | |
117 | if mode == 'rb': |
|
118 | if mode == 'rb': | |
118 | return _popenreader(cmd, bufsize) |
|
119 | return _popenreader(cmd, bufsize) | |
119 | elif mode == 'wb': |
|
120 | elif mode == 'wb': | |
120 | return _popenwriter(cmd, bufsize) |
|
121 | return _popenwriter(cmd, bufsize) | |
121 | raise error.ProgrammingError('unsupported mode: %r' % mode) |
|
122 | raise error.ProgrammingError('unsupported mode: %r' % mode) | |
122 |
|
123 | |||
123 | def _popenreader(cmd, bufsize): |
|
124 | def _popenreader(cmd, bufsize): | |
124 | p = subprocess.Popen(tonativestr(quotecommand(cmd)), |
|
125 | p = subprocess.Popen(tonativestr(quotecommand(cmd)), | |
125 | shell=True, bufsize=bufsize, |
|
126 | shell=True, bufsize=bufsize, | |
126 | close_fds=closefds, |
|
127 | close_fds=closefds, | |
127 | stdout=subprocess.PIPE) |
|
128 | stdout=subprocess.PIPE) | |
128 | return _pfile(p, p.stdout) |
|
129 | return _pfile(p, p.stdout) | |
129 |
|
130 | |||
130 | def _popenwriter(cmd, bufsize): |
|
131 | def _popenwriter(cmd, bufsize): | |
131 | p = subprocess.Popen(tonativestr(quotecommand(cmd)), |
|
132 | p = subprocess.Popen(tonativestr(quotecommand(cmd)), | |
132 | shell=True, bufsize=bufsize, |
|
133 | shell=True, bufsize=bufsize, | |
133 | close_fds=closefds, |
|
134 | close_fds=closefds, | |
134 | stdin=subprocess.PIPE) |
|
135 | stdin=subprocess.PIPE) | |
135 | return _pfile(p, p.stdin) |
|
136 | return _pfile(p, p.stdin) | |
136 |
|
137 | |||
137 | def popen2(cmd, env=None): |
|
138 | def popen2(cmd, env=None): | |
138 | # Setting bufsize to -1 lets the system decide the buffer size. |
|
139 | # Setting bufsize to -1 lets the system decide the buffer size. | |
139 | # The default for bufsize is 0, meaning unbuffered. This leads to |
|
140 | # The default for bufsize is 0, meaning unbuffered. This leads to | |
140 | # poor performance on Mac OS X: http://bugs.python.org/issue4194 |
|
141 | # poor performance on Mac OS X: http://bugs.python.org/issue4194 | |
141 | p = subprocess.Popen(tonativestr(cmd), |
|
142 | p = subprocess.Popen(tonativestr(cmd), | |
142 | shell=True, bufsize=-1, |
|
143 | shell=True, bufsize=-1, | |
143 | close_fds=closefds, |
|
144 | close_fds=closefds, | |
144 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
145 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, | |
145 | env=tonativeenv(env)) |
|
146 | env=tonativeenv(env)) | |
146 | return p.stdin, p.stdout |
|
147 | return p.stdin, p.stdout | |
147 |
|
148 | |||
148 | def popen3(cmd, env=None): |
|
149 | def popen3(cmd, env=None): | |
149 | stdin, stdout, stderr, p = popen4(cmd, env) |
|
150 | stdin, stdout, stderr, p = popen4(cmd, env) | |
150 | return stdin, stdout, stderr |
|
151 | return stdin, stdout, stderr | |
151 |
|
152 | |||
152 | def popen4(cmd, env=None, bufsize=-1): |
|
153 | def popen4(cmd, env=None, bufsize=-1): | |
153 | p = subprocess.Popen(tonativestr(cmd), |
|
154 | p = subprocess.Popen(tonativestr(cmd), | |
154 | shell=True, bufsize=bufsize, |
|
155 | shell=True, bufsize=bufsize, | |
155 | close_fds=closefds, |
|
156 | close_fds=closefds, | |
156 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, |
|
157 | stdin=subprocess.PIPE, stdout=subprocess.PIPE, | |
157 | stderr=subprocess.PIPE, |
|
158 | stderr=subprocess.PIPE, | |
158 | env=tonativeenv(env)) |
|
159 | env=tonativeenv(env)) | |
159 | return p.stdin, p.stdout, p.stderr, p |
|
160 | return p.stdin, p.stdout, p.stderr, p | |
160 |
|
161 | |||
161 | def pipefilter(s, cmd): |
|
162 | def pipefilter(s, cmd): | |
162 | '''filter string S through command CMD, returning its output''' |
|
163 | '''filter string S through command CMD, returning its output''' | |
163 | p = subprocess.Popen(tonativestr(cmd), |
|
164 | p = subprocess.Popen(tonativestr(cmd), | |
164 | shell=True, close_fds=closefds, |
|
165 | shell=True, close_fds=closefds, | |
165 | stdin=subprocess.PIPE, stdout=subprocess.PIPE) |
|
166 | stdin=subprocess.PIPE, stdout=subprocess.PIPE) | |
166 | pout, perr = p.communicate(s) |
|
167 | pout, perr = p.communicate(s) | |
167 | return pout |
|
168 | return pout | |
168 |
|
169 | |||
169 | def tempfilter(s, cmd): |
|
170 | def tempfilter(s, cmd): | |
170 | '''filter string S through a pair of temporary files with CMD. |
|
171 | '''filter string S through a pair of temporary files with CMD. | |
171 | CMD is used as a template to create the real command to be run, |
|
172 | CMD is used as a template to create the real command to be run, | |
172 | with the strings INFILE and OUTFILE replaced by the real names of |
|
173 | with the strings INFILE and OUTFILE replaced by the real names of | |
173 | the temporary files generated.''' |
|
174 | the temporary files generated.''' | |
174 | inname, outname = None, None |
|
175 | inname, outname = None, None | |
175 | try: |
|
176 | try: | |
176 | infd, inname = pycompat.mkstemp(prefix='hg-filter-in-') |
|
177 | infd, inname = pycompat.mkstemp(prefix='hg-filter-in-') | |
177 | fp = os.fdopen(infd, r'wb') |
|
178 | fp = os.fdopen(infd, r'wb') | |
178 | fp.write(s) |
|
179 | fp.write(s) | |
179 | fp.close() |
|
180 | fp.close() | |
180 | outfd, outname = pycompat.mkstemp(prefix='hg-filter-out-') |
|
181 | outfd, outname = pycompat.mkstemp(prefix='hg-filter-out-') | |
181 | os.close(outfd) |
|
182 | os.close(outfd) | |
182 | cmd = cmd.replace('INFILE', inname) |
|
183 | cmd = cmd.replace('INFILE', inname) | |
183 | cmd = cmd.replace('OUTFILE', outname) |
|
184 | cmd = cmd.replace('OUTFILE', outname) | |
184 | code = system(cmd) |
|
185 | code = system(cmd) | |
185 | if pycompat.sysplatform == 'OpenVMS' and code & 1: |
|
186 | if pycompat.sysplatform == 'OpenVMS' and code & 1: | |
186 | code = 0 |
|
187 | code = 0 | |
187 | if code: |
|
188 | if code: | |
188 | raise error.Abort(_("command '%s' failed: %s") % |
|
189 | raise error.Abort(_("command '%s' failed: %s") % | |
189 | (cmd, explainexit(code))) |
|
190 | (cmd, explainexit(code))) | |
190 | with open(outname, 'rb') as fp: |
|
191 | with open(outname, 'rb') as fp: | |
191 | return fp.read() |
|
192 | return fp.read() | |
192 | finally: |
|
193 | finally: | |
193 | try: |
|
194 | try: | |
194 | if inname: |
|
195 | if inname: | |
195 | os.unlink(inname) |
|
196 | os.unlink(inname) | |
196 | except OSError: |
|
197 | except OSError: | |
197 | pass |
|
198 | pass | |
198 | try: |
|
199 | try: | |
199 | if outname: |
|
200 | if outname: | |
200 | os.unlink(outname) |
|
201 | os.unlink(outname) | |
201 | except OSError: |
|
202 | except OSError: | |
202 | pass |
|
203 | pass | |
203 |
|
204 | |||
204 | _filtertable = { |
|
205 | _filtertable = { | |
205 | 'tempfile:': tempfilter, |
|
206 | 'tempfile:': tempfilter, | |
206 | 'pipe:': pipefilter, |
|
207 | 'pipe:': pipefilter, | |
207 | } |
|
208 | } | |
208 |
|
209 | |||
209 | def filter(s, cmd): |
|
210 | def filter(s, cmd): | |
210 | "filter a string through a command that transforms its input to its output" |
|
211 | "filter a string through a command that transforms its input to its output" | |
211 | for name, fn in _filtertable.iteritems(): |
|
212 | for name, fn in _filtertable.iteritems(): | |
212 | if cmd.startswith(name): |
|
213 | if cmd.startswith(name): | |
213 | return fn(s, cmd[len(name):].lstrip()) |
|
214 | return fn(s, cmd[len(name):].lstrip()) | |
214 | return pipefilter(s, cmd) |
|
215 | return pipefilter(s, cmd) | |
215 |
|
216 | |||
216 | def mainfrozen(): |
|
217 | def mainfrozen(): | |
217 | """return True if we are a frozen executable. |
|
218 | """return True if we are a frozen executable. | |
218 |
|
219 | |||
219 | The code supports py2exe (most common, Windows only) and tools/freeze |
|
220 | The code supports py2exe (most common, Windows only) and tools/freeze | |
220 | (portable, not much used). |
|
221 | (portable, not much used). | |
221 | """ |
|
222 | """ | |
222 | return (pycompat.safehasattr(sys, "frozen") or # new py2exe |
|
223 | return (pycompat.safehasattr(sys, "frozen") or # new py2exe | |
223 | pycompat.safehasattr(sys, "importers") or # old py2exe |
|
224 | pycompat.safehasattr(sys, "importers") or # old py2exe | |
224 | imp.is_frozen(r"__main__")) # tools/freeze |
|
225 | imp.is_frozen(r"__main__")) # tools/freeze | |
225 |
|
226 | |||
226 | _hgexecutable = None |
|
227 | _hgexecutable = None | |
227 |
|
228 | |||
228 | def hgexecutable(): |
|
229 | def hgexecutable(): | |
229 | """return location of the 'hg' executable. |
|
230 | """return location of the 'hg' executable. | |
230 |
|
231 | |||
231 | Defaults to $HG or 'hg' in the search path. |
|
232 | Defaults to $HG or 'hg' in the search path. | |
232 | """ |
|
233 | """ | |
233 | if _hgexecutable is None: |
|
234 | if _hgexecutable is None: | |
234 | hg = encoding.environ.get('HG') |
|
235 | hg = encoding.environ.get('HG') | |
235 | mainmod = sys.modules[r'__main__'] |
|
236 | mainmod = sys.modules[r'__main__'] | |
236 | if hg: |
|
237 | if hg: | |
237 | _sethgexecutable(hg) |
|
238 | _sethgexecutable(hg) | |
238 | elif mainfrozen(): |
|
239 | elif mainfrozen(): | |
239 | if getattr(sys, 'frozen', None) == 'macosx_app': |
|
240 | if getattr(sys, 'frozen', None) == 'macosx_app': | |
240 | # Env variable set by py2app |
|
241 | # Env variable set by py2app | |
241 | _sethgexecutable(encoding.environ['EXECUTABLEPATH']) |
|
242 | _sethgexecutable(encoding.environ['EXECUTABLEPATH']) | |
242 | else: |
|
243 | else: | |
243 | _sethgexecutable(pycompat.sysexecutable) |
|
244 | _sethgexecutable(pycompat.sysexecutable) | |
244 | elif (not pycompat.iswindows and os.path.basename( |
|
245 | elif (not pycompat.iswindows and os.path.basename( | |
245 | pycompat.fsencode(getattr(mainmod, '__file__', ''))) == 'hg'): |
|
246 | pycompat.fsencode(getattr(mainmod, '__file__', ''))) == 'hg'): | |
246 | _sethgexecutable(pycompat.fsencode(mainmod.__file__)) |
|
247 | _sethgexecutable(pycompat.fsencode(mainmod.__file__)) | |
247 | else: |
|
248 | else: | |
248 | _sethgexecutable(findexe('hg') or |
|
249 | _sethgexecutable(findexe('hg') or | |
249 | os.path.basename(pycompat.sysargv[0])) |
|
250 | os.path.basename(pycompat.sysargv[0])) | |
250 | return _hgexecutable |
|
251 | return _hgexecutable | |
251 |
|
252 | |||
252 | def _sethgexecutable(path): |
|
253 | def _sethgexecutable(path): | |
253 | """set location of the 'hg' executable""" |
|
254 | """set location of the 'hg' executable""" | |
254 | global _hgexecutable |
|
255 | global _hgexecutable | |
255 | _hgexecutable = path |
|
256 | _hgexecutable = path | |
256 |
|
257 | |||
257 | def _testfileno(f, stdf): |
|
258 | def _testfileno(f, stdf): | |
258 | fileno = getattr(f, 'fileno', None) |
|
259 | fileno = getattr(f, 'fileno', None) | |
259 | try: |
|
260 | try: | |
260 | return fileno and fileno() == stdf.fileno() |
|
261 | return fileno and fileno() == stdf.fileno() | |
261 | except io.UnsupportedOperation: |
|
262 | except io.UnsupportedOperation: | |
262 | return False # fileno() raised UnsupportedOperation |
|
263 | return False # fileno() raised UnsupportedOperation | |
263 |
|
264 | |||
264 | def isstdin(f): |
|
265 | def isstdin(f): | |
265 | return _testfileno(f, sys.__stdin__) |
|
266 | return _testfileno(f, sys.__stdin__) | |
266 |
|
267 | |||
267 | def isstdout(f): |
|
268 | def isstdout(f): | |
268 | return _testfileno(f, sys.__stdout__) |
|
269 | return _testfileno(f, sys.__stdout__) | |
269 |
|
270 | |||
270 | def protectstdio(uin, uout): |
|
271 | def protectstdio(uin, uout): | |
271 | """Duplicate streams and redirect original if (uin, uout) are stdio |
|
272 | """Duplicate streams and redirect original if (uin, uout) are stdio | |
272 |
|
273 | |||
273 | If uin is stdin, it's redirected to /dev/null. If uout is stdout, it's |
|
274 | If uin is stdin, it's redirected to /dev/null. If uout is stdout, it's | |
274 | redirected to stderr so the output is still readable. |
|
275 | redirected to stderr so the output is still readable. | |
275 |
|
276 | |||
276 | Returns (fin, fout) which point to the original (uin, uout) fds, but |
|
277 | Returns (fin, fout) which point to the original (uin, uout) fds, but | |
277 | may be copy of (uin, uout). The returned streams can be considered |
|
278 | may be copy of (uin, uout). The returned streams can be considered | |
278 | "owned" in that print(), exec(), etc. never reach to them. |
|
279 | "owned" in that print(), exec(), etc. never reach to them. | |
279 | """ |
|
280 | """ | |
280 | uout.flush() |
|
281 | uout.flush() | |
281 | fin, fout = uin, uout |
|
282 | fin, fout = uin, uout | |
282 | if _testfileno(uin, stdin): |
|
283 | if _testfileno(uin, stdin): | |
283 | newfd = os.dup(uin.fileno()) |
|
284 | newfd = os.dup(uin.fileno()) | |
284 | nullfd = os.open(os.devnull, os.O_RDONLY) |
|
285 | nullfd = os.open(os.devnull, os.O_RDONLY) | |
285 | os.dup2(nullfd, uin.fileno()) |
|
286 | os.dup2(nullfd, uin.fileno()) | |
286 | os.close(nullfd) |
|
287 | os.close(nullfd) | |
287 | fin = os.fdopen(newfd, r'rb') |
|
288 | fin = os.fdopen(newfd, r'rb') | |
288 | if _testfileno(uout, stdout): |
|
289 | if _testfileno(uout, stdout): | |
289 | newfd = os.dup(uout.fileno()) |
|
290 | newfd = os.dup(uout.fileno()) | |
290 | os.dup2(stderr.fileno(), uout.fileno()) |
|
291 | os.dup2(stderr.fileno(), uout.fileno()) | |
291 | fout = os.fdopen(newfd, r'wb') |
|
292 | fout = os.fdopen(newfd, r'wb') | |
292 | return fin, fout |
|
293 | return fin, fout | |
293 |
|
294 | |||
294 | def restorestdio(uin, uout, fin, fout): |
|
295 | def restorestdio(uin, uout, fin, fout): | |
295 | """Restore (uin, uout) streams from possibly duplicated (fin, fout)""" |
|
296 | """Restore (uin, uout) streams from possibly duplicated (fin, fout)""" | |
296 | uout.flush() |
|
297 | uout.flush() | |
297 | for f, uif in [(fin, uin), (fout, uout)]: |
|
298 | for f, uif in [(fin, uin), (fout, uout)]: | |
298 | if f is not uif: |
|
299 | if f is not uif: | |
299 | os.dup2(f.fileno(), uif.fileno()) |
|
300 | os.dup2(f.fileno(), uif.fileno()) | |
300 | f.close() |
|
301 | f.close() | |
301 |
|
302 | |||
302 | def shellenviron(environ=None): |
|
303 | def shellenviron(environ=None): | |
303 | """return environ with optional override, useful for shelling out""" |
|
304 | """return environ with optional override, useful for shelling out""" | |
304 | def py2shell(val): |
|
305 | def py2shell(val): | |
305 | 'convert python object into string that is useful to shell' |
|
306 | 'convert python object into string that is useful to shell' | |
306 | if val is None or val is False: |
|
307 | if val is None or val is False: | |
307 | return '0' |
|
308 | return '0' | |
308 | if val is True: |
|
309 | if val is True: | |
309 | return '1' |
|
310 | return '1' | |
310 | return pycompat.bytestr(val) |
|
311 | return pycompat.bytestr(val) | |
311 | env = dict(encoding.environ) |
|
312 | env = dict(encoding.environ) | |
312 | if environ: |
|
313 | if environ: | |
313 | env.update((k, py2shell(v)) for k, v in environ.iteritems()) |
|
314 | env.update((k, py2shell(v)) for k, v in environ.iteritems()) | |
314 | env['HG'] = hgexecutable() |
|
315 | env['HG'] = hgexecutable() | |
315 | return env |
|
316 | return env | |
316 |
|
317 | |||
317 | if pycompat.iswindows: |
|
318 | if pycompat.iswindows: | |
318 | def shelltonative(cmd, env): |
|
319 | def shelltonative(cmd, env): | |
319 | return platform.shelltocmdexe(cmd, shellenviron(env)) |
|
320 | return platform.shelltocmdexe(cmd, shellenviron(env)) | |
320 |
|
321 | |||
321 | tonativestr = encoding.strfromlocal |
|
322 | tonativestr = encoding.strfromlocal | |
322 | else: |
|
323 | else: | |
323 | def shelltonative(cmd, env): |
|
324 | def shelltonative(cmd, env): | |
324 | return cmd |
|
325 | return cmd | |
325 |
|
326 | |||
326 | tonativestr = pycompat.identity |
|
327 | tonativestr = pycompat.identity | |
327 |
|
328 | |||
328 | def tonativeenv(env): |
|
329 | def tonativeenv(env): | |
329 | '''convert the environment from bytes to strings suitable for Popen(), etc. |
|
330 | '''convert the environment from bytes to strings suitable for Popen(), etc. | |
330 | ''' |
|
331 | ''' | |
331 | return pycompat.rapply(tonativestr, env) |
|
332 | return pycompat.rapply(tonativestr, env) | |
332 |
|
333 | |||
333 | def system(cmd, environ=None, cwd=None, out=None): |
|
334 | def system(cmd, environ=None, cwd=None, out=None): | |
334 | '''enhanced shell command execution. |
|
335 | '''enhanced shell command execution. | |
335 | run with environment maybe modified, maybe in different dir. |
|
336 | run with environment maybe modified, maybe in different dir. | |
336 |
|
337 | |||
337 | if out is specified, it is assumed to be a file-like object that has a |
|
338 | if out is specified, it is assumed to be a file-like object that has a | |
338 | write() method. stdout and stderr will be redirected to out.''' |
|
339 | write() method. stdout and stderr will be redirected to out.''' | |
339 | try: |
|
340 | try: | |
340 | stdout.flush() |
|
341 | stdout.flush() | |
341 | except Exception: |
|
342 | except Exception: | |
342 | pass |
|
343 | pass | |
343 | cmd = quotecommand(cmd) |
|
344 | cmd = quotecommand(cmd) | |
344 | env = shellenviron(environ) |
|
345 | env = shellenviron(environ) | |
345 | if out is None or isstdout(out): |
|
346 | if out is None or isstdout(out): | |
346 | rc = subprocess.call(tonativestr(cmd), |
|
347 | rc = subprocess.call(tonativestr(cmd), | |
347 | shell=True, close_fds=closefds, |
|
348 | shell=True, close_fds=closefds, | |
348 | env=tonativeenv(env), |
|
349 | env=tonativeenv(env), | |
349 | cwd=pycompat.rapply(tonativestr, cwd)) |
|
350 | cwd=pycompat.rapply(tonativestr, cwd)) | |
350 | else: |
|
351 | else: | |
351 | proc = subprocess.Popen(tonativestr(cmd), |
|
352 | proc = subprocess.Popen(tonativestr(cmd), | |
352 | shell=True, close_fds=closefds, |
|
353 | shell=True, close_fds=closefds, | |
353 | env=tonativeenv(env), |
|
354 | env=tonativeenv(env), | |
354 | cwd=pycompat.rapply(tonativestr, cwd), |
|
355 | cwd=pycompat.rapply(tonativestr, cwd), | |
355 | stdout=subprocess.PIPE, |
|
356 | stdout=subprocess.PIPE, | |
356 | stderr=subprocess.STDOUT) |
|
357 | stderr=subprocess.STDOUT) | |
357 | for line in iter(proc.stdout.readline, ''): |
|
358 | for line in iter(proc.stdout.readline, ''): | |
358 | out.write(line) |
|
359 | out.write(line) | |
359 | proc.wait() |
|
360 | proc.wait() | |
360 | rc = proc.returncode |
|
361 | rc = proc.returncode | |
361 | if pycompat.sysplatform == 'OpenVMS' and rc & 1: |
|
362 | if pycompat.sysplatform == 'OpenVMS' and rc & 1: | |
362 | rc = 0 |
|
363 | rc = 0 | |
363 | return rc |
|
364 | return rc | |
364 |
|
365 | |||
365 | def gui(): |
|
366 | def gui(): | |
366 | '''Are we running in a GUI?''' |
|
367 | '''Are we running in a GUI?''' | |
367 | if pycompat.isdarwin: |
|
368 | if pycompat.isdarwin: | |
368 | if 'SSH_CONNECTION' in encoding.environ: |
|
369 | if 'SSH_CONNECTION' in encoding.environ: | |
369 | # handle SSH access to a box where the user is logged in |
|
370 | # handle SSH access to a box where the user is logged in | |
370 | return False |
|
371 | return False | |
371 | elif getattr(osutil, 'isgui', None): |
|
372 | elif getattr(osutil, 'isgui', None): | |
372 | # check if a CoreGraphics session is available |
|
373 | # check if a CoreGraphics session is available | |
373 | return osutil.isgui() |
|
374 | return osutil.isgui() | |
374 | else: |
|
375 | else: | |
375 | # pure build; use a safe default |
|
376 | # pure build; use a safe default | |
376 | return True |
|
377 | return True | |
377 | else: |
|
378 | else: | |
378 | return pycompat.iswindows or encoding.environ.get("DISPLAY") |
|
379 | return pycompat.iswindows or encoding.environ.get("DISPLAY") | |
379 |
|
380 | |||
380 | def hgcmd(): |
|
381 | def hgcmd(): | |
381 | """Return the command used to execute current hg |
|
382 | """Return the command used to execute current hg | |
382 |
|
383 | |||
383 | This is different from hgexecutable() because on Windows we want |
|
384 | This is different from hgexecutable() because on Windows we want | |
384 | to avoid things opening new shell windows like batch files, so we |
|
385 | to avoid things opening new shell windows like batch files, so we | |
385 | get either the python call or current executable. |
|
386 | get either the python call or current executable. | |
386 | """ |
|
387 | """ | |
387 | if mainfrozen(): |
|
388 | if mainfrozen(): | |
388 | if getattr(sys, 'frozen', None) == 'macosx_app': |
|
389 | if getattr(sys, 'frozen', None) == 'macosx_app': | |
389 | # Env variable set by py2app |
|
390 | # Env variable set by py2app | |
390 | return [encoding.environ['EXECUTABLEPATH']] |
|
391 | return [encoding.environ['EXECUTABLEPATH']] | |
391 | else: |
|
392 | else: | |
392 | return [pycompat.sysexecutable] |
|
393 | return [pycompat.sysexecutable] | |
393 | return _gethgcmd() |
|
394 | return _gethgcmd() | |
394 |
|
395 | |||
395 | def rundetached(args, condfn): |
|
396 | def rundetached(args, condfn): | |
396 | """Execute the argument list in a detached process. |
|
397 | """Execute the argument list in a detached process. | |
397 |
|
398 | |||
398 | condfn is a callable which is called repeatedly and should return |
|
399 | condfn is a callable which is called repeatedly and should return | |
399 | True once the child process is known to have started successfully. |
|
400 | True once the child process is known to have started successfully. | |
400 | At this point, the child process PID is returned. If the child |
|
401 | At this point, the child process PID is returned. If the child | |
401 | process fails to start or finishes before condfn() evaluates to |
|
402 | process fails to start or finishes before condfn() evaluates to | |
402 | True, return -1. |
|
403 | True, return -1. | |
403 | """ |
|
404 | """ | |
404 | # Windows case is easier because the child process is either |
|
405 | # Windows case is easier because the child process is either | |
405 | # successfully starting and validating the condition or exiting |
|
406 | # successfully starting and validating the condition or exiting | |
406 | # on failure. We just poll on its PID. On Unix, if the child |
|
407 | # on failure. We just poll on its PID. On Unix, if the child | |
407 | # process fails to start, it will be left in a zombie state until |
|
408 | # process fails to start, it will be left in a zombie state until | |
408 | # the parent wait on it, which we cannot do since we expect a long |
|
409 | # the parent wait on it, which we cannot do since we expect a long | |
409 | # running process on success. Instead we listen for SIGCHLD telling |
|
410 | # running process on success. Instead we listen for SIGCHLD telling | |
410 | # us our child process terminated. |
|
411 | # us our child process terminated. | |
411 | terminated = set() |
|
412 | terminated = set() | |
412 | def handler(signum, frame): |
|
413 | def handler(signum, frame): | |
413 | terminated.add(os.wait()) |
|
414 | terminated.add(os.wait()) | |
414 | prevhandler = None |
|
415 | prevhandler = None | |
415 | SIGCHLD = getattr(signal, 'SIGCHLD', None) |
|
416 | SIGCHLD = getattr(signal, 'SIGCHLD', None) | |
416 | if SIGCHLD is not None: |
|
417 | if SIGCHLD is not None: | |
417 | prevhandler = signal.signal(SIGCHLD, handler) |
|
418 | prevhandler = signal.signal(SIGCHLD, handler) | |
418 | try: |
|
419 | try: | |
419 | pid = spawndetached(args) |
|
420 | pid = spawndetached(args) | |
420 | while not condfn(): |
|
421 | while not condfn(): | |
421 | if ((pid in terminated or not testpid(pid)) |
|
422 | if ((pid in terminated or not testpid(pid)) | |
422 | and not condfn()): |
|
423 | and not condfn()): | |
423 | return -1 |
|
424 | return -1 | |
424 | time.sleep(0.1) |
|
425 | time.sleep(0.1) | |
425 | return pid |
|
426 | return pid | |
426 | finally: |
|
427 | finally: | |
427 | if prevhandler is not None: |
|
428 | if prevhandler is not None: | |
428 | signal.signal(signal.SIGCHLD, prevhandler) |
|
429 | signal.signal(signal.SIGCHLD, prevhandler) | |
429 |
|
430 | |||
430 | @contextlib.contextmanager |
|
431 | @contextlib.contextmanager | |
431 | def uninterruptible(warn): |
|
432 | def uninterruptible(warn): | |
432 | """Inhibit SIGINT handling on a region of code. |
|
433 | """Inhibit SIGINT handling on a region of code. | |
433 |
|
434 | |||
434 | Note that if this is called in a non-main thread, it turns into a no-op. |
|
435 | Note that if this is called in a non-main thread, it turns into a no-op. | |
435 |
|
436 | |||
436 | Args: |
|
437 | Args: | |
437 | warn: A callable which takes no arguments, and returns True if the |
|
438 | warn: A callable which takes no arguments, and returns True if the | |
438 | previous signal handling should be restored. |
|
439 | previous signal handling should be restored. | |
439 | """ |
|
440 | """ | |
440 |
|
441 | |||
441 | oldsiginthandler = [signal.getsignal(signal.SIGINT)] |
|
442 | oldsiginthandler = [signal.getsignal(signal.SIGINT)] | |
442 | shouldbail = [] |
|
443 | shouldbail = [] | |
443 |
|
444 | |||
444 | def disabledsiginthandler(*args): |
|
445 | def disabledsiginthandler(*args): | |
445 | if warn(): |
|
446 | if warn(): | |
446 | signal.signal(signal.SIGINT, oldsiginthandler[0]) |
|
447 | signal.signal(signal.SIGINT, oldsiginthandler[0]) | |
447 | del oldsiginthandler[0] |
|
448 | del oldsiginthandler[0] | |
448 | shouldbail.append(True) |
|
449 | shouldbail.append(True) | |
449 |
|
450 | |||
450 | try: |
|
451 | try: | |
451 | try: |
|
452 | try: | |
452 | signal.signal(signal.SIGINT, disabledsiginthandler) |
|
453 | signal.signal(signal.SIGINT, disabledsiginthandler) | |
453 | except ValueError: |
|
454 | except ValueError: | |
454 | # wrong thread, oh well, we tried |
|
455 | # wrong thread, oh well, we tried | |
455 | del oldsiginthandler[0] |
|
456 | del oldsiginthandler[0] | |
456 | yield |
|
457 | yield | |
457 | finally: |
|
458 | finally: | |
458 | if oldsiginthandler: |
|
459 | if oldsiginthandler: | |
459 | signal.signal(signal.SIGINT, oldsiginthandler[0]) |
|
460 | signal.signal(signal.SIGINT, oldsiginthandler[0]) | |
460 | if shouldbail: |
|
461 | if shouldbail: | |
461 | raise KeyboardInterrupt |
|
462 | raise KeyboardInterrupt | |
462 |
|
463 | |||
463 | if pycompat.iswindows: |
|
464 | if pycompat.iswindows: | |
464 | # no fork on Windows, but we can create a detached process |
|
465 | # no fork on Windows, but we can create a detached process | |
465 | # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863.aspx |
|
466 | # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863.aspx | |
466 | # No stdlib constant exists for this value |
|
467 | # No stdlib constant exists for this value | |
467 | DETACHED_PROCESS = 0x00000008 |
|
468 | DETACHED_PROCESS = 0x00000008 | |
468 | # Following creation flags might create a console GUI window. |
|
469 | # Following creation flags might create a console GUI window. | |
469 | # Using subprocess.CREATE_NEW_CONSOLE might helps. |
|
470 | # Using subprocess.CREATE_NEW_CONSOLE might helps. | |
470 | # See https://phab.mercurial-scm.org/D1701 for discussion |
|
471 | # See https://phab.mercurial-scm.org/D1701 for discussion | |
471 | _creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP |
|
472 | _creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP | |
472 |
|
473 | |||
473 | def runbgcommand( |
|
474 | def runbgcommand( | |
474 | script, env, shell=False, stdout=None, stderr=None, ensurestart=True): |
|
475 | script, env, shell=False, stdout=None, stderr=None, ensurestart=True): | |
475 | '''Spawn a command without waiting for it to finish.''' |
|
476 | '''Spawn a command without waiting for it to finish.''' | |
476 | # we can't use close_fds *and* redirect stdin. I'm not sure that we |
|
477 | # we can't use close_fds *and* redirect stdin. I'm not sure that we | |
477 | # need to because the detached process has no console connection. |
|
478 | # need to because the detached process has no console connection. | |
478 | subprocess.Popen( |
|
479 | subprocess.Popen( | |
479 | tonativestr(script), |
|
480 | tonativestr(script), | |
480 | shell=shell, env=tonativeenv(env), close_fds=True, |
|
481 | shell=shell, env=tonativeenv(env), close_fds=True, | |
481 | creationflags=_creationflags, stdout=stdout, |
|
482 | creationflags=_creationflags, stdout=stdout, | |
482 | stderr=stderr) |
|
483 | stderr=stderr) | |
483 | else: |
|
484 | else: | |
484 | def runbgcommand( |
|
485 | def runbgcommand( | |
485 | cmd, env, shell=False, stdout=None, stderr=None, ensurestart=True): |
|
486 | cmd, env, shell=False, stdout=None, stderr=None, ensurestart=True): | |
486 | '''Spawn a command without waiting for it to finish.''' |
|
487 | '''Spawn a command without waiting for it to finish.''' | |
487 | # double-fork to completely detach from the parent process |
|
488 | # double-fork to completely detach from the parent process | |
488 | # based on http://code.activestate.com/recipes/278731 |
|
489 | # based on http://code.activestate.com/recipes/278731 | |
489 | pid = os.fork() |
|
490 | pid = os.fork() | |
490 | if pid: |
|
491 | if pid: | |
491 | if not ensurestart: |
|
492 | if not ensurestart: | |
492 | return |
|
493 | return | |
493 | # Parent process |
|
494 | # Parent process | |
494 | (_pid, status) = os.waitpid(pid, 0) |
|
495 | (_pid, status) = os.waitpid(pid, 0) | |
495 | if os.WIFEXITED(status): |
|
496 | if os.WIFEXITED(status): | |
496 | returncode = os.WEXITSTATUS(status) |
|
497 | returncode = os.WEXITSTATUS(status) | |
497 | else: |
|
498 | else: | |
498 | returncode = -os.WTERMSIG(status) |
|
499 | returncode = -os.WTERMSIG(status) | |
499 | if returncode != 0: |
|
500 | if returncode != 0: | |
500 | # The child process's return code is 0 on success, an errno |
|
501 | # The child process's return code is 0 on success, an errno | |
501 | # value on failure, or 255 if we don't have a valid errno |
|
502 | # value on failure, or 255 if we don't have a valid errno | |
502 | # value. |
|
503 | # value. | |
503 | # |
|
504 | # | |
504 | # (It would be slightly nicer to return the full exception info |
|
505 | # (It would be slightly nicer to return the full exception info | |
505 | # over a pipe as the subprocess module does. For now it |
|
506 | # over a pipe as the subprocess module does. For now it | |
506 | # doesn't seem worth adding that complexity here, though.) |
|
507 | # doesn't seem worth adding that complexity here, though.) | |
507 | if returncode == 255: |
|
508 | if returncode == 255: | |
508 | returncode = errno.EINVAL |
|
509 | returncode = errno.EINVAL | |
509 | raise OSError(returncode, 'error running %r: %s' % |
|
510 | raise OSError(returncode, 'error running %r: %s' % | |
510 | (cmd, os.strerror(returncode))) |
|
511 | (cmd, os.strerror(returncode))) | |
511 | return |
|
512 | return | |
512 |
|
513 | |||
513 | returncode = 255 |
|
514 | returncode = 255 | |
514 | try: |
|
515 | try: | |
515 | # Start a new session |
|
516 | # Start a new session | |
516 | os.setsid() |
|
517 | os.setsid() | |
517 |
|
518 | |||
518 | stdin = open(os.devnull, 'r') |
|
519 | stdin = open(os.devnull, 'r') | |
519 | if stdout is None: |
|
520 | if stdout is None: | |
520 | stdout = open(os.devnull, 'w') |
|
521 | stdout = open(os.devnull, 'w') | |
521 | if stderr is None: |
|
522 | if stderr is None: | |
522 | stderr = open(os.devnull, 'w') |
|
523 | stderr = open(os.devnull, 'w') | |
523 |
|
524 | |||
524 | # connect stdin to devnull to make sure the subprocess can't |
|
525 | # connect stdin to devnull to make sure the subprocess can't | |
525 | # muck up that stream for mercurial. |
|
526 | # muck up that stream for mercurial. | |
526 | subprocess.Popen( |
|
527 | subprocess.Popen( | |
527 | cmd, shell=shell, env=env, close_fds=True, |
|
528 | cmd, shell=shell, env=env, close_fds=True, | |
528 | stdin=stdin, stdout=stdout, stderr=stderr) |
|
529 | stdin=stdin, stdout=stdout, stderr=stderr) | |
529 | returncode = 0 |
|
530 | returncode = 0 | |
530 | except EnvironmentError as ex: |
|
531 | except EnvironmentError as ex: | |
531 | returncode = (ex.errno & 0xff) |
|
532 | returncode = (ex.errno & 0xff) | |
532 | if returncode == 0: |
|
533 | if returncode == 0: | |
533 | # This shouldn't happen, but just in case make sure the |
|
534 | # This shouldn't happen, but just in case make sure the | |
534 | # return code is never 0 here. |
|
535 | # return code is never 0 here. | |
535 | returncode = 255 |
|
536 | returncode = 255 | |
536 | except Exception: |
|
537 | except Exception: | |
537 | returncode = 255 |
|
538 | returncode = 255 | |
538 | finally: |
|
539 | finally: | |
539 | # mission accomplished, this child needs to exit and not |
|
540 | # mission accomplished, this child needs to exit and not | |
540 | # continue the hg process here. |
|
541 | # continue the hg process here. | |
541 | os._exit(returncode) |
|
542 | os._exit(returncode) |
@@ -1,3081 +1,3122 b'' | |||||
1 | Note for future hackers of patchbomb: this file is a bit heavy on |
|
1 | Note for future hackers of patchbomb: this file is a bit heavy on | |
2 | wildcards in test expectations due to how many things like hostnames |
|
2 | wildcards in test expectations due to how many things like hostnames | |
3 | tend to make it into outputs. As a result, you may need to perform the |
|
3 | tend to make it into outputs. As a result, you may need to perform the | |
4 | following regular expression substitutions: |
|
4 | following regular expression substitutions: | |
5 | Mercurial-patchbomb/.* -> Mercurial-patchbomb/* (glob) |
|
5 | Mercurial-patchbomb/.* -> Mercurial-patchbomb/* (glob) | |
6 | /mixed; boundary="===+[0-9]+==" -> /mixed; boundary="===*== (glob)" |
|
6 | /mixed; boundary="===+[0-9]+==" -> /mixed; boundary="===*== (glob)" | |
7 | --===+[0-9]+=+--$ -> --===*=-- (glob) |
|
7 | --===+[0-9]+=+--$ -> --===*=-- (glob) | |
8 | --===+[0-9]+=+$ -> --===*= (glob) |
|
8 | --===+[0-9]+=+$ -> --===*= (glob) | |
9 |
|
9 | |||
10 | $ cat > prune-blank-after-boundary.py <<EOF |
|
10 | $ cat > prune-blank-after-boundary.py <<EOF | |
11 | > from __future__ import absolute_import, print_function |
|
11 | > from __future__ import absolute_import, print_function | |
12 | > import sys |
|
12 | > import sys | |
13 | > skipblank = False |
|
13 | > skipblank = False | |
14 | > trim = lambda x: x.strip(' \r\n') |
|
14 | > trim = lambda x: x.strip(' \r\n') | |
15 | > for l in sys.stdin: |
|
15 | > for l in sys.stdin: | |
16 | > if trim(l).endswith('=--') or trim(l).endswith('=='): |
|
16 | > if trim(l).endswith('=--') or trim(l).endswith('=='): | |
17 | > skipblank = True |
|
17 | > skipblank = True | |
18 | > print(l, end='') |
|
18 | > print(l, end='') | |
19 | > continue |
|
19 | > continue | |
20 | > if not trim(l) and skipblank: |
|
20 | > if not trim(l) and skipblank: | |
21 | > continue |
|
21 | > continue | |
22 | > skipblank = False |
|
22 | > skipblank = False | |
23 | > print(l, end='') |
|
23 | > print(l, end='') | |
24 | > EOF |
|
24 | > EOF | |
25 | $ filterboundary() { |
|
25 | $ filterboundary() { | |
26 | > "$PYTHON" "$TESTTMP/prune-blank-after-boundary.py" |
|
26 | > "$PYTHON" "$TESTTMP/prune-blank-after-boundary.py" | |
27 | > } |
|
27 | > } | |
28 | $ echo "[extensions]" >> $HGRCPATH |
|
28 | $ echo "[extensions]" >> $HGRCPATH | |
29 | $ echo "patchbomb=" >> $HGRCPATH |
|
29 | $ echo "patchbomb=" >> $HGRCPATH | |
30 |
|
30 | |||
31 | $ hg init t |
|
31 | $ hg init t | |
32 | $ cd t |
|
32 | $ cd t | |
33 | $ echo a > a |
|
33 | $ echo a > a | |
34 | $ hg commit -Ama -d '1 0' |
|
34 | $ hg commit -Ama -d '1 0' | |
35 | adding a |
|
35 | adding a | |
36 |
|
36 | |||
37 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip |
|
37 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip | |
38 | this patch series consists of 1 patches. |
|
38 | this patch series consists of 1 patches. | |
39 |
|
39 | |||
40 |
|
40 | |||
41 | displaying [PATCH] a ... |
|
41 | displaying [PATCH] a ... | |
42 | MIME-Version: 1.0 |
|
42 | MIME-Version: 1.0 | |
43 | Content-Type: text/plain; charset="us-ascii" |
|
43 | Content-Type: text/plain; charset="us-ascii" | |
44 | Content-Transfer-Encoding: 7bit |
|
44 | Content-Transfer-Encoding: 7bit | |
45 | Subject: [PATCH] a |
|
45 | Subject: [PATCH] a | |
46 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
46 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
47 | X-Mercurial-Series-Index: 1 |
|
47 | X-Mercurial-Series-Index: 1 | |
48 | X-Mercurial-Series-Total: 1 |
|
48 | X-Mercurial-Series-Total: 1 | |
49 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
49 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> | |
50 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
50 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
51 | User-Agent: Mercurial-patchbomb/* (glob) |
|
51 | User-Agent: Mercurial-patchbomb/* (glob) | |
52 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
52 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
53 | From: quux |
|
53 | From: quux | |
54 | To: foo |
|
54 | To: foo | |
55 | Cc: bar |
|
55 | Cc: bar | |
56 |
|
56 | |||
57 | # HG changeset patch |
|
57 | # HG changeset patch | |
58 | # User test |
|
58 | # User test | |
59 | # Date 1 0 |
|
59 | # Date 1 0 | |
60 | # Thu Jan 01 00:00:01 1970 +0000 |
|
60 | # Thu Jan 01 00:00:01 1970 +0000 | |
61 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
61 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
62 | # Parent 0000000000000000000000000000000000000000 |
|
62 | # Parent 0000000000000000000000000000000000000000 | |
63 | a |
|
63 | a | |
64 |
|
64 | |||
65 | diff -r 000000000000 -r 8580ff50825a a |
|
65 | diff -r 000000000000 -r 8580ff50825a a | |
66 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
66 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
67 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
67 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
68 | @@ -0,0 +1,1 @@ |
|
68 | @@ -0,0 +1,1 @@ | |
69 | +a |
|
69 | +a | |
70 |
|
70 | |||
71 |
|
71 | |||
72 | If --to is specified on the command line, it should override any |
|
72 | If --to is specified on the command line, it should override any | |
73 | email.to config setting. Same for --cc: |
|
73 | email.to config setting. Same for --cc: | |
74 |
|
74 | |||
75 | $ hg email --date '1970-1-1 0:1' -n -f quux --to foo --cc bar -r tip \ |
|
75 | $ hg email --date '1970-1-1 0:1' -n -f quux --to foo --cc bar -r tip \ | |
76 | > --config email.to=bob@example.com --config email.cc=alice@example.com |
|
76 | > --config email.to=bob@example.com --config email.cc=alice@example.com | |
77 | this patch series consists of 1 patches. |
|
77 | this patch series consists of 1 patches. | |
78 |
|
78 | |||
79 |
|
79 | |||
80 | displaying [PATCH] a ... |
|
80 | displaying [PATCH] a ... | |
81 | MIME-Version: 1.0 |
|
81 | MIME-Version: 1.0 | |
82 | Content-Type: text/plain; charset="us-ascii" |
|
82 | Content-Type: text/plain; charset="us-ascii" | |
83 | Content-Transfer-Encoding: 7bit |
|
83 | Content-Transfer-Encoding: 7bit | |
84 | Subject: [PATCH] a |
|
84 | Subject: [PATCH] a | |
85 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
85 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
86 | X-Mercurial-Series-Index: 1 |
|
86 | X-Mercurial-Series-Index: 1 | |
87 | X-Mercurial-Series-Total: 1 |
|
87 | X-Mercurial-Series-Total: 1 | |
88 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
88 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> | |
89 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
89 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
90 | User-Agent: Mercurial-patchbomb/* (glob) |
|
90 | User-Agent: Mercurial-patchbomb/* (glob) | |
91 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
91 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
92 | From: quux |
|
92 | From: quux | |
93 | To: foo |
|
93 | To: foo | |
94 | Cc: bar |
|
94 | Cc: bar | |
95 |
|
95 | |||
96 | # HG changeset patch |
|
96 | # HG changeset patch | |
97 | # User test |
|
97 | # User test | |
98 | # Date 1 0 |
|
98 | # Date 1 0 | |
99 | # Thu Jan 01 00:00:01 1970 +0000 |
|
99 | # Thu Jan 01 00:00:01 1970 +0000 | |
100 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
100 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
101 | # Parent 0000000000000000000000000000000000000000 |
|
101 | # Parent 0000000000000000000000000000000000000000 | |
102 | a |
|
102 | a | |
103 |
|
103 | |||
104 | diff -r 000000000000 -r 8580ff50825a a |
|
104 | diff -r 000000000000 -r 8580ff50825a a | |
105 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
105 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
106 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
106 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
107 | @@ -0,0 +1,1 @@ |
|
107 | @@ -0,0 +1,1 @@ | |
108 | +a |
|
108 | +a | |
109 |
|
109 | |||
110 |
|
110 | |||
111 | $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF |
|
111 | $ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF | |
112 | > n |
|
112 | > n | |
113 | > EOF |
|
113 | > EOF | |
114 | this patch series consists of 1 patches. |
|
114 | this patch series consists of 1 patches. | |
115 |
|
115 | |||
116 |
|
116 | |||
117 | Final summary: |
|
117 | Final summary: | |
118 |
|
118 | |||
119 | From: quux |
|
119 | From: quux | |
120 | To: foo |
|
120 | To: foo | |
121 | Cc: bar |
|
121 | Cc: bar | |
122 | Subject: [PATCH] a |
|
122 | Subject: [PATCH] a | |
123 | a | 1 + |
|
123 | a | 1 + | |
124 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
124 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
125 |
|
125 | |||
126 | are you sure you want to send (yn)? n |
|
126 | are you sure you want to send (yn)? n | |
127 | abort: patchbomb canceled |
|
127 | abort: patchbomb canceled | |
128 | [255] |
|
128 | [255] | |
129 |
|
129 | |||
130 | $ hg --config ui.interactive=1 --config patchbomb.confirm=true email -n -f quux -t foo -c bar -r tip<<EOF |
|
130 | $ hg --config ui.interactive=1 --config patchbomb.confirm=true email -n -f quux -t foo -c bar -r tip<<EOF | |
131 | > n |
|
131 | > n | |
132 | > EOF |
|
132 | > EOF | |
133 | this patch series consists of 1 patches. |
|
133 | this patch series consists of 1 patches. | |
134 |
|
134 | |||
135 |
|
135 | |||
136 | Final summary: |
|
136 | Final summary: | |
137 |
|
137 | |||
138 | From: quux |
|
138 | From: quux | |
139 | To: foo |
|
139 | To: foo | |
140 | Cc: bar |
|
140 | Cc: bar | |
141 | Subject: [PATCH] a |
|
141 | Subject: [PATCH] a | |
142 | a | 1 + |
|
142 | a | 1 + | |
143 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
143 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
144 |
|
144 | |||
145 | are you sure you want to send (yn)? n |
|
145 | are you sure you want to send (yn)? n | |
146 | abort: patchbomb canceled |
|
146 | abort: patchbomb canceled | |
147 | [255] |
|
147 | [255] | |
148 |
|
148 | |||
149 |
|
149 | |||
150 | Test diff.git is respected |
|
150 | Test diff.git is respected | |
151 | $ hg --config diff.git=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip |
|
151 | $ hg --config diff.git=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip | |
152 | this patch series consists of 1 patches. |
|
152 | this patch series consists of 1 patches. | |
153 |
|
153 | |||
154 |
|
154 | |||
155 | displaying [PATCH] a ... |
|
155 | displaying [PATCH] a ... | |
156 | MIME-Version: 1.0 |
|
156 | MIME-Version: 1.0 | |
157 | Content-Type: text/plain; charset="us-ascii" |
|
157 | Content-Type: text/plain; charset="us-ascii" | |
158 | Content-Transfer-Encoding: 7bit |
|
158 | Content-Transfer-Encoding: 7bit | |
159 | Subject: [PATCH] a |
|
159 | Subject: [PATCH] a | |
160 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
160 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
161 | X-Mercurial-Series-Index: 1 |
|
161 | X-Mercurial-Series-Index: 1 | |
162 | X-Mercurial-Series-Total: 1 |
|
162 | X-Mercurial-Series-Total: 1 | |
163 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
163 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> | |
164 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
164 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
165 | User-Agent: Mercurial-patchbomb/* (glob) |
|
165 | User-Agent: Mercurial-patchbomb/* (glob) | |
166 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
166 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
167 | From: quux |
|
167 | From: quux | |
168 | To: foo |
|
168 | To: foo | |
169 | Cc: bar |
|
169 | Cc: bar | |
170 |
|
170 | |||
171 | # HG changeset patch |
|
171 | # HG changeset patch | |
172 | # User test |
|
172 | # User test | |
173 | # Date 1 0 |
|
173 | # Date 1 0 | |
174 | # Thu Jan 01 00:00:01 1970 +0000 |
|
174 | # Thu Jan 01 00:00:01 1970 +0000 | |
175 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
175 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
176 | # Parent 0000000000000000000000000000000000000000 |
|
176 | # Parent 0000000000000000000000000000000000000000 | |
177 | a |
|
177 | a | |
178 |
|
178 | |||
179 | diff --git a/a b/a |
|
179 | diff --git a/a b/a | |
180 | new file mode 100644 |
|
180 | new file mode 100644 | |
181 | --- /dev/null |
|
181 | --- /dev/null | |
182 | +++ b/a |
|
182 | +++ b/a | |
183 | @@ -0,0 +1,1 @@ |
|
183 | @@ -0,0 +1,1 @@ | |
184 | +a |
|
184 | +a | |
185 |
|
185 | |||
186 |
|
186 | |||
187 |
|
187 | |||
188 | Test breaking format changes aren't |
|
188 | Test breaking format changes aren't | |
189 | $ hg --config diff.noprefix=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip |
|
189 | $ hg --config diff.noprefix=True email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip | |
190 | this patch series consists of 1 patches. |
|
190 | this patch series consists of 1 patches. | |
191 |
|
191 | |||
192 |
|
192 | |||
193 | displaying [PATCH] a ... |
|
193 | displaying [PATCH] a ... | |
194 | MIME-Version: 1.0 |
|
194 | MIME-Version: 1.0 | |
195 | Content-Type: text/plain; charset="us-ascii" |
|
195 | Content-Type: text/plain; charset="us-ascii" | |
196 | Content-Transfer-Encoding: 7bit |
|
196 | Content-Transfer-Encoding: 7bit | |
197 | Subject: [PATCH] a |
|
197 | Subject: [PATCH] a | |
198 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
198 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
199 | X-Mercurial-Series-Index: 1 |
|
199 | X-Mercurial-Series-Index: 1 | |
200 | X-Mercurial-Series-Total: 1 |
|
200 | X-Mercurial-Series-Total: 1 | |
201 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
201 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> | |
202 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
202 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
203 | User-Agent: Mercurial-patchbomb/* (glob) |
|
203 | User-Agent: Mercurial-patchbomb/* (glob) | |
204 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
204 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
205 | From: quux |
|
205 | From: quux | |
206 | To: foo |
|
206 | To: foo | |
207 | Cc: bar |
|
207 | Cc: bar | |
208 |
|
208 | |||
209 | # HG changeset patch |
|
209 | # HG changeset patch | |
210 | # User test |
|
210 | # User test | |
211 | # Date 1 0 |
|
211 | # Date 1 0 | |
212 | # Thu Jan 01 00:00:01 1970 +0000 |
|
212 | # Thu Jan 01 00:00:01 1970 +0000 | |
213 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
213 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
214 | # Parent 0000000000000000000000000000000000000000 |
|
214 | # Parent 0000000000000000000000000000000000000000 | |
215 | a |
|
215 | a | |
216 |
|
216 | |||
217 | diff -r 000000000000 -r 8580ff50825a a |
|
217 | diff -r 000000000000 -r 8580ff50825a a | |
218 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
218 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
219 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
219 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
220 | @@ -0,0 +1,1 @@ |
|
220 | @@ -0,0 +1,1 @@ | |
221 | +a |
|
221 | +a | |
222 |
|
222 | |||
223 |
|
223 | |||
224 | $ echo b > b |
|
224 | $ echo b > b | |
225 | $ hg commit -Amb -d '2 0' |
|
225 | $ hg commit -Amb -d '2 0' | |
226 | adding b |
|
226 | adding b | |
227 |
|
227 | |||
228 | $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip |
|
228 | $ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip | |
229 | this patch series consists of 2 patches. |
|
229 | this patch series consists of 2 patches. | |
230 |
|
230 | |||
231 |
|
231 | |||
232 | Write the introductory message for the patch series. |
|
232 | Write the introductory message for the patch series. | |
233 |
|
233 | |||
234 |
|
234 | |||
235 | displaying [PATCH 0 of 2] test ... |
|
235 | displaying [PATCH 0 of 2] test ... | |
236 | MIME-Version: 1.0 |
|
236 | MIME-Version: 1.0 | |
237 | Content-Type: text/plain; charset="us-ascii" |
|
237 | Content-Type: text/plain; charset="us-ascii" | |
238 | Content-Transfer-Encoding: 7bit |
|
238 | Content-Transfer-Encoding: 7bit | |
239 | Subject: [PATCH 0 of 2] test |
|
239 | Subject: [PATCH 0 of 2] test | |
240 | Message-Id: <patchbomb.120@test-hostname> |
|
240 | Message-Id: <patchbomb.120@test-hostname> | |
241 | User-Agent: Mercurial-patchbomb/* (glob) |
|
241 | User-Agent: Mercurial-patchbomb/* (glob) | |
242 | Date: Thu, 01 Jan 1970 00:02:00 +0000 |
|
242 | Date: Thu, 01 Jan 1970 00:02:00 +0000 | |
243 | From: quux |
|
243 | From: quux | |
244 | To: foo |
|
244 | To: foo | |
245 | Cc: bar |
|
245 | Cc: bar | |
246 |
|
246 | |||
247 |
|
247 | |||
248 | displaying [PATCH 1 of 2] a ... |
|
248 | displaying [PATCH 1 of 2] a ... | |
249 | MIME-Version: 1.0 |
|
249 | MIME-Version: 1.0 | |
250 | Content-Type: text/plain; charset="us-ascii" |
|
250 | Content-Type: text/plain; charset="us-ascii" | |
251 | Content-Transfer-Encoding: 7bit |
|
251 | Content-Transfer-Encoding: 7bit | |
252 | Subject: [PATCH 1 of 2] a |
|
252 | Subject: [PATCH 1 of 2] a | |
253 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
253 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
254 | X-Mercurial-Series-Index: 1 |
|
254 | X-Mercurial-Series-Index: 1 | |
255 | X-Mercurial-Series-Total: 2 |
|
255 | X-Mercurial-Series-Total: 2 | |
256 | Message-Id: <8580ff50825a50c8f716.121@test-hostname> |
|
256 | Message-Id: <8580ff50825a50c8f716.121@test-hostname> | |
257 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname> |
|
257 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname> | |
258 | In-Reply-To: <patchbomb.120@test-hostname> |
|
258 | In-Reply-To: <patchbomb.120@test-hostname> | |
259 | References: <patchbomb.120@test-hostname> |
|
259 | References: <patchbomb.120@test-hostname> | |
260 | User-Agent: Mercurial-patchbomb/* (glob) |
|
260 | User-Agent: Mercurial-patchbomb/* (glob) | |
261 | Date: Thu, 01 Jan 1970 00:02:01 +0000 |
|
261 | Date: Thu, 01 Jan 1970 00:02:01 +0000 | |
262 | From: quux |
|
262 | From: quux | |
263 | To: foo |
|
263 | To: foo | |
264 | Cc: bar |
|
264 | Cc: bar | |
265 |
|
265 | |||
266 | # HG changeset patch |
|
266 | # HG changeset patch | |
267 | # User test |
|
267 | # User test | |
268 | # Date 1 0 |
|
268 | # Date 1 0 | |
269 | # Thu Jan 01 00:00:01 1970 +0000 |
|
269 | # Thu Jan 01 00:00:01 1970 +0000 | |
270 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
270 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
271 | # Parent 0000000000000000000000000000000000000000 |
|
271 | # Parent 0000000000000000000000000000000000000000 | |
272 | a |
|
272 | a | |
273 |
|
273 | |||
274 | diff -r 000000000000 -r 8580ff50825a a |
|
274 | diff -r 000000000000 -r 8580ff50825a a | |
275 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
275 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
276 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
276 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
277 | @@ -0,0 +1,1 @@ |
|
277 | @@ -0,0 +1,1 @@ | |
278 | +a |
|
278 | +a | |
279 |
|
279 | |||
280 | displaying [PATCH 2 of 2] b ... |
|
280 | displaying [PATCH 2 of 2] b ... | |
281 | MIME-Version: 1.0 |
|
281 | MIME-Version: 1.0 | |
282 | Content-Type: text/plain; charset="us-ascii" |
|
282 | Content-Type: text/plain; charset="us-ascii" | |
283 | Content-Transfer-Encoding: 7bit |
|
283 | Content-Transfer-Encoding: 7bit | |
284 | Subject: [PATCH 2 of 2] b |
|
284 | Subject: [PATCH 2 of 2] b | |
285 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
285 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
286 | X-Mercurial-Series-Index: 2 |
|
286 | X-Mercurial-Series-Index: 2 | |
287 | X-Mercurial-Series-Total: 2 |
|
287 | X-Mercurial-Series-Total: 2 | |
288 | Message-Id: <97d72e5f12c7e84f8506.122@test-hostname> |
|
288 | Message-Id: <97d72e5f12c7e84f8506.122@test-hostname> | |
289 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname> |
|
289 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.121@test-hostname> | |
290 | In-Reply-To: <patchbomb.120@test-hostname> |
|
290 | In-Reply-To: <patchbomb.120@test-hostname> | |
291 | References: <patchbomb.120@test-hostname> |
|
291 | References: <patchbomb.120@test-hostname> | |
292 | User-Agent: Mercurial-patchbomb/* (glob) |
|
292 | User-Agent: Mercurial-patchbomb/* (glob) | |
293 | Date: Thu, 01 Jan 1970 00:02:02 +0000 |
|
293 | Date: Thu, 01 Jan 1970 00:02:02 +0000 | |
294 | From: quux |
|
294 | From: quux | |
295 | To: foo |
|
295 | To: foo | |
296 | Cc: bar |
|
296 | Cc: bar | |
297 |
|
297 | |||
298 | # HG changeset patch |
|
298 | # HG changeset patch | |
299 | # User test |
|
299 | # User test | |
300 | # Date 2 0 |
|
300 | # Date 2 0 | |
301 | # Thu Jan 01 00:00:02 1970 +0000 |
|
301 | # Thu Jan 01 00:00:02 1970 +0000 | |
302 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
302 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
303 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
303 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
304 | b |
|
304 | b | |
305 |
|
305 | |||
306 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
306 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
307 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
307 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
308 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
308 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
309 | @@ -0,0 +1,1 @@ |
|
309 | @@ -0,0 +1,1 @@ | |
310 | +b |
|
310 | +b | |
311 |
|
311 | |||
312 |
|
312 | |||
313 | .hg/last-email.txt |
|
313 | .hg/last-email.txt | |
314 |
|
314 | |||
315 | $ cat > editor.sh << '__EOF__' |
|
315 | $ cat > editor.sh << '__EOF__' | |
316 | > echo "a precious introductory message" > "$1" |
|
316 | > echo "a precious introductory message" > "$1" | |
317 | > __EOF__ |
|
317 | > __EOF__ | |
318 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg email -n -t foo -s test -r 0:tip > /dev/null |
|
318 | $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg email -n -t foo -s test -r 0:tip > /dev/null | |
319 | $ cat .hg/last-email.txt |
|
319 | $ cat .hg/last-email.txt | |
320 | a precious introductory message |
|
320 | a precious introductory message | |
321 |
|
321 | |||
322 | $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \ |
|
322 | $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \ | |
323 | > --config extensions.progress= --config progress.assume-tty=1 \ |
|
323 | > --config extensions.progress= --config progress.assume-tty=1 \ | |
324 | > --config progress.delay=0 --config progress.refresh=0 \ |
|
324 | > --config progress.delay=0 --config progress.refresh=0 \ | |
325 | > --config progress.width=60 \ |
|
325 | > --config progress.width=60 \ | |
326 | > --config extensions.mocktime=$TESTDIR/mocktime.py |
|
326 | > --config extensions.mocktime=$TESTDIR/mocktime.py | |
327 | this patch series consists of 2 patches. |
|
327 | this patch series consists of 2 patches. | |
328 |
|
328 | |||
329 |
|
329 | |||
330 | Write the introductory message for the patch series. |
|
330 | Write the introductory message for the patch series. | |
331 |
|
331 | |||
332 | \r (no-eol) (esc) |
|
332 | \r (no-eol) (esc) | |
333 | sending [ ] 0/3\r (no-eol) (esc) |
|
333 | sending [ ] 0/3\r (no-eol) (esc) | |
334 | \r (no-eol) (esc) |
|
334 | \r (no-eol) (esc) | |
335 | \r (no-eol) (esc) |
|
335 | \r (no-eol) (esc) | |
336 | sending [============> ] 1/3 01s\r (no-eol) (esc) |
|
336 | sending [============> ] 1/3 01s\r (no-eol) (esc) | |
337 | \r (no-eol) (esc) |
|
337 | \r (no-eol) (esc) | |
338 | \r (no-eol) (esc) |
|
338 | \r (no-eol) (esc) | |
339 | sending [==========================> ] 2/3 01s\r (no-eol) (esc) |
|
339 | sending [==========================> ] 2/3 01s\r (no-eol) (esc) | |
340 | \r (esc) |
|
340 | \r (esc) | |
341 | sending [PATCH 0 of 2] test ... |
|
341 | sending [PATCH 0 of 2] test ... | |
342 | sending [PATCH 1 of 2] a ... |
|
342 | sending [PATCH 1 of 2] a ... | |
343 | sending [PATCH 2 of 2] b ... |
|
343 | sending [PATCH 2 of 2] b ... | |
344 |
|
344 | |||
345 | $ cd .. |
|
345 | $ cd .. | |
346 |
|
346 | |||
347 | $ hg clone -q t t2 |
|
347 | $ hg clone -q t t2 | |
348 | $ cd t2 |
|
348 | $ cd t2 | |
349 | $ echo c > c |
|
349 | $ echo c > c | |
350 | $ hg commit -Amc -d '3 0' |
|
350 | $ hg commit -Amc -d '3 0' | |
351 | adding c |
|
351 | adding c | |
352 |
|
352 | |||
353 | $ cat > description <<EOF |
|
353 | $ cat > description <<EOF | |
354 | > a multiline |
|
354 | > a multiline | |
355 | > |
|
355 | > | |
356 | > description |
|
356 | > description | |
357 | > EOF |
|
357 | > EOF | |
358 |
|
358 | |||
359 |
|
359 | |||
360 | test bundle and description: |
|
360 | test bundle and description: | |
361 | $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \ |
|
361 | $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \ | |
362 | > -c bar -s test -r tip -b --desc description | filterboundary |
|
362 | > -c bar -s test -r tip -b --desc description | filterboundary | |
363 | searching for changes |
|
363 | searching for changes | |
364 | 1 changesets found |
|
364 | 1 changesets found | |
365 |
|
365 | |||
366 | displaying test ... |
|
366 | displaying test ... | |
367 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
367 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
368 | MIME-Version: 1.0 |
|
368 | MIME-Version: 1.0 | |
369 | Subject: test |
|
369 | Subject: test | |
370 | Message-Id: <patchbomb.180@test-hostname> |
|
370 | Message-Id: <patchbomb.180@test-hostname> | |
371 | User-Agent: Mercurial-patchbomb/* (glob) |
|
371 | User-Agent: Mercurial-patchbomb/* (glob) | |
372 | Date: Thu, 01 Jan 1970 00:03:00 +0000 |
|
372 | Date: Thu, 01 Jan 1970 00:03:00 +0000 | |
373 | From: quux |
|
373 | From: quux | |
374 | To: foo |
|
374 | To: foo | |
375 | Cc: bar |
|
375 | Cc: bar | |
376 |
|
376 | |||
377 | --===*= (glob) |
|
377 | --===*= (glob) | |
378 | MIME-Version: 1.0 |
|
378 | MIME-Version: 1.0 | |
379 | Content-Type: text/plain; charset="us-ascii" |
|
379 | Content-Type: text/plain; charset="us-ascii" | |
380 | Content-Transfer-Encoding: 7bit |
|
380 | Content-Transfer-Encoding: 7bit | |
381 |
|
381 | |||
382 | a multiline |
|
382 | a multiline | |
383 |
|
383 | |||
384 | description |
|
384 | description | |
385 |
|
385 | |||
386 | --===*= (glob) |
|
386 | --===*= (glob) | |
387 | Content-Type: application/x-mercurial-bundle |
|
387 | Content-Type: application/x-mercurial-bundle | |
388 | MIME-Version: 1.0 |
|
388 | MIME-Version: 1.0 | |
389 | Content-Disposition: attachment; filename="bundle.hg" |
|
389 | Content-Disposition: attachment; filename="bundle.hg" | |
390 | Content-Transfer-Encoding: base64 |
|
390 | Content-Transfer-Encoding: base64 | |
391 |
|
391 | |||
392 | SEcyMAAAAA5Db21wcmVzc2lvbj1CWkJaaDkxQVkmU1l91TAVAAAN////vFcSXL9/8H7R09C/578I |
|
392 | SEcyMAAAAA5Db21wcmVzc2lvbj1CWkJaaDkxQVkmU1l91TAVAAAN////vFcSXL9/8H7R09C/578I | |
393 | Ak0E4pe4SIIIgQSgGEQOcLABGYYNKgJgmhpp6mmjIZMCZNMhpgBBpkaYJpo9QaZMg02iaY2lCImK |
|
393 | Ak0E4pe4SIIIgQSgGEQOcLABGYYNKgJgmhpp6mmjIZMCZNMhpgBBpkaYJpo9QaZMg02iaY2lCImK | |
394 | emk02kmEAeoA0D01ANBoHqHqADTaj1NAAyZqA0Gg0KiYnqaepk0eoNDTCGj1A0eoyBoGjRkYBqAB |
|
394 | emk02kmEAeoA0D01ANBoHqHqADTaj1NAAyZqA0Gg0KiYnqaepk0eoNDTCGj1A0eoyBoGjRkYBqAB | |
395 | poNMmhkBhENSP0knlYZbqyEIYxkFdpDUS6roBDMgAGhkAqd92kEcgyeMo2MM366gpLNHjfKrhJPN |
|
395 | poNMmhkBhENSP0knlYZbqyEIYxkFdpDUS6roBDMgAGhkAqd92kEcgyeMo2MM366gpLNHjfKrhJPN | |
396 | vdBCHAEDsYzAvzkHKxy5KWBAmh5e1nFttGChpsxrgmutRG0YrsSLWEBH9h95cbZEKFeUKYykRXHa |
|
396 | vdBCHAEDsYzAvzkHKxy5KWBAmh5e1nFttGChpsxrgmutRG0YrsSLWEBH9h95cbZEKFeUKYykRXHa | |
397 | Bkt2OSgELsqqnWKeMudBR+YSZCOSHrwPz7B/Gfou7/L6QV6S0IgclBCitBVHMxMFq/vGwp5WHezM |
|
397 | Bkt2OSgELsqqnWKeMudBR+YSZCOSHrwPz7B/Gfou7/L6QV6S0IgclBCitBVHMxMFq/vGwp5WHezM | |
398 | JwhKTnH0OkMbmVjrAkQKR7VM2aNSXn+GzLOCzOQm0AJ1TLCpdSgnfFPcY7mGxAOyHXS1YEFVi5O9 |
|
398 | JwhKTnH0OkMbmVjrAkQKR7VM2aNSXn+GzLOCzOQm0AJ1TLCpdSgnfFPcY7mGxAOyHXS1YEFVi5O9 | |
399 | I4EVBBd8VRgN4n1MAm8l6QQ+yB60hkeX/0ZZmKoQRINkEBxEDZU2HjIZMcwWRvZtbRIa5kgkGIb/ |
|
399 | I4EVBBd8VRgN4n1MAm8l6QQ+yB60hkeX/0ZZmKoQRINkEBxEDZU2HjIZMcwWRvZtbRIa5kgkGIb/ | |
400 | SkImFwIkDtQxyX+LuSKcKEg+6pgKgA== |
|
400 | SkImFwIkDtQxyX+LuSKcKEg+6pgKgA== | |
401 | --===============*==-- (glob) |
|
401 | --===============*==-- (glob) | |
402 |
|
402 | |||
403 | with a specific bundle type |
|
403 | with a specific bundle type | |
404 | (binary part must be different) |
|
404 | (binary part must be different) | |
405 |
|
405 | |||
406 | $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \ |
|
406 | $ hg email --date '1970-1-1 0:3' -n -f quux -t foo \ | |
407 | > -c bar -s test -r tip -b --desc description \ |
|
407 | > -c bar -s test -r tip -b --desc description \ | |
408 | > --config patchbomb.bundletype=gzip-v1 | filterboundary |
|
408 | > --config patchbomb.bundletype=gzip-v1 | filterboundary | |
409 | searching for changes |
|
409 | searching for changes | |
410 | 1 changesets found |
|
410 | 1 changesets found | |
411 |
|
411 | |||
412 | displaying test ... |
|
412 | displaying test ... | |
413 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
413 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
414 | MIME-Version: 1.0 |
|
414 | MIME-Version: 1.0 | |
415 | Subject: test |
|
415 | Subject: test | |
416 | Message-Id: <patchbomb.180@test-hostname> |
|
416 | Message-Id: <patchbomb.180@test-hostname> | |
417 | User-Agent: Mercurial-patchbomb/* (glob) |
|
417 | User-Agent: Mercurial-patchbomb/* (glob) | |
418 | Date: Thu, 01 Jan 1970 00:03:00 +0000 |
|
418 | Date: Thu, 01 Jan 1970 00:03:00 +0000 | |
419 | From: quux |
|
419 | From: quux | |
420 | To: foo |
|
420 | To: foo | |
421 | Cc: bar |
|
421 | Cc: bar | |
422 |
|
422 | |||
423 | --===*= (glob) |
|
423 | --===*= (glob) | |
424 | MIME-Version: 1.0 |
|
424 | MIME-Version: 1.0 | |
425 | Content-Type: text/plain; charset="us-ascii" |
|
425 | Content-Type: text/plain; charset="us-ascii" | |
426 | Content-Transfer-Encoding: 7bit |
|
426 | Content-Transfer-Encoding: 7bit | |
427 |
|
427 | |||
428 | a multiline |
|
428 | a multiline | |
429 |
|
429 | |||
430 | description |
|
430 | description | |
431 |
|
431 | |||
432 | --===*= (glob) |
|
432 | --===*= (glob) | |
433 | Content-Type: application/x-mercurial-bundle |
|
433 | Content-Type: application/x-mercurial-bundle | |
434 | MIME-Version: 1.0 |
|
434 | MIME-Version: 1.0 | |
435 | Content-Disposition: attachment; filename="bundle.hg" |
|
435 | Content-Disposition: attachment; filename="bundle.hg" | |
436 | Content-Transfer-Encoding: base64 |
|
436 | Content-Transfer-Encoding: base64 | |
437 |
|
437 | |||
438 | SEcxMEdaeJxjYGBY8V9n/iLGbtFfJZuNk/euDCpWfrRy/vTrevFCx1/4t7J5LdeL0ix0Opx3kwEL |
|
438 | SEcxMEdaeJxjYGBY8V9n/iLGbtFfJZuNk/euDCpWfrRy/vTrevFCx1/4t7J5LdeL0ix0Opx3kwEL | |
439 | wKYXKqUJwqnG5sYWSWmmJsaWlqYWaRaWJpaWiWamZpYWRgZGxolJiabmSQbmZqlcQMV6QGwCxGzG |
|
439 | wKYXKqUJwqnG5sYWSWmmJsaWlqYWaRaWJpaWiWamZpYWRgZGxolJiabmSQbmZqlcQMV6QGwCxGzG | |
440 | CgZcySARUyA2A2LGZKiZ3Y+Lu786z4z4MWXmsrAZCsqrl1az5y21PMcjpbThzWeXGT+/nutbmvvz |
|
440 | CgZcySARUyA2A2LGZKiZ3Y+Lu786z4z4MWXmsrAZCsqrl1az5y21PMcjpbThzWeXGT+/nutbmvvz | |
441 | zXYS3BoGxdrJDIYmlimJJiZpRokmqYYmaSYWFknmSSkmhqbmliamiZYWxuYmBhbJBgZcUBNZQe5K |
|
441 | zXYS3BoGxdrJDIYmlimJJiZpRokmqYYmaSYWFknmSSkmhqbmliamiZYWxuYmBhbJBgZcUBNZQe5K | |
442 | Epm7xF/LT+RLx/a9juFTomaYO/Rgsx4rwBN+IMCUDLOKAQBrsmti |
|
442 | Epm7xF/LT+RLx/a9juFTomaYO/Rgsx4rwBN+IMCUDLOKAQBrsmti | |
443 | (?) |
|
443 | (?) | |
444 | --===============*==-- (glob) |
|
444 | --===============*==-- (glob) | |
445 |
|
445 | |||
446 | utf-8 patch: |
|
446 | utf-8 patch: | |
447 | $ "$PYTHON" -c 'fp = open("utf", "wb"); fp.write(b"h\xC3\xB6mma!\n"); fp.close();' |
|
447 | $ "$PYTHON" -c 'fp = open("utf", "wb"); fp.write(b"h\xC3\xB6mma!\n"); fp.close();' | |
448 | $ hg commit -A -d '4 0' -m 'utf-8 content' |
|
448 | $ hg commit -A -d '4 0' -m 'utf-8 content' | |
449 | adding description |
|
449 | adding description | |
450 | adding utf |
|
450 | adding utf | |
451 |
|
451 | |||
452 | no mime encoding for email --test: |
|
452 | no mime encoding for email --test: | |
453 | $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n |
|
453 | $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | |
454 | this patch series consists of 1 patches. |
|
454 | this patch series consists of 1 patches. | |
455 |
|
455 | |||
456 |
|
456 | |||
457 | displaying [PATCH] utf-8 content ... |
|
457 | displaying [PATCH] utf-8 content ... | |
458 | MIME-Version: 1.0 |
|
458 | MIME-Version: 1.0 | |
459 | Content-Type: text/plain; charset="iso-8859-1" |
|
459 | Content-Type: text/plain; charset="iso-8859-1" | |
460 | Content-Transfer-Encoding: quoted-printable |
|
460 | Content-Transfer-Encoding: quoted-printable | |
461 | Subject: [PATCH] utf-8 content |
|
461 | Subject: [PATCH] utf-8 content | |
462 | X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
462 | X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f | |
463 | X-Mercurial-Series-Index: 1 |
|
463 | X-Mercurial-Series-Index: 1 | |
464 | X-Mercurial-Series-Total: 1 |
|
464 | X-Mercurial-Series-Total: 1 | |
465 | Message-Id: <909a00e13e9d78b575ae.240@test-hostname> |
|
465 | Message-Id: <909a00e13e9d78b575ae.240@test-hostname> | |
466 | X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@test-hostname> |
|
466 | X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@test-hostname> | |
467 | User-Agent: Mercurial-patchbomb/* (glob) |
|
467 | User-Agent: Mercurial-patchbomb/* (glob) | |
468 | Date: Thu, 01 Jan 1970 00:04:00 +0000 |
|
468 | Date: Thu, 01 Jan 1970 00:04:00 +0000 | |
469 | From: quux |
|
469 | From: quux | |
470 | To: foo |
|
470 | To: foo | |
471 | Cc: bar |
|
471 | Cc: bar | |
472 |
|
472 | |||
473 | # HG changeset patch |
|
473 | # HG changeset patch | |
474 | # User test |
|
474 | # User test | |
475 | # Date 4 0 |
|
475 | # Date 4 0 | |
476 | # Thu Jan 01 00:00:04 1970 +0000 |
|
476 | # Thu Jan 01 00:00:04 1970 +0000 | |
477 | # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
477 | # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f | |
478 | # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
478 | # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
479 | utf-8 content |
|
479 | utf-8 content | |
480 |
|
480 | |||
481 | diff -r ff2c9fa2018b -r 909a00e13e9d description |
|
481 | diff -r ff2c9fa2018b -r 909a00e13e9d description | |
482 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
482 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
483 | +++ b/description Thu Jan 01 00:00:04 1970 +0000 |
|
483 | +++ b/description Thu Jan 01 00:00:04 1970 +0000 | |
484 | @@ -0,0 +1,3 @@ |
|
484 | @@ -0,0 +1,3 @@ | |
485 | +a multiline |
|
485 | +a multiline | |
486 | + |
|
486 | + | |
487 | +description |
|
487 | +description | |
488 | diff -r ff2c9fa2018b -r 909a00e13e9d utf |
|
488 | diff -r ff2c9fa2018b -r 909a00e13e9d utf | |
489 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
489 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
490 | +++ b/utf Thu Jan 01 00:00:04 1970 +0000 |
|
490 | +++ b/utf Thu Jan 01 00:00:04 1970 +0000 | |
491 | @@ -0,0 +1,1 @@ |
|
491 | @@ -0,0 +1,1 @@ | |
492 | +h=C3=B6mma! |
|
492 | +h=C3=B6mma! | |
493 |
|
493 | |||
494 |
|
494 | |||
495 | mime encoded mbox (base64): |
|
495 | mime encoded mbox (base64): | |
496 | $ hg email --date '1970-1-1 0:4' -f 'Q <quux>' -t foo -c bar -r tip -m mbox |
|
496 | $ hg email --date '1970-1-1 0:4' -f 'Q <quux>' -t foo -c bar -r tip -m mbox | |
497 | this patch series consists of 1 patches. |
|
497 | this patch series consists of 1 patches. | |
498 |
|
498 | |||
499 |
|
499 | |||
500 | sending [PATCH] utf-8 content ... |
|
500 | sending [PATCH] utf-8 content ... | |
501 |
|
501 | |||
502 | $ cat mbox |
|
502 | $ cat mbox | |
503 | From quux ... ... .. ..:..:.. .... (re) |
|
503 | From quux ... ... .. ..:..:.. .... (re) | |
504 | MIME-Version: 1.0 |
|
504 | MIME-Version: 1.0 | |
505 | Content-Type: text/plain; charset="utf-8" |
|
505 | Content-Type: text/plain; charset="utf-8" | |
506 | Content-Transfer-Encoding: base64 |
|
506 | Content-Transfer-Encoding: base64 | |
507 | Subject: [PATCH] utf-8 content |
|
507 | Subject: [PATCH] utf-8 content | |
508 | X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
508 | X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f | |
509 | X-Mercurial-Series-Index: 1 |
|
509 | X-Mercurial-Series-Index: 1 | |
510 | X-Mercurial-Series-Total: 1 |
|
510 | X-Mercurial-Series-Total: 1 | |
511 | Message-Id: <909a00e13e9d78b575ae.240@test-hostname> |
|
511 | Message-Id: <909a00e13e9d78b575ae.240@test-hostname> | |
512 | X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@test-hostname> |
|
512 | X-Mercurial-Series-Id: <909a00e13e9d78b575ae.240@test-hostname> | |
513 | User-Agent: Mercurial-patchbomb/* (glob) |
|
513 | User-Agent: Mercurial-patchbomb/* (glob) | |
514 | Date: Thu, 01 Jan 1970 00:04:00 +0000 |
|
514 | Date: Thu, 01 Jan 1970 00:04:00 +0000 | |
515 | From: Q <quux> |
|
515 | From: Q <quux> | |
516 | To: foo |
|
516 | To: foo | |
517 | Cc: bar |
|
517 | Cc: bar | |
518 |
|
518 | |||
519 | IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojICAgICAgVGh1IEph |
|
519 | IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojICAgICAgVGh1IEph | |
520 | biAwMSAwMDowMDowNCAxOTcwICswMDAwCiMgTm9kZSBJRCA5MDlhMDBlMTNlOWQ3OGI1NzVhZWVl |
|
520 | biAwMSAwMDowMDowNCAxOTcwICswMDAwCiMgTm9kZSBJRCA5MDlhMDBlMTNlOWQ3OGI1NzVhZWVl | |
521 | MjNkZGRiYWRhNDZkNWExNDNmCiMgUGFyZW50ICBmZjJjOWZhMjAxOGIxNWZhNzRiMzMzNjNiZGE5 |
|
521 | MjNkZGRiYWRhNDZkNWExNDNmCiMgUGFyZW50ICBmZjJjOWZhMjAxOGIxNWZhNzRiMzMzNjNiZGE5 | |
522 | NTI3MzIzZTJhOTlmCnV0Zi04IGNvbnRlbnQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIDkwOWEw |
|
522 | NTI3MzIzZTJhOTlmCnV0Zi04IGNvbnRlbnQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIDkwOWEw | |
523 | MGUxM2U5ZCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3 |
|
523 | MGUxM2U5ZCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3 | |
524 | MCArMDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAK |
|
524 | MCArMDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAK | |
525 | QEAgLTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5 |
|
525 | QEAgLTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5 | |
526 | ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDow |
|
526 | ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDow | |
527 | MDowMCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAK |
|
527 | MDowMCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAK | |
528 | QEAgLTAsMCArMSwxIEBACitow7ZtbWEhCg== |
|
528 | QEAgLTAsMCArMSwxIEBACitow7ZtbWEhCg== | |
529 |
|
529 | |||
530 |
|
530 | |||
531 | >>> import base64 |
|
531 | >>> import base64 | |
532 | >>> patch = base64.b64decode(open("mbox").read().split("\n\n")[1]) |
|
532 | >>> patch = base64.b64decode(open("mbox").read().split("\n\n")[1]) | |
533 | >>> if not isinstance(patch, str): |
|
533 | >>> if not isinstance(patch, str): | |
534 | ... import sys |
|
534 | ... import sys | |
535 | ... sys.stdout.flush() |
|
535 | ... sys.stdout.flush() | |
536 | ... junk = sys.stdout.buffer.write(patch + b"\n") |
|
536 | ... junk = sys.stdout.buffer.write(patch + b"\n") | |
537 | ... else: |
|
537 | ... else: | |
538 | ... print(patch) |
|
538 | ... print(patch) | |
539 | # HG changeset patch |
|
539 | # HG changeset patch | |
540 | # User test |
|
540 | # User test | |
541 | # Date 4 0 |
|
541 | # Date 4 0 | |
542 | # Thu Jan 01 00:00:04 1970 +0000 |
|
542 | # Thu Jan 01 00:00:04 1970 +0000 | |
543 | # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
543 | # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f | |
544 | # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
544 | # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
545 | utf-8 content |
|
545 | utf-8 content | |
546 |
|
546 | |||
547 | diff -r ff2c9fa2018b -r 909a00e13e9d description |
|
547 | diff -r ff2c9fa2018b -r 909a00e13e9d description | |
548 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
548 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
549 | +++ b/description Thu Jan 01 00:00:04 1970 +0000 |
|
549 | +++ b/description Thu Jan 01 00:00:04 1970 +0000 | |
550 | @@ -0,0 +1,3 @@ |
|
550 | @@ -0,0 +1,3 @@ | |
551 | +a multiline |
|
551 | +a multiline | |
552 | + |
|
552 | + | |
553 | +description |
|
553 | +description | |
554 | diff -r ff2c9fa2018b -r 909a00e13e9d utf |
|
554 | diff -r ff2c9fa2018b -r 909a00e13e9d utf | |
555 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
555 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
556 | +++ b/utf Thu Jan 01 00:00:04 1970 +0000 |
|
556 | +++ b/utf Thu Jan 01 00:00:04 1970 +0000 | |
557 | @@ -0,0 +1,1 @@ |
|
557 | @@ -0,0 +1,1 @@ | |
558 | +h\xc3\xb6mma! (esc) |
|
558 | +h\xc3\xb6mma! (esc) | |
559 |
|
559 | |||
560 | $ rm mbox |
|
560 | $ rm mbox | |
561 |
|
561 | |||
562 | mime encoded mbox (quoted-printable): |
|
562 | mime encoded mbox (quoted-printable): | |
563 | $ "$PYTHON" -c 'fp = open("long", "wb"); fp.write(b"%s\nfoo\n\nbar\n" % (b"x" * 1024)); fp.close();' |
|
563 | $ "$PYTHON" -c 'fp = open("long", "wb"); fp.write(b"%s\nfoo\n\nbar\n" % (b"x" * 1024)); fp.close();' | |
564 | $ hg commit -A -d '4 0' -m 'long line' |
|
564 | $ hg commit -A -d '4 0' -m 'long line' | |
565 | adding long |
|
565 | adding long | |
566 |
|
566 | |||
567 | no mime encoding for email --test: |
|
567 | no mime encoding for email --test: | |
568 | $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n |
|
568 | $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | |
569 | this patch series consists of 1 patches. |
|
569 | this patch series consists of 1 patches. | |
570 |
|
570 | |||
571 |
|
571 | |||
572 | displaying [PATCH] long line ... |
|
572 | displaying [PATCH] long line ... | |
573 | MIME-Version: 1.0 |
|
573 | MIME-Version: 1.0 | |
574 | Content-Type: text/plain; charset="us-ascii" |
|
574 | Content-Type: text/plain; charset="us-ascii" | |
575 | Content-Transfer-Encoding: quoted-printable |
|
575 | Content-Transfer-Encoding: quoted-printable | |
576 | Subject: [PATCH] long line |
|
576 | Subject: [PATCH] long line | |
577 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
577 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
578 | X-Mercurial-Series-Index: 1 |
|
578 | X-Mercurial-Series-Index: 1 | |
579 | X-Mercurial-Series-Total: 1 |
|
579 | X-Mercurial-Series-Total: 1 | |
580 | Message-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> |
|
580 | Message-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> | |
581 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> |
|
581 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> | |
582 | User-Agent: Mercurial-patchbomb/* (glob) |
|
582 | User-Agent: Mercurial-patchbomb/* (glob) | |
583 | Date: Thu, 01 Jan 1970 00:04:00 +0000 |
|
583 | Date: Thu, 01 Jan 1970 00:04:00 +0000 | |
584 | From: quux |
|
584 | From: quux | |
585 | To: foo |
|
585 | To: foo | |
586 | Cc: bar |
|
586 | Cc: bar | |
587 |
|
587 | |||
588 | # HG changeset patch |
|
588 | # HG changeset patch | |
589 | # User test |
|
589 | # User test | |
590 | # Date 4 0 |
|
590 | # Date 4 0 | |
591 | # Thu Jan 01 00:00:04 1970 +0000 |
|
591 | # Thu Jan 01 00:00:04 1970 +0000 | |
592 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
592 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
593 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
593 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
594 | long line |
|
594 | long line | |
595 |
|
595 | |||
596 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
596 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
597 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
597 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
598 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
598 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
599 | @@ -0,0 +1,4 @@ |
|
599 | @@ -0,0 +1,4 @@ | |
600 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
600 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
601 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
601 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
602 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
602 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
603 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
603 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
604 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
604 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
605 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
605 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
606 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
606 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
607 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
607 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
608 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
608 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
609 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
609 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
610 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
610 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
611 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
611 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
612 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
612 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
613 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
613 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
614 | +foo |
|
614 | +foo | |
615 | + |
|
615 | + | |
616 | +bar |
|
616 | +bar | |
617 |
|
617 | |||
618 |
|
618 | |||
619 | mime encoded mbox (quoted-printable): |
|
619 | mime encoded mbox (quoted-printable): | |
620 | $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox |
|
620 | $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox | |
621 | this patch series consists of 1 patches. |
|
621 | this patch series consists of 1 patches. | |
622 |
|
622 | |||
623 |
|
623 | |||
624 | sending [PATCH] long line ... |
|
624 | sending [PATCH] long line ... | |
625 | $ cat mbox |
|
625 | $ cat mbox | |
626 | From quux ... ... .. ..:..:.. .... (re) |
|
626 | From quux ... ... .. ..:..:.. .... (re) | |
627 | MIME-Version: 1.0 |
|
627 | MIME-Version: 1.0 | |
628 | Content-Type: text/plain; charset="us-ascii" |
|
628 | Content-Type: text/plain; charset="us-ascii" | |
629 | Content-Transfer-Encoding: quoted-printable |
|
629 | Content-Transfer-Encoding: quoted-printable | |
630 | Subject: [PATCH] long line |
|
630 | Subject: [PATCH] long line | |
631 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
631 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
632 | X-Mercurial-Series-Index: 1 |
|
632 | X-Mercurial-Series-Index: 1 | |
633 | X-Mercurial-Series-Total: 1 |
|
633 | X-Mercurial-Series-Total: 1 | |
634 | Message-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> |
|
634 | Message-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> | |
635 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> |
|
635 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.240@test-hostname> | |
636 | User-Agent: Mercurial-patchbomb/* (glob) |
|
636 | User-Agent: Mercurial-patchbomb/* (glob) | |
637 | Date: Thu, 01 Jan 1970 00:04:00 +0000 |
|
637 | Date: Thu, 01 Jan 1970 00:04:00 +0000 | |
638 | From: quux |
|
638 | From: quux | |
639 | To: foo |
|
639 | To: foo | |
640 | Cc: bar |
|
640 | Cc: bar | |
641 |
|
641 | |||
642 | # HG changeset patch |
|
642 | # HG changeset patch | |
643 | # User test |
|
643 | # User test | |
644 | # Date 4 0 |
|
644 | # Date 4 0 | |
645 | # Thu Jan 01 00:00:04 1970 +0000 |
|
645 | # Thu Jan 01 00:00:04 1970 +0000 | |
646 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
646 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
647 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
647 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
648 | long line |
|
648 | long line | |
649 |
|
649 | |||
650 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
650 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
651 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
651 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
652 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
652 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
653 | @@ -0,0 +1,4 @@ |
|
653 | @@ -0,0 +1,4 @@ | |
654 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
654 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
655 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
655 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
656 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
656 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
657 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
657 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
658 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
658 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
659 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
659 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
660 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
660 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
661 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
661 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
662 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
662 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
663 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
663 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
664 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
664 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
665 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
665 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
666 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
666 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
667 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
667 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
668 | +foo |
|
668 | +foo | |
669 | + |
|
669 | + | |
670 | +bar |
|
670 | +bar | |
671 |
|
671 | |||
672 |
|
672 | |||
673 |
|
673 | |||
674 | $ rm mbox |
|
674 | $ rm mbox | |
675 |
|
675 | |||
676 | iso-8859-1 patch: |
|
676 | iso-8859-1 patch: | |
677 | $ "$PYTHON" -c 'fp = open("isolatin", "wb"); fp.write(b"h\xF6mma!\n"); fp.close();' |
|
677 | $ "$PYTHON" -c 'fp = open("isolatin", "wb"); fp.write(b"h\xF6mma!\n"); fp.close();' | |
678 | $ hg commit -A -d '5 0' -m 'isolatin 8-bit encoding' |
|
678 | $ hg commit -A -d '5 0' -m 'isolatin 8-bit encoding' | |
679 | adding isolatin |
|
679 | adding isolatin | |
680 |
|
680 | |||
681 | iso-8859-1 mbox: |
|
681 | iso-8859-1 mbox: | |
682 | $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox |
|
682 | $ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox | |
683 | this patch series consists of 1 patches. |
|
683 | this patch series consists of 1 patches. | |
684 |
|
684 | |||
685 |
|
685 | |||
686 | sending [PATCH] isolatin 8-bit encoding ... |
|
686 | sending [PATCH] isolatin 8-bit encoding ... | |
687 | $ cat mbox |
|
687 | $ cat mbox | |
688 | From quux ... ... .. ..:..:.. .... (re) |
|
688 | From quux ... ... .. ..:..:.. .... (re) | |
689 | MIME-Version: 1.0 |
|
689 | MIME-Version: 1.0 | |
690 | Content-Type: text/plain; charset="iso-8859-1" |
|
690 | Content-Type: text/plain; charset="iso-8859-1" | |
691 | Content-Transfer-Encoding: quoted-printable |
|
691 | Content-Transfer-Encoding: quoted-printable | |
692 | Subject: [PATCH] isolatin 8-bit encoding |
|
692 | Subject: [PATCH] isolatin 8-bit encoding | |
693 | X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 |
|
693 | X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 | |
694 | X-Mercurial-Series-Index: 1 |
|
694 | X-Mercurial-Series-Index: 1 | |
695 | X-Mercurial-Series-Total: 1 |
|
695 | X-Mercurial-Series-Total: 1 | |
696 | Message-Id: <240fb913fc1b7ff15ddb.300@test-hostname> |
|
696 | Message-Id: <240fb913fc1b7ff15ddb.300@test-hostname> | |
697 | X-Mercurial-Series-Id: <240fb913fc1b7ff15ddb.300@test-hostname> |
|
697 | X-Mercurial-Series-Id: <240fb913fc1b7ff15ddb.300@test-hostname> | |
698 | User-Agent: Mercurial-patchbomb/* (glob) |
|
698 | User-Agent: Mercurial-patchbomb/* (glob) | |
699 | Date: Thu, 01 Jan 1970 00:05:00 +0000 |
|
699 | Date: Thu, 01 Jan 1970 00:05:00 +0000 | |
700 | From: quux |
|
700 | From: quux | |
701 | To: foo |
|
701 | To: foo | |
702 | Cc: bar |
|
702 | Cc: bar | |
703 |
|
703 | |||
704 | # HG changeset patch |
|
704 | # HG changeset patch | |
705 | # User test |
|
705 | # User test | |
706 | # Date 5 0 |
|
706 | # Date 5 0 | |
707 | # Thu Jan 01 00:00:05 1970 +0000 |
|
707 | # Thu Jan 01 00:00:05 1970 +0000 | |
708 | # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 |
|
708 | # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 | |
709 | # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
709 | # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
710 | isolatin 8-bit encoding |
|
710 | isolatin 8-bit encoding | |
711 |
|
711 | |||
712 | diff -r a2ea8fc83dd8 -r 240fb913fc1b isolatin |
|
712 | diff -r a2ea8fc83dd8 -r 240fb913fc1b isolatin | |
713 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
713 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
714 | +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000 |
|
714 | +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000 | |
715 | @@ -0,0 +1,1 @@ |
|
715 | @@ -0,0 +1,1 @@ | |
716 | +h=F6mma! |
|
716 | +h=F6mma! | |
717 |
|
717 | |||
718 |
|
718 | |||
719 |
|
719 | |||
720 | test diffstat for single patch: |
|
720 | test diffstat for single patch: | |
721 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 |
|
721 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 | |
722 | this patch series consists of 1 patches. |
|
722 | this patch series consists of 1 patches. | |
723 |
|
723 | |||
724 |
|
724 | |||
725 | Final summary: |
|
725 | Final summary: | |
726 |
|
726 | |||
727 | From: quux |
|
727 | From: quux | |
728 | To: foo |
|
728 | To: foo | |
729 | Cc: bar |
|
729 | Cc: bar | |
730 | Subject: [PATCH] test |
|
730 | Subject: [PATCH] test | |
731 | c | 1 + |
|
731 | c | 1 + | |
732 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
732 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
733 |
|
733 | |||
734 | are you sure you want to send (yn)? y |
|
734 | are you sure you want to send (yn)? y | |
735 |
|
735 | |||
736 | displaying [PATCH] test ... |
|
736 | displaying [PATCH] test ... | |
737 | MIME-Version: 1.0 |
|
737 | MIME-Version: 1.0 | |
738 | Content-Type: text/plain; charset="us-ascii" |
|
738 | Content-Type: text/plain; charset="us-ascii" | |
739 | Content-Transfer-Encoding: 7bit |
|
739 | Content-Transfer-Encoding: 7bit | |
740 | Subject: [PATCH] test |
|
740 | Subject: [PATCH] test | |
741 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
741 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
742 | X-Mercurial-Series-Index: 1 |
|
742 | X-Mercurial-Series-Index: 1 | |
743 | X-Mercurial-Series-Total: 1 |
|
743 | X-Mercurial-Series-Total: 1 | |
744 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
744 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
745 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
745 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
746 | User-Agent: Mercurial-patchbomb/* (glob) |
|
746 | User-Agent: Mercurial-patchbomb/* (glob) | |
747 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
747 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
748 | From: quux |
|
748 | From: quux | |
749 | To: foo |
|
749 | To: foo | |
750 | Cc: bar |
|
750 | Cc: bar | |
751 |
|
751 | |||
752 | c | 1 + |
|
752 | c | 1 + | |
753 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
753 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
754 |
|
754 | |||
755 |
|
755 | |||
756 | # HG changeset patch |
|
756 | # HG changeset patch | |
757 | # User test |
|
757 | # User test | |
758 | # Date 3 0 |
|
758 | # Date 3 0 | |
759 | # Thu Jan 01 00:00:03 1970 +0000 |
|
759 | # Thu Jan 01 00:00:03 1970 +0000 | |
760 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
760 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
761 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
761 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
762 | c |
|
762 | c | |
763 |
|
763 | |||
764 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
764 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
765 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
765 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
766 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
766 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
767 | @@ -0,0 +1,1 @@ |
|
767 | @@ -0,0 +1,1 @@ | |
768 | +c |
|
768 | +c | |
769 |
|
769 | |||
770 |
|
770 | |||
771 | test diffstat for multiple patches: |
|
771 | test diffstat for multiple patches: | |
772 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \ |
|
772 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \ | |
773 | > -r 0:1 |
|
773 | > -r 0:1 | |
774 | this patch series consists of 2 patches. |
|
774 | this patch series consists of 2 patches. | |
775 |
|
775 | |||
776 |
|
776 | |||
777 | Write the introductory message for the patch series. |
|
777 | Write the introductory message for the patch series. | |
778 |
|
778 | |||
779 |
|
779 | |||
780 | Final summary: |
|
780 | Final summary: | |
781 |
|
781 | |||
782 | From: quux |
|
782 | From: quux | |
783 | To: foo |
|
783 | To: foo | |
784 | Cc: bar |
|
784 | Cc: bar | |
785 | Subject: [PATCH 0 of 2] test |
|
785 | Subject: [PATCH 0 of 2] test | |
786 | a | 1 + |
|
786 | a | 1 + | |
787 | b | 1 + |
|
787 | b | 1 + | |
788 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
788 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
789 | Subject: [PATCH 1 of 2] a |
|
789 | Subject: [PATCH 1 of 2] a | |
790 | a | 1 + |
|
790 | a | 1 + | |
791 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
791 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
792 | Subject: [PATCH 2 of 2] b |
|
792 | Subject: [PATCH 2 of 2] b | |
793 | b | 1 + |
|
793 | b | 1 + | |
794 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
794 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
795 |
|
795 | |||
796 | are you sure you want to send (yn)? y |
|
796 | are you sure you want to send (yn)? y | |
797 |
|
797 | |||
798 | displaying [PATCH 0 of 2] test ... |
|
798 | displaying [PATCH 0 of 2] test ... | |
799 | MIME-Version: 1.0 |
|
799 | MIME-Version: 1.0 | |
800 | Content-Type: text/plain; charset="us-ascii" |
|
800 | Content-Type: text/plain; charset="us-ascii" | |
801 | Content-Transfer-Encoding: 7bit |
|
801 | Content-Transfer-Encoding: 7bit | |
802 | Subject: [PATCH 0 of 2] test |
|
802 | Subject: [PATCH 0 of 2] test | |
803 | Message-Id: <patchbomb.60@test-hostname> |
|
803 | Message-Id: <patchbomb.60@test-hostname> | |
804 | User-Agent: Mercurial-patchbomb/* (glob) |
|
804 | User-Agent: Mercurial-patchbomb/* (glob) | |
805 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
805 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
806 | From: quux |
|
806 | From: quux | |
807 | To: foo |
|
807 | To: foo | |
808 | Cc: bar |
|
808 | Cc: bar | |
809 |
|
809 | |||
810 |
|
810 | |||
811 | a | 1 + |
|
811 | a | 1 + | |
812 | b | 1 + |
|
812 | b | 1 + | |
813 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
813 | 2 files changed, 2 insertions(+), 0 deletions(-) | |
814 |
|
814 | |||
815 | displaying [PATCH 1 of 2] a ... |
|
815 | displaying [PATCH 1 of 2] a ... | |
816 | MIME-Version: 1.0 |
|
816 | MIME-Version: 1.0 | |
817 | Content-Type: text/plain; charset="us-ascii" |
|
817 | Content-Type: text/plain; charset="us-ascii" | |
818 | Content-Transfer-Encoding: 7bit |
|
818 | Content-Transfer-Encoding: 7bit | |
819 | Subject: [PATCH 1 of 2] a |
|
819 | Subject: [PATCH 1 of 2] a | |
820 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
820 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
821 | X-Mercurial-Series-Index: 1 |
|
821 | X-Mercurial-Series-Index: 1 | |
822 | X-Mercurial-Series-Total: 2 |
|
822 | X-Mercurial-Series-Total: 2 | |
823 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
823 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
824 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
824 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
825 | In-Reply-To: <patchbomb.60@test-hostname> |
|
825 | In-Reply-To: <patchbomb.60@test-hostname> | |
826 | References: <patchbomb.60@test-hostname> |
|
826 | References: <patchbomb.60@test-hostname> | |
827 | User-Agent: Mercurial-patchbomb/* (glob) |
|
827 | User-Agent: Mercurial-patchbomb/* (glob) | |
828 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
828 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
829 | From: quux |
|
829 | From: quux | |
830 | To: foo |
|
830 | To: foo | |
831 | Cc: bar |
|
831 | Cc: bar | |
832 |
|
832 | |||
833 | a | 1 + |
|
833 | a | 1 + | |
834 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
834 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
835 |
|
835 | |||
836 |
|
836 | |||
837 | # HG changeset patch |
|
837 | # HG changeset patch | |
838 | # User test |
|
838 | # User test | |
839 | # Date 1 0 |
|
839 | # Date 1 0 | |
840 | # Thu Jan 01 00:00:01 1970 +0000 |
|
840 | # Thu Jan 01 00:00:01 1970 +0000 | |
841 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
841 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
842 | # Parent 0000000000000000000000000000000000000000 |
|
842 | # Parent 0000000000000000000000000000000000000000 | |
843 | a |
|
843 | a | |
844 |
|
844 | |||
845 | diff -r 000000000000 -r 8580ff50825a a |
|
845 | diff -r 000000000000 -r 8580ff50825a a | |
846 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
846 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
847 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
847 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
848 | @@ -0,0 +1,1 @@ |
|
848 | @@ -0,0 +1,1 @@ | |
849 | +a |
|
849 | +a | |
850 |
|
850 | |||
851 | displaying [PATCH 2 of 2] b ... |
|
851 | displaying [PATCH 2 of 2] b ... | |
852 | MIME-Version: 1.0 |
|
852 | MIME-Version: 1.0 | |
853 | Content-Type: text/plain; charset="us-ascii" |
|
853 | Content-Type: text/plain; charset="us-ascii" | |
854 | Content-Transfer-Encoding: 7bit |
|
854 | Content-Transfer-Encoding: 7bit | |
855 | Subject: [PATCH 2 of 2] b |
|
855 | Subject: [PATCH 2 of 2] b | |
856 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
856 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
857 | X-Mercurial-Series-Index: 2 |
|
857 | X-Mercurial-Series-Index: 2 | |
858 | X-Mercurial-Series-Total: 2 |
|
858 | X-Mercurial-Series-Total: 2 | |
859 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
859 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
860 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
860 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
861 | In-Reply-To: <patchbomb.60@test-hostname> |
|
861 | In-Reply-To: <patchbomb.60@test-hostname> | |
862 | References: <patchbomb.60@test-hostname> |
|
862 | References: <patchbomb.60@test-hostname> | |
863 | User-Agent: Mercurial-patchbomb/* (glob) |
|
863 | User-Agent: Mercurial-patchbomb/* (glob) | |
864 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
864 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
865 | From: quux |
|
865 | From: quux | |
866 | To: foo |
|
866 | To: foo | |
867 | Cc: bar |
|
867 | Cc: bar | |
868 |
|
868 | |||
869 | b | 1 + |
|
869 | b | 1 + | |
870 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
870 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
871 |
|
871 | |||
872 |
|
872 | |||
873 | # HG changeset patch |
|
873 | # HG changeset patch | |
874 | # User test |
|
874 | # User test | |
875 | # Date 2 0 |
|
875 | # Date 2 0 | |
876 | # Thu Jan 01 00:00:02 1970 +0000 |
|
876 | # Thu Jan 01 00:00:02 1970 +0000 | |
877 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
877 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
878 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
878 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
879 | b |
|
879 | b | |
880 |
|
880 | |||
881 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
881 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
882 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
882 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
883 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
883 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
884 | @@ -0,0 +1,1 @@ |
|
884 | @@ -0,0 +1,1 @@ | |
885 | +b |
|
885 | +b | |
886 |
|
886 | |||
887 |
|
887 | |||
888 | test inline for single patch: |
|
888 | test inline for single patch: | |
889 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | filterboundary |
|
889 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | filterboundary | |
890 | this patch series consists of 1 patches. |
|
890 | this patch series consists of 1 patches. | |
891 |
|
891 | |||
892 |
|
892 | |||
893 | displaying [PATCH] test ... |
|
893 | displaying [PATCH] test ... | |
894 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
894 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
895 | MIME-Version: 1.0 |
|
895 | MIME-Version: 1.0 | |
896 | Subject: [PATCH] test |
|
896 | Subject: [PATCH] test | |
897 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
897 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
898 | X-Mercurial-Series-Index: 1 |
|
898 | X-Mercurial-Series-Index: 1 | |
899 | X-Mercurial-Series-Total: 1 |
|
899 | X-Mercurial-Series-Total: 1 | |
900 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
900 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
901 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
901 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
902 | User-Agent: Mercurial-patchbomb/* (glob) |
|
902 | User-Agent: Mercurial-patchbomb/* (glob) | |
903 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
903 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
904 | From: quux |
|
904 | From: quux | |
905 | To: foo |
|
905 | To: foo | |
906 | Cc: bar |
|
906 | Cc: bar | |
907 |
|
907 | |||
908 | --===*= (glob) |
|
908 | --===*= (glob) | |
909 | MIME-Version: 1.0 |
|
909 | MIME-Version: 1.0 | |
910 | Content-Type: text/x-patch; charset="us-ascii" |
|
910 | Content-Type: text/x-patch; charset="us-ascii" | |
911 | Content-Transfer-Encoding: 7bit |
|
911 | Content-Transfer-Encoding: 7bit | |
912 | Content-Disposition: inline; filename=t2.patch |
|
912 | Content-Disposition: inline; filename=t2.patch | |
913 |
|
913 | |||
914 | # HG changeset patch |
|
914 | # HG changeset patch | |
915 | # User test |
|
915 | # User test | |
916 | # Date 3 0 |
|
916 | # Date 3 0 | |
917 | # Thu Jan 01 00:00:03 1970 +0000 |
|
917 | # Thu Jan 01 00:00:03 1970 +0000 | |
918 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
918 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
919 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
919 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
920 | c |
|
920 | c | |
921 |
|
921 | |||
922 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
922 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
923 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
923 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
924 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
924 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
925 | @@ -0,0 +1,1 @@ |
|
925 | @@ -0,0 +1,1 @@ | |
926 | +c |
|
926 | +c | |
927 |
|
927 | |||
928 | --===*=-- (glob) |
|
928 | --===*=-- (glob) | |
929 |
|
929 | |||
930 |
|
930 | |||
931 | test inline for single patch (quoted-printable): |
|
931 | test inline for single patch (quoted-printable): | |
932 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | filterboundary |
|
932 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | filterboundary | |
933 | this patch series consists of 1 patches. |
|
933 | this patch series consists of 1 patches. | |
934 |
|
934 | |||
935 |
|
935 | |||
936 | displaying [PATCH] test ... |
|
936 | displaying [PATCH] test ... | |
937 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
937 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
938 | MIME-Version: 1.0 |
|
938 | MIME-Version: 1.0 | |
939 | Subject: [PATCH] test |
|
939 | Subject: [PATCH] test | |
940 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
940 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
941 | X-Mercurial-Series-Index: 1 |
|
941 | X-Mercurial-Series-Index: 1 | |
942 | X-Mercurial-Series-Total: 1 |
|
942 | X-Mercurial-Series-Total: 1 | |
943 | Message-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> |
|
943 | Message-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> | |
944 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> |
|
944 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> | |
945 | User-Agent: Mercurial-patchbomb/* (glob) |
|
945 | User-Agent: Mercurial-patchbomb/* (glob) | |
946 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
946 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
947 | From: quux |
|
947 | From: quux | |
948 | To: foo |
|
948 | To: foo | |
949 | Cc: bar |
|
949 | Cc: bar | |
950 |
|
950 | |||
951 | --===*= (glob) |
|
951 | --===*= (glob) | |
952 | MIME-Version: 1.0 |
|
952 | MIME-Version: 1.0 | |
953 | Content-Type: text/x-patch; charset="us-ascii" |
|
953 | Content-Type: text/x-patch; charset="us-ascii" | |
954 | Content-Transfer-Encoding: quoted-printable |
|
954 | Content-Transfer-Encoding: quoted-printable | |
955 | Content-Disposition: inline; filename=t2.patch |
|
955 | Content-Disposition: inline; filename=t2.patch | |
956 |
|
956 | |||
957 | # HG changeset patch |
|
957 | # HG changeset patch | |
958 | # User test |
|
958 | # User test | |
959 | # Date 4 0 |
|
959 | # Date 4 0 | |
960 | # Thu Jan 01 00:00:04 1970 +0000 |
|
960 | # Thu Jan 01 00:00:04 1970 +0000 | |
961 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
961 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
962 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
962 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
963 | long line |
|
963 | long line | |
964 |
|
964 | |||
965 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
965 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
966 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
966 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
967 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
967 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
968 | @@ -0,0 +1,4 @@ |
|
968 | @@ -0,0 +1,4 @@ | |
969 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
969 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
970 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
970 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
971 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
971 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
972 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
972 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
973 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
973 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
974 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
974 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
975 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
975 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
976 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
976 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
977 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
977 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
978 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
978 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
979 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
979 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
980 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
980 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
981 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
981 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
982 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
982 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
983 | +foo |
|
983 | +foo | |
984 | + |
|
984 | + | |
985 | +bar |
|
985 | +bar | |
986 |
|
986 | |||
987 | --===*=-- (glob) |
|
987 | --===*=-- (glob) | |
988 |
|
988 | |||
989 | test inline for multiple patches: |
|
989 | test inline for multiple patches: | |
990 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ |
|
990 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ | |
991 | > -r 0:1 -r 4 | filterboundary |
|
991 | > -r 0:1 -r 4 | filterboundary | |
992 | this patch series consists of 3 patches. |
|
992 | this patch series consists of 3 patches. | |
993 |
|
993 | |||
994 |
|
994 | |||
995 | Write the introductory message for the patch series. |
|
995 | Write the introductory message for the patch series. | |
996 |
|
996 | |||
997 |
|
997 | |||
998 | displaying [PATCH 0 of 3] test ... |
|
998 | displaying [PATCH 0 of 3] test ... | |
999 | MIME-Version: 1.0 |
|
999 | MIME-Version: 1.0 | |
1000 | Content-Type: text/plain; charset="us-ascii" |
|
1000 | Content-Type: text/plain; charset="us-ascii" | |
1001 | Content-Transfer-Encoding: 7bit |
|
1001 | Content-Transfer-Encoding: 7bit | |
1002 | Subject: [PATCH 0 of 3] test |
|
1002 | Subject: [PATCH 0 of 3] test | |
1003 | Message-Id: <patchbomb.60@test-hostname> |
|
1003 | Message-Id: <patchbomb.60@test-hostname> | |
1004 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1004 | User-Agent: Mercurial-patchbomb/* (glob) | |
1005 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1005 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1006 | From: quux |
|
1006 | From: quux | |
1007 | To: foo |
|
1007 | To: foo | |
1008 | Cc: bar |
|
1008 | Cc: bar | |
1009 |
|
1009 | |||
1010 |
|
1010 | |||
1011 | displaying [PATCH 1 of 3] a ... |
|
1011 | displaying [PATCH 1 of 3] a ... | |
1012 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1012 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1013 | MIME-Version: 1.0 |
|
1013 | MIME-Version: 1.0 | |
1014 | Subject: [PATCH 1 of 3] a |
|
1014 | Subject: [PATCH 1 of 3] a | |
1015 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1015 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1016 | X-Mercurial-Series-Index: 1 |
|
1016 | X-Mercurial-Series-Index: 1 | |
1017 | X-Mercurial-Series-Total: 3 |
|
1017 | X-Mercurial-Series-Total: 3 | |
1018 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1018 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1019 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1019 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1020 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1020 | In-Reply-To: <patchbomb.60@test-hostname> | |
1021 | References: <patchbomb.60@test-hostname> |
|
1021 | References: <patchbomb.60@test-hostname> | |
1022 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1022 | User-Agent: Mercurial-patchbomb/* (glob) | |
1023 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
1023 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
1024 | From: quux |
|
1024 | From: quux | |
1025 | To: foo |
|
1025 | To: foo | |
1026 | Cc: bar |
|
1026 | Cc: bar | |
1027 |
|
1027 | |||
1028 | --===*= (glob) |
|
1028 | --===*= (glob) | |
1029 | MIME-Version: 1.0 |
|
1029 | MIME-Version: 1.0 | |
1030 | Content-Type: text/x-patch; charset="us-ascii" |
|
1030 | Content-Type: text/x-patch; charset="us-ascii" | |
1031 | Content-Transfer-Encoding: 7bit |
|
1031 | Content-Transfer-Encoding: 7bit | |
1032 | Content-Disposition: inline; filename=t2-1.patch |
|
1032 | Content-Disposition: inline; filename=t2-1.patch | |
1033 |
|
1033 | |||
1034 | # HG changeset patch |
|
1034 | # HG changeset patch | |
1035 | # User test |
|
1035 | # User test | |
1036 | # Date 1 0 |
|
1036 | # Date 1 0 | |
1037 | # Thu Jan 01 00:00:01 1970 +0000 |
|
1037 | # Thu Jan 01 00:00:01 1970 +0000 | |
1038 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1038 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1039 | # Parent 0000000000000000000000000000000000000000 |
|
1039 | # Parent 0000000000000000000000000000000000000000 | |
1040 | a |
|
1040 | a | |
1041 |
|
1041 | |||
1042 | diff -r 000000000000 -r 8580ff50825a a |
|
1042 | diff -r 000000000000 -r 8580ff50825a a | |
1043 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1043 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1044 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
1044 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
1045 | @@ -0,0 +1,1 @@ |
|
1045 | @@ -0,0 +1,1 @@ | |
1046 | +a |
|
1046 | +a | |
1047 |
|
1047 | |||
1048 | --===*=-- (glob) |
|
1048 | --===*=-- (glob) | |
1049 | displaying [PATCH 2 of 3] b ... |
|
1049 | displaying [PATCH 2 of 3] b ... | |
1050 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1050 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1051 | MIME-Version: 1.0 |
|
1051 | MIME-Version: 1.0 | |
1052 | Subject: [PATCH 2 of 3] b |
|
1052 | Subject: [PATCH 2 of 3] b | |
1053 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1053 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1054 | X-Mercurial-Series-Index: 2 |
|
1054 | X-Mercurial-Series-Index: 2 | |
1055 | X-Mercurial-Series-Total: 3 |
|
1055 | X-Mercurial-Series-Total: 3 | |
1056 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
1056 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
1057 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1057 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1058 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1058 | In-Reply-To: <patchbomb.60@test-hostname> | |
1059 | References: <patchbomb.60@test-hostname> |
|
1059 | References: <patchbomb.60@test-hostname> | |
1060 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1060 | User-Agent: Mercurial-patchbomb/* (glob) | |
1061 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
1061 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
1062 | From: quux |
|
1062 | From: quux | |
1063 | To: foo |
|
1063 | To: foo | |
1064 | Cc: bar |
|
1064 | Cc: bar | |
1065 |
|
1065 | |||
1066 | --===*= (glob) |
|
1066 | --===*= (glob) | |
1067 | MIME-Version: 1.0 |
|
1067 | MIME-Version: 1.0 | |
1068 | Content-Type: text/x-patch; charset="us-ascii" |
|
1068 | Content-Type: text/x-patch; charset="us-ascii" | |
1069 | Content-Transfer-Encoding: 7bit |
|
1069 | Content-Transfer-Encoding: 7bit | |
1070 | Content-Disposition: inline; filename=t2-2.patch |
|
1070 | Content-Disposition: inline; filename=t2-2.patch | |
1071 |
|
1071 | |||
1072 | # HG changeset patch |
|
1072 | # HG changeset patch | |
1073 | # User test |
|
1073 | # User test | |
1074 | # Date 2 0 |
|
1074 | # Date 2 0 | |
1075 | # Thu Jan 01 00:00:02 1970 +0000 |
|
1075 | # Thu Jan 01 00:00:02 1970 +0000 | |
1076 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1076 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1077 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1077 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1078 | b |
|
1078 | b | |
1079 |
|
1079 | |||
1080 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
1080 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
1081 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1081 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1082 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
1082 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
1083 | @@ -0,0 +1,1 @@ |
|
1083 | @@ -0,0 +1,1 @@ | |
1084 | +b |
|
1084 | +b | |
1085 |
|
1085 | |||
1086 | --===*=-- (glob) |
|
1086 | --===*=-- (glob) | |
1087 | displaying [PATCH 3 of 3] long line ... |
|
1087 | displaying [PATCH 3 of 3] long line ... | |
1088 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1088 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1089 | MIME-Version: 1.0 |
|
1089 | MIME-Version: 1.0 | |
1090 | Subject: [PATCH 3 of 3] long line |
|
1090 | Subject: [PATCH 3 of 3] long line | |
1091 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
1091 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
1092 | X-Mercurial-Series-Index: 3 |
|
1092 | X-Mercurial-Series-Index: 3 | |
1093 | X-Mercurial-Series-Total: 3 |
|
1093 | X-Mercurial-Series-Total: 3 | |
1094 | Message-Id: <a2ea8fc83dd8b93cfd86.63@test-hostname> |
|
1094 | Message-Id: <a2ea8fc83dd8b93cfd86.63@test-hostname> | |
1095 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1095 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1096 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1096 | In-Reply-To: <patchbomb.60@test-hostname> | |
1097 | References: <patchbomb.60@test-hostname> |
|
1097 | References: <patchbomb.60@test-hostname> | |
1098 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1098 | User-Agent: Mercurial-patchbomb/* (glob) | |
1099 | Date: Thu, 01 Jan 1970 00:01:03 +0000 |
|
1099 | Date: Thu, 01 Jan 1970 00:01:03 +0000 | |
1100 | From: quux |
|
1100 | From: quux | |
1101 | To: foo |
|
1101 | To: foo | |
1102 | Cc: bar |
|
1102 | Cc: bar | |
1103 |
|
1103 | |||
1104 | --===*= (glob) |
|
1104 | --===*= (glob) | |
1105 | MIME-Version: 1.0 |
|
1105 | MIME-Version: 1.0 | |
1106 | Content-Type: text/x-patch; charset="us-ascii" |
|
1106 | Content-Type: text/x-patch; charset="us-ascii" | |
1107 | Content-Transfer-Encoding: quoted-printable |
|
1107 | Content-Transfer-Encoding: quoted-printable | |
1108 | Content-Disposition: inline; filename=t2-3.patch |
|
1108 | Content-Disposition: inline; filename=t2-3.patch | |
1109 |
|
1109 | |||
1110 | # HG changeset patch |
|
1110 | # HG changeset patch | |
1111 | # User test |
|
1111 | # User test | |
1112 | # Date 4 0 |
|
1112 | # Date 4 0 | |
1113 | # Thu Jan 01 00:00:04 1970 +0000 |
|
1113 | # Thu Jan 01 00:00:04 1970 +0000 | |
1114 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
1114 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
1115 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
1115 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
1116 | long line |
|
1116 | long line | |
1117 |
|
1117 | |||
1118 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
1118 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
1119 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1119 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1120 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
1120 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
1121 | @@ -0,0 +1,4 @@ |
|
1121 | @@ -0,0 +1,4 @@ | |
1122 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1122 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1123 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1123 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1124 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1124 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1125 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1125 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1126 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1126 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1127 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1127 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1128 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1128 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1129 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1129 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1130 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1130 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1131 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1131 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1132 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1132 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1133 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1133 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1134 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1134 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1135 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
1135 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
1136 | +foo |
|
1136 | +foo | |
1137 | + |
|
1137 | + | |
1138 | +bar |
|
1138 | +bar | |
1139 |
|
1139 | |||
1140 | --===*=-- (glob) |
|
1140 | --===*=-- (glob) | |
1141 |
|
1141 | |||
1142 | test attach for single patch: |
|
1142 | test attach for single patch: | |
1143 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | filterboundary |
|
1143 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | filterboundary | |
1144 | this patch series consists of 1 patches. |
|
1144 | this patch series consists of 1 patches. | |
1145 |
|
1145 | |||
1146 |
|
1146 | |||
1147 | displaying [PATCH] test ... |
|
1147 | displaying [PATCH] test ... | |
1148 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1148 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1149 | MIME-Version: 1.0 |
|
1149 | MIME-Version: 1.0 | |
1150 | Subject: [PATCH] test |
|
1150 | Subject: [PATCH] test | |
1151 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1151 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1152 | X-Mercurial-Series-Index: 1 |
|
1152 | X-Mercurial-Series-Index: 1 | |
1153 | X-Mercurial-Series-Total: 1 |
|
1153 | X-Mercurial-Series-Total: 1 | |
1154 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1154 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1155 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1155 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1156 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1156 | User-Agent: Mercurial-patchbomb/* (glob) | |
1157 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1157 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1158 | From: quux |
|
1158 | From: quux | |
1159 | To: foo |
|
1159 | To: foo | |
1160 | Cc: bar |
|
1160 | Cc: bar | |
1161 |
|
1161 | |||
1162 | --===*= (glob) |
|
1162 | --===*= (glob) | |
1163 | MIME-Version: 1.0 |
|
1163 | MIME-Version: 1.0 | |
1164 | Content-Type: text/plain; charset="us-ascii" |
|
1164 | Content-Type: text/plain; charset="us-ascii" | |
1165 | Content-Transfer-Encoding: 7bit |
|
1165 | Content-Transfer-Encoding: 7bit | |
1166 |
|
1166 | |||
1167 | Patch subject is complete summary. |
|
1167 | Patch subject is complete summary. | |
1168 |
|
1168 | |||
1169 |
|
1169 | |||
1170 |
|
1170 | |||
1171 | --===*= (glob) |
|
1171 | --===*= (glob) | |
1172 | MIME-Version: 1.0 |
|
1172 | MIME-Version: 1.0 | |
1173 | Content-Type: text/x-patch; charset="us-ascii" |
|
1173 | Content-Type: text/x-patch; charset="us-ascii" | |
1174 | Content-Transfer-Encoding: 7bit |
|
1174 | Content-Transfer-Encoding: 7bit | |
1175 | Content-Disposition: attachment; filename=t2.patch |
|
1175 | Content-Disposition: attachment; filename=t2.patch | |
1176 |
|
1176 | |||
1177 | # HG changeset patch |
|
1177 | # HG changeset patch | |
1178 | # User test |
|
1178 | # User test | |
1179 | # Date 3 0 |
|
1179 | # Date 3 0 | |
1180 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1180 | # Thu Jan 01 00:00:03 1970 +0000 | |
1181 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1181 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1182 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1182 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1183 | c |
|
1183 | c | |
1184 |
|
1184 | |||
1185 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1185 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1186 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1186 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1187 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1187 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1188 | @@ -0,0 +1,1 @@ |
|
1188 | @@ -0,0 +1,1 @@ | |
1189 | +c |
|
1189 | +c | |
1190 |
|
1190 | |||
1191 | --===*=-- (glob) |
|
1191 | --===*=-- (glob) | |
1192 |
|
1192 | |||
1193 | test attach for single patch (quoted-printable): |
|
1193 | test attach for single patch (quoted-printable): | |
1194 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | filterboundary |
|
1194 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | filterboundary | |
1195 | this patch series consists of 1 patches. |
|
1195 | this patch series consists of 1 patches. | |
1196 |
|
1196 | |||
1197 |
|
1197 | |||
1198 | displaying [PATCH] test ... |
|
1198 | displaying [PATCH] test ... | |
1199 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1199 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1200 | MIME-Version: 1.0 |
|
1200 | MIME-Version: 1.0 | |
1201 | Subject: [PATCH] test |
|
1201 | Subject: [PATCH] test | |
1202 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
1202 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
1203 | X-Mercurial-Series-Index: 1 |
|
1203 | X-Mercurial-Series-Index: 1 | |
1204 | X-Mercurial-Series-Total: 1 |
|
1204 | X-Mercurial-Series-Total: 1 | |
1205 | Message-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> |
|
1205 | Message-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> | |
1206 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> |
|
1206 | X-Mercurial-Series-Id: <a2ea8fc83dd8b93cfd86.60@test-hostname> | |
1207 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1207 | User-Agent: Mercurial-patchbomb/* (glob) | |
1208 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1208 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1209 | From: quux |
|
1209 | From: quux | |
1210 | To: foo |
|
1210 | To: foo | |
1211 | Cc: bar |
|
1211 | Cc: bar | |
1212 |
|
1212 | |||
1213 | --===*= (glob) |
|
1213 | --===*= (glob) | |
1214 | MIME-Version: 1.0 |
|
1214 | MIME-Version: 1.0 | |
1215 | Content-Type: text/plain; charset="us-ascii" |
|
1215 | Content-Type: text/plain; charset="us-ascii" | |
1216 | Content-Transfer-Encoding: 7bit |
|
1216 | Content-Transfer-Encoding: 7bit | |
1217 |
|
1217 | |||
1218 | Patch subject is complete summary. |
|
1218 | Patch subject is complete summary. | |
1219 |
|
1219 | |||
1220 |
|
1220 | |||
1221 |
|
1221 | |||
1222 | --===*= (glob) |
|
1222 | --===*= (glob) | |
1223 | MIME-Version: 1.0 |
|
1223 | MIME-Version: 1.0 | |
1224 | Content-Type: text/x-patch; charset="us-ascii" |
|
1224 | Content-Type: text/x-patch; charset="us-ascii" | |
1225 | Content-Transfer-Encoding: quoted-printable |
|
1225 | Content-Transfer-Encoding: quoted-printable | |
1226 | Content-Disposition: attachment; filename=t2.patch |
|
1226 | Content-Disposition: attachment; filename=t2.patch | |
1227 |
|
1227 | |||
1228 | # HG changeset patch |
|
1228 | # HG changeset patch | |
1229 | # User test |
|
1229 | # User test | |
1230 | # Date 4 0 |
|
1230 | # Date 4 0 | |
1231 | # Thu Jan 01 00:00:04 1970 +0000 |
|
1231 | # Thu Jan 01 00:00:04 1970 +0000 | |
1232 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
1232 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
1233 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
1233 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
1234 | long line |
|
1234 | long line | |
1235 |
|
1235 | |||
1236 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
1236 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
1237 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1237 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1238 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
1238 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
1239 | @@ -0,0 +1,4 @@ |
|
1239 | @@ -0,0 +1,4 @@ | |
1240 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1240 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1241 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1241 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1242 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1242 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1243 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1243 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1244 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1244 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1245 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1245 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1246 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1246 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1247 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1247 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1248 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1248 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1249 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1249 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1250 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1250 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1251 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1251 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1252 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1252 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1253 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
1253 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
1254 | +foo |
|
1254 | +foo | |
1255 | + |
|
1255 | + | |
1256 | +bar |
|
1256 | +bar | |
1257 |
|
1257 | |||
1258 | --===*=-- (glob) |
|
1258 | --===*=-- (glob) | |
1259 |
|
1259 | |||
1260 | test attach and body for single patch: |
|
1260 | test attach and body for single patch: | |
1261 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2 | filterboundary |
|
1261 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2 | filterboundary | |
1262 | this patch series consists of 1 patches. |
|
1262 | this patch series consists of 1 patches. | |
1263 |
|
1263 | |||
1264 |
|
1264 | |||
1265 | displaying [PATCH] test ... |
|
1265 | displaying [PATCH] test ... | |
1266 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1266 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1267 | MIME-Version: 1.0 |
|
1267 | MIME-Version: 1.0 | |
1268 | Subject: [PATCH] test |
|
1268 | Subject: [PATCH] test | |
1269 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1269 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1270 | X-Mercurial-Series-Index: 1 |
|
1270 | X-Mercurial-Series-Index: 1 | |
1271 | X-Mercurial-Series-Total: 1 |
|
1271 | X-Mercurial-Series-Total: 1 | |
1272 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1272 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1273 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1273 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1274 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1274 | User-Agent: Mercurial-patchbomb/* (glob) | |
1275 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1275 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1276 | From: quux |
|
1276 | From: quux | |
1277 | To: foo |
|
1277 | To: foo | |
1278 | Cc: bar |
|
1278 | Cc: bar | |
1279 |
|
1279 | |||
1280 | --===*= (glob) |
|
1280 | --===*= (glob) | |
1281 | MIME-Version: 1.0 |
|
1281 | MIME-Version: 1.0 | |
1282 | Content-Type: text/plain; charset="us-ascii" |
|
1282 | Content-Type: text/plain; charset="us-ascii" | |
1283 | Content-Transfer-Encoding: 7bit |
|
1283 | Content-Transfer-Encoding: 7bit | |
1284 |
|
1284 | |||
1285 | # HG changeset patch |
|
1285 | # HG changeset patch | |
1286 | # User test |
|
1286 | # User test | |
1287 | # Date 3 0 |
|
1287 | # Date 3 0 | |
1288 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1288 | # Thu Jan 01 00:00:03 1970 +0000 | |
1289 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1289 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1290 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1290 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1291 | c |
|
1291 | c | |
1292 |
|
1292 | |||
1293 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1293 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1294 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1294 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1295 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1295 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1296 | @@ -0,0 +1,1 @@ |
|
1296 | @@ -0,0 +1,1 @@ | |
1297 | +c |
|
1297 | +c | |
1298 |
|
1298 | |||
1299 | --===*= (glob) |
|
1299 | --===*= (glob) | |
1300 | MIME-Version: 1.0 |
|
1300 | MIME-Version: 1.0 | |
1301 | Content-Type: text/x-patch; charset="us-ascii" |
|
1301 | Content-Type: text/x-patch; charset="us-ascii" | |
1302 | Content-Transfer-Encoding: 7bit |
|
1302 | Content-Transfer-Encoding: 7bit | |
1303 | Content-Disposition: attachment; filename=t2.patch |
|
1303 | Content-Disposition: attachment; filename=t2.patch | |
1304 |
|
1304 | |||
1305 | # HG changeset patch |
|
1305 | # HG changeset patch | |
1306 | # User test |
|
1306 | # User test | |
1307 | # Date 3 0 |
|
1307 | # Date 3 0 | |
1308 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1308 | # Thu Jan 01 00:00:03 1970 +0000 | |
1309 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1309 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1310 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1310 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1311 | c |
|
1311 | c | |
1312 |
|
1312 | |||
1313 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1313 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1314 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1314 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1315 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1315 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1316 | @@ -0,0 +1,1 @@ |
|
1316 | @@ -0,0 +1,1 @@ | |
1317 | +c |
|
1317 | +c | |
1318 |
|
1318 | |||
1319 | --===*=-- (glob) |
|
1319 | --===*=-- (glob) | |
1320 |
|
1320 | |||
1321 | test attach for multiple patches: |
|
1321 | test attach for multiple patches: | |
1322 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \ |
|
1322 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \ | |
1323 | > -r 0:1 -r 4 | filterboundary |
|
1323 | > -r 0:1 -r 4 | filterboundary | |
1324 | this patch series consists of 3 patches. |
|
1324 | this patch series consists of 3 patches. | |
1325 |
|
1325 | |||
1326 |
|
1326 | |||
1327 | Write the introductory message for the patch series. |
|
1327 | Write the introductory message for the patch series. | |
1328 |
|
1328 | |||
1329 |
|
1329 | |||
1330 | displaying [PATCH 0 of 3] test ... |
|
1330 | displaying [PATCH 0 of 3] test ... | |
1331 | MIME-Version: 1.0 |
|
1331 | MIME-Version: 1.0 | |
1332 | Content-Type: text/plain; charset="us-ascii" |
|
1332 | Content-Type: text/plain; charset="us-ascii" | |
1333 | Content-Transfer-Encoding: 7bit |
|
1333 | Content-Transfer-Encoding: 7bit | |
1334 | Subject: [PATCH 0 of 3] test |
|
1334 | Subject: [PATCH 0 of 3] test | |
1335 | Message-Id: <patchbomb.60@test-hostname> |
|
1335 | Message-Id: <patchbomb.60@test-hostname> | |
1336 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1336 | User-Agent: Mercurial-patchbomb/* (glob) | |
1337 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1337 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1338 | From: quux |
|
1338 | From: quux | |
1339 | To: foo |
|
1339 | To: foo | |
1340 | Cc: bar |
|
1340 | Cc: bar | |
1341 |
|
1341 | |||
1342 |
|
1342 | |||
1343 | displaying [PATCH 1 of 3] a ... |
|
1343 | displaying [PATCH 1 of 3] a ... | |
1344 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1344 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1345 | MIME-Version: 1.0 |
|
1345 | MIME-Version: 1.0 | |
1346 | Subject: [PATCH 1 of 3] a |
|
1346 | Subject: [PATCH 1 of 3] a | |
1347 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1347 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1348 | X-Mercurial-Series-Index: 1 |
|
1348 | X-Mercurial-Series-Index: 1 | |
1349 | X-Mercurial-Series-Total: 3 |
|
1349 | X-Mercurial-Series-Total: 3 | |
1350 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1350 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1351 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1351 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1352 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1352 | In-Reply-To: <patchbomb.60@test-hostname> | |
1353 | References: <patchbomb.60@test-hostname> |
|
1353 | References: <patchbomb.60@test-hostname> | |
1354 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1354 | User-Agent: Mercurial-patchbomb/* (glob) | |
1355 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
1355 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
1356 | From: quux |
|
1356 | From: quux | |
1357 | To: foo |
|
1357 | To: foo | |
1358 | Cc: bar |
|
1358 | Cc: bar | |
1359 |
|
1359 | |||
1360 | --===*= (glob) |
|
1360 | --===*= (glob) | |
1361 | MIME-Version: 1.0 |
|
1361 | MIME-Version: 1.0 | |
1362 | Content-Type: text/plain; charset="us-ascii" |
|
1362 | Content-Type: text/plain; charset="us-ascii" | |
1363 | Content-Transfer-Encoding: 7bit |
|
1363 | Content-Transfer-Encoding: 7bit | |
1364 |
|
1364 | |||
1365 | Patch subject is complete summary. |
|
1365 | Patch subject is complete summary. | |
1366 |
|
1366 | |||
1367 |
|
1367 | |||
1368 |
|
1368 | |||
1369 | --===*= (glob) |
|
1369 | --===*= (glob) | |
1370 | MIME-Version: 1.0 |
|
1370 | MIME-Version: 1.0 | |
1371 | Content-Type: text/x-patch; charset="us-ascii" |
|
1371 | Content-Type: text/x-patch; charset="us-ascii" | |
1372 | Content-Transfer-Encoding: 7bit |
|
1372 | Content-Transfer-Encoding: 7bit | |
1373 | Content-Disposition: attachment; filename=t2-1.patch |
|
1373 | Content-Disposition: attachment; filename=t2-1.patch | |
1374 |
|
1374 | |||
1375 | # HG changeset patch |
|
1375 | # HG changeset patch | |
1376 | # User test |
|
1376 | # User test | |
1377 | # Date 1 0 |
|
1377 | # Date 1 0 | |
1378 | # Thu Jan 01 00:00:01 1970 +0000 |
|
1378 | # Thu Jan 01 00:00:01 1970 +0000 | |
1379 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1379 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1380 | # Parent 0000000000000000000000000000000000000000 |
|
1380 | # Parent 0000000000000000000000000000000000000000 | |
1381 | a |
|
1381 | a | |
1382 |
|
1382 | |||
1383 | diff -r 000000000000 -r 8580ff50825a a |
|
1383 | diff -r 000000000000 -r 8580ff50825a a | |
1384 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1384 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1385 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
1385 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
1386 | @@ -0,0 +1,1 @@ |
|
1386 | @@ -0,0 +1,1 @@ | |
1387 | +a |
|
1387 | +a | |
1388 |
|
1388 | |||
1389 | --===*=-- (glob) |
|
1389 | --===*=-- (glob) | |
1390 | displaying [PATCH 2 of 3] b ... |
|
1390 | displaying [PATCH 2 of 3] b ... | |
1391 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1391 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1392 | MIME-Version: 1.0 |
|
1392 | MIME-Version: 1.0 | |
1393 | Subject: [PATCH 2 of 3] b |
|
1393 | Subject: [PATCH 2 of 3] b | |
1394 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1394 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1395 | X-Mercurial-Series-Index: 2 |
|
1395 | X-Mercurial-Series-Index: 2 | |
1396 | X-Mercurial-Series-Total: 3 |
|
1396 | X-Mercurial-Series-Total: 3 | |
1397 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
1397 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
1398 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1398 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1399 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1399 | In-Reply-To: <patchbomb.60@test-hostname> | |
1400 | References: <patchbomb.60@test-hostname> |
|
1400 | References: <patchbomb.60@test-hostname> | |
1401 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1401 | User-Agent: Mercurial-patchbomb/* (glob) | |
1402 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
1402 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
1403 | From: quux |
|
1403 | From: quux | |
1404 | To: foo |
|
1404 | To: foo | |
1405 | Cc: bar |
|
1405 | Cc: bar | |
1406 |
|
1406 | |||
1407 | --===*= (glob) |
|
1407 | --===*= (glob) | |
1408 | MIME-Version: 1.0 |
|
1408 | MIME-Version: 1.0 | |
1409 | Content-Type: text/plain; charset="us-ascii" |
|
1409 | Content-Type: text/plain; charset="us-ascii" | |
1410 | Content-Transfer-Encoding: 7bit |
|
1410 | Content-Transfer-Encoding: 7bit | |
1411 |
|
1411 | |||
1412 | Patch subject is complete summary. |
|
1412 | Patch subject is complete summary. | |
1413 |
|
1413 | |||
1414 |
|
1414 | |||
1415 |
|
1415 | |||
1416 | --===*= (glob) |
|
1416 | --===*= (glob) | |
1417 | MIME-Version: 1.0 |
|
1417 | MIME-Version: 1.0 | |
1418 | Content-Type: text/x-patch; charset="us-ascii" |
|
1418 | Content-Type: text/x-patch; charset="us-ascii" | |
1419 | Content-Transfer-Encoding: 7bit |
|
1419 | Content-Transfer-Encoding: 7bit | |
1420 | Content-Disposition: attachment; filename=t2-2.patch |
|
1420 | Content-Disposition: attachment; filename=t2-2.patch | |
1421 |
|
1421 | |||
1422 | # HG changeset patch |
|
1422 | # HG changeset patch | |
1423 | # User test |
|
1423 | # User test | |
1424 | # Date 2 0 |
|
1424 | # Date 2 0 | |
1425 | # Thu Jan 01 00:00:02 1970 +0000 |
|
1425 | # Thu Jan 01 00:00:02 1970 +0000 | |
1426 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1426 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1427 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1427 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1428 | b |
|
1428 | b | |
1429 |
|
1429 | |||
1430 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
1430 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
1431 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1431 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1432 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
1432 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
1433 | @@ -0,0 +1,1 @@ |
|
1433 | @@ -0,0 +1,1 @@ | |
1434 | +b |
|
1434 | +b | |
1435 |
|
1435 | |||
1436 | --===*=-- (glob) |
|
1436 | --===*=-- (glob) | |
1437 | displaying [PATCH 3 of 3] long line ... |
|
1437 | displaying [PATCH 3 of 3] long line ... | |
1438 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1438 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1439 | MIME-Version: 1.0 |
|
1439 | MIME-Version: 1.0 | |
1440 | Subject: [PATCH 3 of 3] long line |
|
1440 | Subject: [PATCH 3 of 3] long line | |
1441 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
1441 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
1442 | X-Mercurial-Series-Index: 3 |
|
1442 | X-Mercurial-Series-Index: 3 | |
1443 | X-Mercurial-Series-Total: 3 |
|
1443 | X-Mercurial-Series-Total: 3 | |
1444 | Message-Id: <a2ea8fc83dd8b93cfd86.63@test-hostname> |
|
1444 | Message-Id: <a2ea8fc83dd8b93cfd86.63@test-hostname> | |
1445 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1445 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1446 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1446 | In-Reply-To: <patchbomb.60@test-hostname> | |
1447 | References: <patchbomb.60@test-hostname> |
|
1447 | References: <patchbomb.60@test-hostname> | |
1448 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1448 | User-Agent: Mercurial-patchbomb/* (glob) | |
1449 | Date: Thu, 01 Jan 1970 00:01:03 +0000 |
|
1449 | Date: Thu, 01 Jan 1970 00:01:03 +0000 | |
1450 | From: quux |
|
1450 | From: quux | |
1451 | To: foo |
|
1451 | To: foo | |
1452 | Cc: bar |
|
1452 | Cc: bar | |
1453 |
|
1453 | |||
1454 | --===*= (glob) |
|
1454 | --===*= (glob) | |
1455 | MIME-Version: 1.0 |
|
1455 | MIME-Version: 1.0 | |
1456 | Content-Type: text/plain; charset="us-ascii" |
|
1456 | Content-Type: text/plain; charset="us-ascii" | |
1457 | Content-Transfer-Encoding: 7bit |
|
1457 | Content-Transfer-Encoding: 7bit | |
1458 |
|
1458 | |||
1459 | Patch subject is complete summary. |
|
1459 | Patch subject is complete summary. | |
1460 |
|
1460 | |||
1461 |
|
1461 | |||
1462 |
|
1462 | |||
1463 | --===*= (glob) |
|
1463 | --===*= (glob) | |
1464 | MIME-Version: 1.0 |
|
1464 | MIME-Version: 1.0 | |
1465 | Content-Type: text/x-patch; charset="us-ascii" |
|
1465 | Content-Type: text/x-patch; charset="us-ascii" | |
1466 | Content-Transfer-Encoding: quoted-printable |
|
1466 | Content-Transfer-Encoding: quoted-printable | |
1467 | Content-Disposition: attachment; filename=t2-3.patch |
|
1467 | Content-Disposition: attachment; filename=t2-3.patch | |
1468 |
|
1468 | |||
1469 | # HG changeset patch |
|
1469 | # HG changeset patch | |
1470 | # User test |
|
1470 | # User test | |
1471 | # Date 4 0 |
|
1471 | # Date 4 0 | |
1472 | # Thu Jan 01 00:00:04 1970 +0000 |
|
1472 | # Thu Jan 01 00:00:04 1970 +0000 | |
1473 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
1473 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
1474 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
1474 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
1475 | long line |
|
1475 | long line | |
1476 |
|
1476 | |||
1477 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
1477 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
1478 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1478 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1479 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
1479 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
1480 | @@ -0,0 +1,4 @@ |
|
1480 | @@ -0,0 +1,4 @@ | |
1481 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1481 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1482 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1482 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1483 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1483 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1484 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1484 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1485 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1485 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1486 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1486 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1487 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1487 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1488 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1488 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1489 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1489 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1490 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1490 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1491 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1491 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1492 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1492 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1493 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
1493 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
1494 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
1494 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
1495 | +foo |
|
1495 | +foo | |
1496 | + |
|
1496 | + | |
1497 | +bar |
|
1497 | +bar | |
1498 |
|
1498 | |||
1499 | --===*=-- (glob) |
|
1499 | --===*=-- (glob) | |
1500 |
|
1500 | |||
1501 | test intro for single patch: |
|
1501 | test intro for single patch: | |
1502 | $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ |
|
1502 | $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ | |
1503 | > -r 2 |
|
1503 | > -r 2 | |
1504 | this patch series consists of 1 patches. |
|
1504 | this patch series consists of 1 patches. | |
1505 |
|
1505 | |||
1506 |
|
1506 | |||
1507 | Write the introductory message for the patch series. |
|
1507 | Write the introductory message for the patch series. | |
1508 |
|
1508 | |||
1509 |
|
1509 | |||
1510 | displaying [PATCH 0 of 1] test ... |
|
1510 | displaying [PATCH 0 of 1] test ... | |
1511 | MIME-Version: 1.0 |
|
1511 | MIME-Version: 1.0 | |
1512 | Content-Type: text/plain; charset="us-ascii" |
|
1512 | Content-Type: text/plain; charset="us-ascii" | |
1513 | Content-Transfer-Encoding: 7bit |
|
1513 | Content-Transfer-Encoding: 7bit | |
1514 | Subject: [PATCH 0 of 1] test |
|
1514 | Subject: [PATCH 0 of 1] test | |
1515 | Message-Id: <patchbomb.60@test-hostname> |
|
1515 | Message-Id: <patchbomb.60@test-hostname> | |
1516 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1516 | User-Agent: Mercurial-patchbomb/* (glob) | |
1517 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1517 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1518 | From: quux |
|
1518 | From: quux | |
1519 | To: foo |
|
1519 | To: foo | |
1520 | Cc: bar |
|
1520 | Cc: bar | |
1521 |
|
1521 | |||
1522 |
|
1522 | |||
1523 | displaying [PATCH 1 of 1] c ... |
|
1523 | displaying [PATCH 1 of 1] c ... | |
1524 | MIME-Version: 1.0 |
|
1524 | MIME-Version: 1.0 | |
1525 | Content-Type: text/plain; charset="us-ascii" |
|
1525 | Content-Type: text/plain; charset="us-ascii" | |
1526 | Content-Transfer-Encoding: 7bit |
|
1526 | Content-Transfer-Encoding: 7bit | |
1527 | Subject: [PATCH 1 of 1] c |
|
1527 | Subject: [PATCH 1 of 1] c | |
1528 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1528 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1529 | X-Mercurial-Series-Index: 1 |
|
1529 | X-Mercurial-Series-Index: 1 | |
1530 | X-Mercurial-Series-Total: 1 |
|
1530 | X-Mercurial-Series-Total: 1 | |
1531 | Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> |
|
1531 | Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> | |
1532 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> |
|
1532 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> | |
1533 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1533 | In-Reply-To: <patchbomb.60@test-hostname> | |
1534 | References: <patchbomb.60@test-hostname> |
|
1534 | References: <patchbomb.60@test-hostname> | |
1535 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1535 | User-Agent: Mercurial-patchbomb/* (glob) | |
1536 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
1536 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
1537 | From: quux |
|
1537 | From: quux | |
1538 | To: foo |
|
1538 | To: foo | |
1539 | Cc: bar |
|
1539 | Cc: bar | |
1540 |
|
1540 | |||
1541 | # HG changeset patch |
|
1541 | # HG changeset patch | |
1542 | # User test |
|
1542 | # User test | |
1543 | # Date 3 0 |
|
1543 | # Date 3 0 | |
1544 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1544 | # Thu Jan 01 00:00:03 1970 +0000 | |
1545 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1545 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1546 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1546 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1547 | c |
|
1547 | c | |
1548 |
|
1548 | |||
1549 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1549 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1550 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1550 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1551 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1551 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1552 | @@ -0,0 +1,1 @@ |
|
1552 | @@ -0,0 +1,1 @@ | |
1553 | +c |
|
1553 | +c | |
1554 |
|
1554 | |||
1555 |
|
1555 | |||
1556 | test --desc without --intro for a single patch: |
|
1556 | test --desc without --intro for a single patch: | |
1557 | $ echo foo > intro.text |
|
1557 | $ echo foo > intro.text | |
1558 | $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \ |
|
1558 | $ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \ | |
1559 | > -s test -r 2 |
|
1559 | > -s test -r 2 | |
1560 | this patch series consists of 1 patches. |
|
1560 | this patch series consists of 1 patches. | |
1561 |
|
1561 | |||
1562 |
|
1562 | |||
1563 | displaying [PATCH 0 of 1] test ... |
|
1563 | displaying [PATCH 0 of 1] test ... | |
1564 | MIME-Version: 1.0 |
|
1564 | MIME-Version: 1.0 | |
1565 | Content-Type: text/plain; charset="us-ascii" |
|
1565 | Content-Type: text/plain; charset="us-ascii" | |
1566 | Content-Transfer-Encoding: 7bit |
|
1566 | Content-Transfer-Encoding: 7bit | |
1567 | Subject: [PATCH 0 of 1] test |
|
1567 | Subject: [PATCH 0 of 1] test | |
1568 | Message-Id: <patchbomb.60@test-hostname> |
|
1568 | Message-Id: <patchbomb.60@test-hostname> | |
1569 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1569 | User-Agent: Mercurial-patchbomb/* (glob) | |
1570 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1570 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1571 | From: quux |
|
1571 | From: quux | |
1572 | To: foo |
|
1572 | To: foo | |
1573 | Cc: bar |
|
1573 | Cc: bar | |
1574 |
|
1574 | |||
1575 | foo |
|
1575 | foo | |
1576 |
|
1576 | |||
1577 | displaying [PATCH 1 of 1] c ... |
|
1577 | displaying [PATCH 1 of 1] c ... | |
1578 | MIME-Version: 1.0 |
|
1578 | MIME-Version: 1.0 | |
1579 | Content-Type: text/plain; charset="us-ascii" |
|
1579 | Content-Type: text/plain; charset="us-ascii" | |
1580 | Content-Transfer-Encoding: 7bit |
|
1580 | Content-Transfer-Encoding: 7bit | |
1581 | Subject: [PATCH 1 of 1] c |
|
1581 | Subject: [PATCH 1 of 1] c | |
1582 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1582 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1583 | X-Mercurial-Series-Index: 1 |
|
1583 | X-Mercurial-Series-Index: 1 | |
1584 | X-Mercurial-Series-Total: 1 |
|
1584 | X-Mercurial-Series-Total: 1 | |
1585 | Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> |
|
1585 | Message-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> | |
1586 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> |
|
1586 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.61@test-hostname> | |
1587 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1587 | In-Reply-To: <patchbomb.60@test-hostname> | |
1588 | References: <patchbomb.60@test-hostname> |
|
1588 | References: <patchbomb.60@test-hostname> | |
1589 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1589 | User-Agent: Mercurial-patchbomb/* (glob) | |
1590 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
1590 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
1591 | From: quux |
|
1591 | From: quux | |
1592 | To: foo |
|
1592 | To: foo | |
1593 | Cc: bar |
|
1593 | Cc: bar | |
1594 |
|
1594 | |||
1595 | # HG changeset patch |
|
1595 | # HG changeset patch | |
1596 | # User test |
|
1596 | # User test | |
1597 | # Date 3 0 |
|
1597 | # Date 3 0 | |
1598 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1598 | # Thu Jan 01 00:00:03 1970 +0000 | |
1599 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1599 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1600 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1600 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1601 | c |
|
1601 | c | |
1602 |
|
1602 | |||
1603 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1603 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1604 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1604 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1605 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1605 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1606 | @@ -0,0 +1,1 @@ |
|
1606 | @@ -0,0 +1,1 @@ | |
1607 | +c |
|
1607 | +c | |
1608 |
|
1608 | |||
1609 |
|
1609 | |||
1610 | test intro for multiple patches: |
|
1610 | test intro for multiple patches: | |
1611 | $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ |
|
1611 | $ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \ | |
1612 | > -r 0:1 |
|
1612 | > -r 0:1 | |
1613 | this patch series consists of 2 patches. |
|
1613 | this patch series consists of 2 patches. | |
1614 |
|
1614 | |||
1615 |
|
1615 | |||
1616 | Write the introductory message for the patch series. |
|
1616 | Write the introductory message for the patch series. | |
1617 |
|
1617 | |||
1618 |
|
1618 | |||
1619 | displaying [PATCH 0 of 2] test ... |
|
1619 | displaying [PATCH 0 of 2] test ... | |
1620 | MIME-Version: 1.0 |
|
1620 | MIME-Version: 1.0 | |
1621 | Content-Type: text/plain; charset="us-ascii" |
|
1621 | Content-Type: text/plain; charset="us-ascii" | |
1622 | Content-Transfer-Encoding: 7bit |
|
1622 | Content-Transfer-Encoding: 7bit | |
1623 | Subject: [PATCH 0 of 2] test |
|
1623 | Subject: [PATCH 0 of 2] test | |
1624 | Message-Id: <patchbomb.60@test-hostname> |
|
1624 | Message-Id: <patchbomb.60@test-hostname> | |
1625 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1625 | User-Agent: Mercurial-patchbomb/* (glob) | |
1626 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1626 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1627 | From: quux |
|
1627 | From: quux | |
1628 | To: foo |
|
1628 | To: foo | |
1629 | Cc: bar |
|
1629 | Cc: bar | |
1630 |
|
1630 | |||
1631 |
|
1631 | |||
1632 | displaying [PATCH 1 of 2] a ... |
|
1632 | displaying [PATCH 1 of 2] a ... | |
1633 | MIME-Version: 1.0 |
|
1633 | MIME-Version: 1.0 | |
1634 | Content-Type: text/plain; charset="us-ascii" |
|
1634 | Content-Type: text/plain; charset="us-ascii" | |
1635 | Content-Transfer-Encoding: 7bit |
|
1635 | Content-Transfer-Encoding: 7bit | |
1636 | Subject: [PATCH 1 of 2] a |
|
1636 | Subject: [PATCH 1 of 2] a | |
1637 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1637 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1638 | X-Mercurial-Series-Index: 1 |
|
1638 | X-Mercurial-Series-Index: 1 | |
1639 | X-Mercurial-Series-Total: 2 |
|
1639 | X-Mercurial-Series-Total: 2 | |
1640 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1640 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1641 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1641 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1642 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1642 | In-Reply-To: <patchbomb.60@test-hostname> | |
1643 | References: <patchbomb.60@test-hostname> |
|
1643 | References: <patchbomb.60@test-hostname> | |
1644 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1644 | User-Agent: Mercurial-patchbomb/* (glob) | |
1645 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
1645 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
1646 | From: quux |
|
1646 | From: quux | |
1647 | To: foo |
|
1647 | To: foo | |
1648 | Cc: bar |
|
1648 | Cc: bar | |
1649 |
|
1649 | |||
1650 | # HG changeset patch |
|
1650 | # HG changeset patch | |
1651 | # User test |
|
1651 | # User test | |
1652 | # Date 1 0 |
|
1652 | # Date 1 0 | |
1653 | # Thu Jan 01 00:00:01 1970 +0000 |
|
1653 | # Thu Jan 01 00:00:01 1970 +0000 | |
1654 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1654 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1655 | # Parent 0000000000000000000000000000000000000000 |
|
1655 | # Parent 0000000000000000000000000000000000000000 | |
1656 | a |
|
1656 | a | |
1657 |
|
1657 | |||
1658 | diff -r 000000000000 -r 8580ff50825a a |
|
1658 | diff -r 000000000000 -r 8580ff50825a a | |
1659 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1659 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1660 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
1660 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
1661 | @@ -0,0 +1,1 @@ |
|
1661 | @@ -0,0 +1,1 @@ | |
1662 | +a |
|
1662 | +a | |
1663 |
|
1663 | |||
1664 | displaying [PATCH 2 of 2] b ... |
|
1664 | displaying [PATCH 2 of 2] b ... | |
1665 | MIME-Version: 1.0 |
|
1665 | MIME-Version: 1.0 | |
1666 | Content-Type: text/plain; charset="us-ascii" |
|
1666 | Content-Type: text/plain; charset="us-ascii" | |
1667 | Content-Transfer-Encoding: 7bit |
|
1667 | Content-Transfer-Encoding: 7bit | |
1668 | Subject: [PATCH 2 of 2] b |
|
1668 | Subject: [PATCH 2 of 2] b | |
1669 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1669 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1670 | X-Mercurial-Series-Index: 2 |
|
1670 | X-Mercurial-Series-Index: 2 | |
1671 | X-Mercurial-Series-Total: 2 |
|
1671 | X-Mercurial-Series-Total: 2 | |
1672 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
1672 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
1673 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1673 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1674 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1674 | In-Reply-To: <patchbomb.60@test-hostname> | |
1675 | References: <patchbomb.60@test-hostname> |
|
1675 | References: <patchbomb.60@test-hostname> | |
1676 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1676 | User-Agent: Mercurial-patchbomb/* (glob) | |
1677 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
1677 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
1678 | From: quux |
|
1678 | From: quux | |
1679 | To: foo |
|
1679 | To: foo | |
1680 | Cc: bar |
|
1680 | Cc: bar | |
1681 |
|
1681 | |||
1682 | # HG changeset patch |
|
1682 | # HG changeset patch | |
1683 | # User test |
|
1683 | # User test | |
1684 | # Date 2 0 |
|
1684 | # Date 2 0 | |
1685 | # Thu Jan 01 00:00:02 1970 +0000 |
|
1685 | # Thu Jan 01 00:00:02 1970 +0000 | |
1686 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1686 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1687 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1687 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1688 | b |
|
1688 | b | |
1689 |
|
1689 | |||
1690 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
1690 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
1691 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1691 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1692 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
1692 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
1693 | @@ -0,0 +1,1 @@ |
|
1693 | @@ -0,0 +1,1 @@ | |
1694 | +b |
|
1694 | +b | |
1695 |
|
1695 | |||
1696 |
|
1696 | |||
1697 | test reply-to via config: |
|
1697 | test reply-to via config: | |
1698 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ |
|
1698 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ | |
1699 | > --config patchbomb.reply-to='baz@example.com' |
|
1699 | > --config patchbomb.reply-to='baz@example.com' | |
1700 | this patch series consists of 1 patches. |
|
1700 | this patch series consists of 1 patches. | |
1701 |
|
1701 | |||
1702 |
|
1702 | |||
1703 | displaying [PATCH] test ... |
|
1703 | displaying [PATCH] test ... | |
1704 | MIME-Version: 1.0 |
|
1704 | MIME-Version: 1.0 | |
1705 | Content-Type: text/plain; charset="us-ascii" |
|
1705 | Content-Type: text/plain; charset="us-ascii" | |
1706 | Content-Transfer-Encoding: 7bit |
|
1706 | Content-Transfer-Encoding: 7bit | |
1707 | Subject: [PATCH] test |
|
1707 | Subject: [PATCH] test | |
1708 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1708 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1709 | X-Mercurial-Series-Index: 1 |
|
1709 | X-Mercurial-Series-Index: 1 | |
1710 | X-Mercurial-Series-Total: 1 |
|
1710 | X-Mercurial-Series-Total: 1 | |
1711 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1711 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1712 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1712 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1713 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1713 | User-Agent: Mercurial-patchbomb/* (glob) | |
1714 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1714 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1715 | From: quux |
|
1715 | From: quux | |
1716 | To: foo |
|
1716 | To: foo | |
1717 | Cc: bar |
|
1717 | Cc: bar | |
1718 | Reply-To: baz@example.com |
|
1718 | Reply-To: baz@example.com | |
1719 |
|
1719 | |||
1720 | # HG changeset patch |
|
1720 | # HG changeset patch | |
1721 | # User test |
|
1721 | # User test | |
1722 | # Date 3 0 |
|
1722 | # Date 3 0 | |
1723 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1723 | # Thu Jan 01 00:00:03 1970 +0000 | |
1724 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1724 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1725 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1725 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1726 | c |
|
1726 | c | |
1727 |
|
1727 | |||
1728 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1728 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1729 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1729 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1730 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1730 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1731 | @@ -0,0 +1,1 @@ |
|
1731 | @@ -0,0 +1,1 @@ | |
1732 | +c |
|
1732 | +c | |
1733 |
|
1733 | |||
1734 |
|
1734 | |||
1735 | test reply-to via command line: |
|
1735 | test reply-to via command line: | |
1736 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ |
|
1736 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \ | |
1737 | > --reply-to baz --reply-to fred |
|
1737 | > --reply-to baz --reply-to fred | |
1738 | this patch series consists of 1 patches. |
|
1738 | this patch series consists of 1 patches. | |
1739 |
|
1739 | |||
1740 |
|
1740 | |||
1741 | displaying [PATCH] test ... |
|
1741 | displaying [PATCH] test ... | |
1742 | MIME-Version: 1.0 |
|
1742 | MIME-Version: 1.0 | |
1743 | Content-Type: text/plain; charset="us-ascii" |
|
1743 | Content-Type: text/plain; charset="us-ascii" | |
1744 | Content-Transfer-Encoding: 7bit |
|
1744 | Content-Transfer-Encoding: 7bit | |
1745 | Subject: [PATCH] test |
|
1745 | Subject: [PATCH] test | |
1746 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1746 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1747 | X-Mercurial-Series-Index: 1 |
|
1747 | X-Mercurial-Series-Index: 1 | |
1748 | X-Mercurial-Series-Total: 1 |
|
1748 | X-Mercurial-Series-Total: 1 | |
1749 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1749 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1750 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1750 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1751 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1751 | User-Agent: Mercurial-patchbomb/* (glob) | |
1752 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1752 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1753 | From: quux |
|
1753 | From: quux | |
1754 | To: foo |
|
1754 | To: foo | |
1755 | Cc: bar |
|
1755 | Cc: bar | |
1756 | Reply-To: baz, fred |
|
1756 | Reply-To: baz, fred | |
1757 |
|
1757 | |||
1758 | # HG changeset patch |
|
1758 | # HG changeset patch | |
1759 | # User test |
|
1759 | # User test | |
1760 | # Date 3 0 |
|
1760 | # Date 3 0 | |
1761 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1761 | # Thu Jan 01 00:00:03 1970 +0000 | |
1762 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1762 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1763 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1763 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1764 | c |
|
1764 | c | |
1765 |
|
1765 | |||
1766 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1766 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1767 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1767 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1768 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1768 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1769 | @@ -0,0 +1,1 @@ |
|
1769 | @@ -0,0 +1,1 @@ | |
1770 | +c |
|
1770 | +c | |
1771 |
|
1771 | |||
1772 |
|
1772 | |||
1773 | tagging csets: |
|
1773 | tagging csets: | |
1774 | $ hg tag -r0 zero zero.foo |
|
1774 | $ hg tag -r0 zero zero.foo | |
1775 | $ hg tag -r1 one one.patch |
|
1775 | $ hg tag -r1 one one.patch | |
1776 | $ hg tag -r2 two two.diff |
|
1776 | $ hg tag -r2 two two.diff | |
1777 |
|
1777 | |||
1778 | test inline for single named patch: |
|
1778 | test inline for single named patch: | |
1779 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ |
|
1779 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ | |
1780 | > -r 2 | filterboundary |
|
1780 | > -r 2 | filterboundary | |
1781 | this patch series consists of 1 patches. |
|
1781 | this patch series consists of 1 patches. | |
1782 |
|
1782 | |||
1783 |
|
1783 | |||
1784 | displaying [PATCH] test ... |
|
1784 | displaying [PATCH] test ... | |
1785 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1785 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1786 | MIME-Version: 1.0 |
|
1786 | MIME-Version: 1.0 | |
1787 | Subject: [PATCH] test |
|
1787 | Subject: [PATCH] test | |
1788 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1788 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1789 | X-Mercurial-Series-Index: 1 |
|
1789 | X-Mercurial-Series-Index: 1 | |
1790 | X-Mercurial-Series-Total: 1 |
|
1790 | X-Mercurial-Series-Total: 1 | |
1791 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1791 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1792 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
1792 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
1793 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1793 | User-Agent: Mercurial-patchbomb/* (glob) | |
1794 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1794 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1795 | From: quux |
|
1795 | From: quux | |
1796 | To: foo |
|
1796 | To: foo | |
1797 | Cc: bar |
|
1797 | Cc: bar | |
1798 |
|
1798 | |||
1799 | --===*= (glob) |
|
1799 | --===*= (glob) | |
1800 | MIME-Version: 1.0 |
|
1800 | MIME-Version: 1.0 | |
1801 | Content-Type: text/x-patch; charset="us-ascii" |
|
1801 | Content-Type: text/x-patch; charset="us-ascii" | |
1802 | Content-Transfer-Encoding: 7bit |
|
1802 | Content-Transfer-Encoding: 7bit | |
1803 | Content-Disposition: inline; filename=two.diff |
|
1803 | Content-Disposition: inline; filename=two.diff | |
1804 |
|
1804 | |||
1805 | # HG changeset patch |
|
1805 | # HG changeset patch | |
1806 | # User test |
|
1806 | # User test | |
1807 | # Date 3 0 |
|
1807 | # Date 3 0 | |
1808 | # Thu Jan 01 00:00:03 1970 +0000 |
|
1808 | # Thu Jan 01 00:00:03 1970 +0000 | |
1809 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
1809 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
1810 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1810 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1811 | c |
|
1811 | c | |
1812 |
|
1812 | |||
1813 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
1813 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
1814 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1814 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1815 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
1815 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
1816 | @@ -0,0 +1,1 @@ |
|
1816 | @@ -0,0 +1,1 @@ | |
1817 | +c |
|
1817 | +c | |
1818 |
|
1818 | |||
1819 | --===*=-- (glob) |
|
1819 | --===*=-- (glob) | |
1820 |
|
1820 | |||
1821 | test inline for multiple named/unnamed patches: |
|
1821 | test inline for multiple named/unnamed patches: | |
1822 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ |
|
1822 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \ | |
1823 | > -r 0:1 | filterboundary |
|
1823 | > -r 0:1 | filterboundary | |
1824 | this patch series consists of 2 patches. |
|
1824 | this patch series consists of 2 patches. | |
1825 |
|
1825 | |||
1826 |
|
1826 | |||
1827 | Write the introductory message for the patch series. |
|
1827 | Write the introductory message for the patch series. | |
1828 |
|
1828 | |||
1829 |
|
1829 | |||
1830 | displaying [PATCH 0 of 2] test ... |
|
1830 | displaying [PATCH 0 of 2] test ... | |
1831 | MIME-Version: 1.0 |
|
1831 | MIME-Version: 1.0 | |
1832 | Content-Type: text/plain; charset="us-ascii" |
|
1832 | Content-Type: text/plain; charset="us-ascii" | |
1833 | Content-Transfer-Encoding: 7bit |
|
1833 | Content-Transfer-Encoding: 7bit | |
1834 | Subject: [PATCH 0 of 2] test |
|
1834 | Subject: [PATCH 0 of 2] test | |
1835 | Message-Id: <patchbomb.60@test-hostname> |
|
1835 | Message-Id: <patchbomb.60@test-hostname> | |
1836 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1836 | User-Agent: Mercurial-patchbomb/* (glob) | |
1837 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1837 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1838 | From: quux |
|
1838 | From: quux | |
1839 | To: foo |
|
1839 | To: foo | |
1840 | Cc: bar |
|
1840 | Cc: bar | |
1841 |
|
1841 | |||
1842 |
|
1842 | |||
1843 | displaying [PATCH 1 of 2] a ... |
|
1843 | displaying [PATCH 1 of 2] a ... | |
1844 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1844 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1845 | MIME-Version: 1.0 |
|
1845 | MIME-Version: 1.0 | |
1846 | Subject: [PATCH 1 of 2] a |
|
1846 | Subject: [PATCH 1 of 2] a | |
1847 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1847 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1848 | X-Mercurial-Series-Index: 1 |
|
1848 | X-Mercurial-Series-Index: 1 | |
1849 | X-Mercurial-Series-Total: 2 |
|
1849 | X-Mercurial-Series-Total: 2 | |
1850 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1850 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1851 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1851 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1852 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1852 | In-Reply-To: <patchbomb.60@test-hostname> | |
1853 | References: <patchbomb.60@test-hostname> |
|
1853 | References: <patchbomb.60@test-hostname> | |
1854 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1854 | User-Agent: Mercurial-patchbomb/* (glob) | |
1855 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
1855 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
1856 | From: quux |
|
1856 | From: quux | |
1857 | To: foo |
|
1857 | To: foo | |
1858 | Cc: bar |
|
1858 | Cc: bar | |
1859 |
|
1859 | |||
1860 | --===*= (glob) |
|
1860 | --===*= (glob) | |
1861 | MIME-Version: 1.0 |
|
1861 | MIME-Version: 1.0 | |
1862 | Content-Type: text/x-patch; charset="us-ascii" |
|
1862 | Content-Type: text/x-patch; charset="us-ascii" | |
1863 | Content-Transfer-Encoding: 7bit |
|
1863 | Content-Transfer-Encoding: 7bit | |
1864 | Content-Disposition: inline; filename=t2-1.patch |
|
1864 | Content-Disposition: inline; filename=t2-1.patch | |
1865 |
|
1865 | |||
1866 | # HG changeset patch |
|
1866 | # HG changeset patch | |
1867 | # User test |
|
1867 | # User test | |
1868 | # Date 1 0 |
|
1868 | # Date 1 0 | |
1869 | # Thu Jan 01 00:00:01 1970 +0000 |
|
1869 | # Thu Jan 01 00:00:01 1970 +0000 | |
1870 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1870 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1871 | # Parent 0000000000000000000000000000000000000000 |
|
1871 | # Parent 0000000000000000000000000000000000000000 | |
1872 | a |
|
1872 | a | |
1873 |
|
1873 | |||
1874 | diff -r 000000000000 -r 8580ff50825a a |
|
1874 | diff -r 000000000000 -r 8580ff50825a a | |
1875 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1875 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1876 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
1876 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
1877 | @@ -0,0 +1,1 @@ |
|
1877 | @@ -0,0 +1,1 @@ | |
1878 | +a |
|
1878 | +a | |
1879 |
|
1879 | |||
1880 | --===*=-- (glob) |
|
1880 | --===*=-- (glob) | |
1881 | displaying [PATCH 2 of 2] b ... |
|
1881 | displaying [PATCH 2 of 2] b ... | |
1882 | Content-Type: multipart/mixed; boundary="===*==" (glob) |
|
1882 | Content-Type: multipart/mixed; boundary="===*==" (glob) | |
1883 | MIME-Version: 1.0 |
|
1883 | MIME-Version: 1.0 | |
1884 | Subject: [PATCH 2 of 2] b |
|
1884 | Subject: [PATCH 2 of 2] b | |
1885 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1885 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1886 | X-Mercurial-Series-Index: 2 |
|
1886 | X-Mercurial-Series-Index: 2 | |
1887 | X-Mercurial-Series-Total: 2 |
|
1887 | X-Mercurial-Series-Total: 2 | |
1888 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
1888 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
1889 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
1889 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
1890 | In-Reply-To: <patchbomb.60@test-hostname> |
|
1890 | In-Reply-To: <patchbomb.60@test-hostname> | |
1891 | References: <patchbomb.60@test-hostname> |
|
1891 | References: <patchbomb.60@test-hostname> | |
1892 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1892 | User-Agent: Mercurial-patchbomb/* (glob) | |
1893 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
1893 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
1894 | From: quux |
|
1894 | From: quux | |
1895 | To: foo |
|
1895 | To: foo | |
1896 | Cc: bar |
|
1896 | Cc: bar | |
1897 |
|
1897 | |||
1898 | --===*= (glob) |
|
1898 | --===*= (glob) | |
1899 | MIME-Version: 1.0 |
|
1899 | MIME-Version: 1.0 | |
1900 | Content-Type: text/x-patch; charset="us-ascii" |
|
1900 | Content-Type: text/x-patch; charset="us-ascii" | |
1901 | Content-Transfer-Encoding: 7bit |
|
1901 | Content-Transfer-Encoding: 7bit | |
1902 | Content-Disposition: inline; filename=one.patch |
|
1902 | Content-Disposition: inline; filename=one.patch | |
1903 |
|
1903 | |||
1904 | # HG changeset patch |
|
1904 | # HG changeset patch | |
1905 | # User test |
|
1905 | # User test | |
1906 | # Date 2 0 |
|
1906 | # Date 2 0 | |
1907 | # Thu Jan 01 00:00:02 1970 +0000 |
|
1907 | # Thu Jan 01 00:00:02 1970 +0000 | |
1908 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
1908 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
1909 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1909 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1910 | b |
|
1910 | b | |
1911 |
|
1911 | |||
1912 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
1912 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
1913 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1913 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1914 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
1914 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
1915 | @@ -0,0 +1,1 @@ |
|
1915 | @@ -0,0 +1,1 @@ | |
1916 | +b |
|
1916 | +b | |
1917 |
|
1917 | |||
1918 | --===*=-- (glob) |
|
1918 | --===*=-- (glob) | |
1919 |
|
1919 | |||
1920 |
|
1920 | |||
1921 | test inreplyto: |
|
1921 | test inreplyto: | |
1922 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ |
|
1922 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ | |
1923 | > -r tip |
|
1923 | > -r tip | |
1924 | this patch series consists of 1 patches. |
|
1924 | this patch series consists of 1 patches. | |
1925 |
|
1925 | |||
1926 |
|
1926 | |||
1927 | displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ... |
|
1927 | displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ... | |
1928 | MIME-Version: 1.0 |
|
1928 | MIME-Version: 1.0 | |
1929 | Content-Type: text/plain; charset="us-ascii" |
|
1929 | Content-Type: text/plain; charset="us-ascii" | |
1930 | Content-Transfer-Encoding: 7bit |
|
1930 | Content-Transfer-Encoding: 7bit | |
1931 | Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b |
|
1931 | Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b | |
1932 | X-Mercurial-Node: 7aead2484924c445ad8ce2613df91f52f9e502ed |
|
1932 | X-Mercurial-Node: 7aead2484924c445ad8ce2613df91f52f9e502ed | |
1933 | X-Mercurial-Series-Index: 1 |
|
1933 | X-Mercurial-Series-Index: 1 | |
1934 | X-Mercurial-Series-Total: 1 |
|
1934 | X-Mercurial-Series-Total: 1 | |
1935 | Message-Id: <7aead2484924c445ad8c.60@test-hostname> |
|
1935 | Message-Id: <7aead2484924c445ad8c.60@test-hostname> | |
1936 | X-Mercurial-Series-Id: <7aead2484924c445ad8c.60@test-hostname> |
|
1936 | X-Mercurial-Series-Id: <7aead2484924c445ad8c.60@test-hostname> | |
1937 | In-Reply-To: <baz> |
|
1937 | In-Reply-To: <baz> | |
1938 | References: <baz> |
|
1938 | References: <baz> | |
1939 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1939 | User-Agent: Mercurial-patchbomb/* (glob) | |
1940 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1940 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1941 | From: quux |
|
1941 | From: quux | |
1942 | To: foo |
|
1942 | To: foo | |
1943 | Cc: bar |
|
1943 | Cc: bar | |
1944 |
|
1944 | |||
1945 | # HG changeset patch |
|
1945 | # HG changeset patch | |
1946 | # User test |
|
1946 | # User test | |
1947 | # Date 0 0 |
|
1947 | # Date 0 0 | |
1948 | # Thu Jan 01 00:00:00 1970 +0000 |
|
1948 | # Thu Jan 01 00:00:00 1970 +0000 | |
1949 | # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed |
|
1949 | # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed | |
1950 | # Parent 045ca29b1ea20e4940411e695e20e521f2f0f98e |
|
1950 | # Parent 045ca29b1ea20e4940411e695e20e521f2f0f98e | |
1951 | Added tag two, two.diff for changeset ff2c9fa2018b |
|
1951 | Added tag two, two.diff for changeset ff2c9fa2018b | |
1952 |
|
1952 | |||
1953 | diff -r 045ca29b1ea2 -r 7aead2484924 .hgtags |
|
1953 | diff -r 045ca29b1ea2 -r 7aead2484924 .hgtags | |
1954 | --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 |
|
1954 | --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
1955 | +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 |
|
1955 | +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
1956 | @@ -2,3 +2,5 @@ |
|
1956 | @@ -2,3 +2,5 @@ | |
1957 | 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo |
|
1957 | 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo | |
1958 | 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one |
|
1958 | 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one | |
1959 | 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch |
|
1959 | 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch | |
1960 | +ff2c9fa2018b15fa74b33363bda9527323e2a99f two |
|
1960 | +ff2c9fa2018b15fa74b33363bda9527323e2a99f two | |
1961 | +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff |
|
1961 | +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff | |
1962 |
|
1962 | |||
1963 | no intro message in non-interactive mode |
|
1963 | no intro message in non-interactive mode | |
1964 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ |
|
1964 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ | |
1965 | > -r 0:1 |
|
1965 | > -r 0:1 | |
1966 | this patch series consists of 2 patches. |
|
1966 | this patch series consists of 2 patches. | |
1967 |
|
1967 | |||
1968 | (optional) Subject: [PATCH 0 of 2] |
|
1968 | (optional) Subject: [PATCH 0 of 2] | |
1969 |
|
1969 | |||
1970 | displaying [PATCH 1 of 2] a ... |
|
1970 | displaying [PATCH 1 of 2] a ... | |
1971 | MIME-Version: 1.0 |
|
1971 | MIME-Version: 1.0 | |
1972 | Content-Type: text/plain; charset="us-ascii" |
|
1972 | Content-Type: text/plain; charset="us-ascii" | |
1973 | Content-Transfer-Encoding: 7bit |
|
1973 | Content-Transfer-Encoding: 7bit | |
1974 | Subject: [PATCH 1 of 2] a |
|
1974 | Subject: [PATCH 1 of 2] a | |
1975 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1975 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1976 | X-Mercurial-Series-Index: 1 |
|
1976 | X-Mercurial-Series-Index: 1 | |
1977 | X-Mercurial-Series-Total: 2 |
|
1977 | X-Mercurial-Series-Total: 2 | |
1978 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
1978 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> | |
1979 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
1979 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
1980 | In-Reply-To: <baz> |
|
1980 | In-Reply-To: <baz> | |
1981 | References: <baz> |
|
1981 | References: <baz> | |
1982 | User-Agent: Mercurial-patchbomb/* (glob) |
|
1982 | User-Agent: Mercurial-patchbomb/* (glob) | |
1983 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
1983 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
1984 | From: quux |
|
1984 | From: quux | |
1985 | To: foo |
|
1985 | To: foo | |
1986 | Cc: bar |
|
1986 | Cc: bar | |
1987 |
|
1987 | |||
1988 | # HG changeset patch |
|
1988 | # HG changeset patch | |
1989 | # User test |
|
1989 | # User test | |
1990 | # Date 1 0 |
|
1990 | # Date 1 0 | |
1991 | # Thu Jan 01 00:00:01 1970 +0000 |
|
1991 | # Thu Jan 01 00:00:01 1970 +0000 | |
1992 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
1992 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
1993 | # Parent 0000000000000000000000000000000000000000 |
|
1993 | # Parent 0000000000000000000000000000000000000000 | |
1994 | a |
|
1994 | a | |
1995 |
|
1995 | |||
1996 | diff -r 000000000000 -r 8580ff50825a a |
|
1996 | diff -r 000000000000 -r 8580ff50825a a | |
1997 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1997 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1998 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
1998 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
1999 | @@ -0,0 +1,1 @@ |
|
1999 | @@ -0,0 +1,1 @@ | |
2000 | +a |
|
2000 | +a | |
2001 |
|
2001 | |||
2002 | displaying [PATCH 2 of 2] b ... |
|
2002 | displaying [PATCH 2 of 2] b ... | |
2003 | MIME-Version: 1.0 |
|
2003 | MIME-Version: 1.0 | |
2004 | Content-Type: text/plain; charset="us-ascii" |
|
2004 | Content-Type: text/plain; charset="us-ascii" | |
2005 | Content-Transfer-Encoding: 7bit |
|
2005 | Content-Transfer-Encoding: 7bit | |
2006 | Subject: [PATCH 2 of 2] b |
|
2006 | Subject: [PATCH 2 of 2] b | |
2007 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2007 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2008 | X-Mercurial-Series-Index: 2 |
|
2008 | X-Mercurial-Series-Index: 2 | |
2009 | X-Mercurial-Series-Total: 2 |
|
2009 | X-Mercurial-Series-Total: 2 | |
2010 | Message-Id: <97d72e5f12c7e84f8506.61@test-hostname> |
|
2010 | Message-Id: <97d72e5f12c7e84f8506.61@test-hostname> | |
2011 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
2011 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
2012 | In-Reply-To: <baz> |
|
2012 | In-Reply-To: <baz> | |
2013 | References: <baz> |
|
2013 | References: <baz> | |
2014 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2014 | User-Agent: Mercurial-patchbomb/* (glob) | |
2015 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
2015 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
2016 | From: quux |
|
2016 | From: quux | |
2017 | To: foo |
|
2017 | To: foo | |
2018 | Cc: bar |
|
2018 | Cc: bar | |
2019 |
|
2019 | |||
2020 | # HG changeset patch |
|
2020 | # HG changeset patch | |
2021 | # User test |
|
2021 | # User test | |
2022 | # Date 2 0 |
|
2022 | # Date 2 0 | |
2023 | # Thu Jan 01 00:00:02 1970 +0000 |
|
2023 | # Thu Jan 01 00:00:02 1970 +0000 | |
2024 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2024 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2025 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2025 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2026 | b |
|
2026 | b | |
2027 |
|
2027 | |||
2028 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
2028 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
2029 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2029 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2030 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
2030 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
2031 | @@ -0,0 +1,1 @@ |
|
2031 | @@ -0,0 +1,1 @@ | |
2032 | +b |
|
2032 | +b | |
2033 |
|
2033 | |||
2034 |
|
2034 | |||
2035 |
|
2035 | |||
2036 |
|
2036 | |||
2037 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ |
|
2037 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \ | |
2038 | > -s test -r 0:1 |
|
2038 | > -s test -r 0:1 | |
2039 | this patch series consists of 2 patches. |
|
2039 | this patch series consists of 2 patches. | |
2040 |
|
2040 | |||
2041 |
|
2041 | |||
2042 | Write the introductory message for the patch series. |
|
2042 | Write the introductory message for the patch series. | |
2043 |
|
2043 | |||
2044 |
|
2044 | |||
2045 | displaying [PATCH 0 of 2] test ... |
|
2045 | displaying [PATCH 0 of 2] test ... | |
2046 | MIME-Version: 1.0 |
|
2046 | MIME-Version: 1.0 | |
2047 | Content-Type: text/plain; charset="us-ascii" |
|
2047 | Content-Type: text/plain; charset="us-ascii" | |
2048 | Content-Transfer-Encoding: 7bit |
|
2048 | Content-Transfer-Encoding: 7bit | |
2049 | Subject: [PATCH 0 of 2] test |
|
2049 | Subject: [PATCH 0 of 2] test | |
2050 | Message-Id: <patchbomb.60@test-hostname> |
|
2050 | Message-Id: <patchbomb.60@test-hostname> | |
2051 | In-Reply-To: <baz> |
|
2051 | In-Reply-To: <baz> | |
2052 | References: <baz> |
|
2052 | References: <baz> | |
2053 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2053 | User-Agent: Mercurial-patchbomb/* (glob) | |
2054 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2054 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2055 | From: quux |
|
2055 | From: quux | |
2056 | To: foo |
|
2056 | To: foo | |
2057 | Cc: bar |
|
2057 | Cc: bar | |
2058 |
|
2058 | |||
2059 |
|
2059 | |||
2060 | displaying [PATCH 1 of 2] a ... |
|
2060 | displaying [PATCH 1 of 2] a ... | |
2061 | MIME-Version: 1.0 |
|
2061 | MIME-Version: 1.0 | |
2062 | Content-Type: text/plain; charset="us-ascii" |
|
2062 | Content-Type: text/plain; charset="us-ascii" | |
2063 | Content-Transfer-Encoding: 7bit |
|
2063 | Content-Transfer-Encoding: 7bit | |
2064 | Subject: [PATCH 1 of 2] a |
|
2064 | Subject: [PATCH 1 of 2] a | |
2065 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2065 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2066 | X-Mercurial-Series-Index: 1 |
|
2066 | X-Mercurial-Series-Index: 1 | |
2067 | X-Mercurial-Series-Total: 2 |
|
2067 | X-Mercurial-Series-Total: 2 | |
2068 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2068 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2069 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2069 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2070 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2070 | In-Reply-To: <patchbomb.60@test-hostname> | |
2071 | References: <patchbomb.60@test-hostname> |
|
2071 | References: <patchbomb.60@test-hostname> | |
2072 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2072 | User-Agent: Mercurial-patchbomb/* (glob) | |
2073 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
2073 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
2074 | From: quux |
|
2074 | From: quux | |
2075 | To: foo |
|
2075 | To: foo | |
2076 | Cc: bar |
|
2076 | Cc: bar | |
2077 |
|
2077 | |||
2078 | # HG changeset patch |
|
2078 | # HG changeset patch | |
2079 | # User test |
|
2079 | # User test | |
2080 | # Date 1 0 |
|
2080 | # Date 1 0 | |
2081 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2081 | # Thu Jan 01 00:00:01 1970 +0000 | |
2082 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2082 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2083 | # Parent 0000000000000000000000000000000000000000 |
|
2083 | # Parent 0000000000000000000000000000000000000000 | |
2084 | a |
|
2084 | a | |
2085 |
|
2085 | |||
2086 | diff -r 000000000000 -r 8580ff50825a a |
|
2086 | diff -r 000000000000 -r 8580ff50825a a | |
2087 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2087 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2088 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2088 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2089 | @@ -0,0 +1,1 @@ |
|
2089 | @@ -0,0 +1,1 @@ | |
2090 | +a |
|
2090 | +a | |
2091 |
|
2091 | |||
2092 | displaying [PATCH 2 of 2] b ... |
|
2092 | displaying [PATCH 2 of 2] b ... | |
2093 | MIME-Version: 1.0 |
|
2093 | MIME-Version: 1.0 | |
2094 | Content-Type: text/plain; charset="us-ascii" |
|
2094 | Content-Type: text/plain; charset="us-ascii" | |
2095 | Content-Transfer-Encoding: 7bit |
|
2095 | Content-Transfer-Encoding: 7bit | |
2096 | Subject: [PATCH 2 of 2] b |
|
2096 | Subject: [PATCH 2 of 2] b | |
2097 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2097 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2098 | X-Mercurial-Series-Index: 2 |
|
2098 | X-Mercurial-Series-Index: 2 | |
2099 | X-Mercurial-Series-Total: 2 |
|
2099 | X-Mercurial-Series-Total: 2 | |
2100 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
2100 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
2101 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2101 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2102 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2102 | In-Reply-To: <patchbomb.60@test-hostname> | |
2103 | References: <patchbomb.60@test-hostname> |
|
2103 | References: <patchbomb.60@test-hostname> | |
2104 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2104 | User-Agent: Mercurial-patchbomb/* (glob) | |
2105 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
2105 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
2106 | From: quux |
|
2106 | From: quux | |
2107 | To: foo |
|
2107 | To: foo | |
2108 | Cc: bar |
|
2108 | Cc: bar | |
2109 |
|
2109 | |||
2110 | # HG changeset patch |
|
2110 | # HG changeset patch | |
2111 | # User test |
|
2111 | # User test | |
2112 | # Date 2 0 |
|
2112 | # Date 2 0 | |
2113 | # Thu Jan 01 00:00:02 1970 +0000 |
|
2113 | # Thu Jan 01 00:00:02 1970 +0000 | |
2114 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2114 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2115 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2115 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2116 | b |
|
2116 | b | |
2117 |
|
2117 | |||
2118 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
2118 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
2119 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2119 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2120 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
2120 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
2121 | @@ -0,0 +1,1 @@ |
|
2121 | @@ -0,0 +1,1 @@ | |
2122 | +b |
|
2122 | +b | |
2123 |
|
2123 | |||
2124 |
|
2124 | |||
2125 | test single flag for single patch (and no warning when not mailing dirty rev): |
|
2125 | test single flag for single patch (and no warning when not mailing dirty rev): | |
2126 | $ hg up -qr1 |
|
2126 | $ hg up -qr1 | |
2127 | $ echo dirt > a |
|
2127 | $ echo dirt > a | |
2128 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \ |
|
2128 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \ | |
2129 | > -r 2 | filterboundary |
|
2129 | > -r 2 | filterboundary | |
2130 | this patch series consists of 1 patches. |
|
2130 | this patch series consists of 1 patches. | |
2131 |
|
2131 | |||
2132 |
|
2132 | |||
2133 | displaying [PATCH fooFlag] test ... |
|
2133 | displaying [PATCH fooFlag] test ... | |
2134 | MIME-Version: 1.0 |
|
2134 | MIME-Version: 1.0 | |
2135 | Content-Type: text/plain; charset="us-ascii" |
|
2135 | Content-Type: text/plain; charset="us-ascii" | |
2136 | Content-Transfer-Encoding: 7bit |
|
2136 | Content-Transfer-Encoding: 7bit | |
2137 | Subject: [PATCH fooFlag] test |
|
2137 | Subject: [PATCH fooFlag] test | |
2138 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2138 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2139 | X-Mercurial-Series-Index: 1 |
|
2139 | X-Mercurial-Series-Index: 1 | |
2140 | X-Mercurial-Series-Total: 1 |
|
2140 | X-Mercurial-Series-Total: 1 | |
2141 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
2141 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
2142 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
2142 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
2143 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2143 | User-Agent: Mercurial-patchbomb/* (glob) | |
2144 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2144 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2145 | From: quux |
|
2145 | From: quux | |
2146 | To: foo |
|
2146 | To: foo | |
2147 | Cc: bar |
|
2147 | Cc: bar | |
2148 |
|
2148 | |||
2149 | # HG changeset patch |
|
2149 | # HG changeset patch | |
2150 | # User test |
|
2150 | # User test | |
2151 | # Date 3 0 |
|
2151 | # Date 3 0 | |
2152 | # Thu Jan 01 00:00:03 1970 +0000 |
|
2152 | # Thu Jan 01 00:00:03 1970 +0000 | |
2153 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2153 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2154 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2154 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2155 | c |
|
2155 | c | |
2156 |
|
2156 | |||
2157 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
2157 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
2158 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2158 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2159 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
2159 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
2160 | @@ -0,0 +1,1 @@ |
|
2160 | @@ -0,0 +1,1 @@ | |
2161 | +c |
|
2161 | +c | |
2162 |
|
2162 | |||
2163 |
|
2163 | |||
2164 | test single flag for multiple patches (and warning when mailing dirty rev): |
|
2164 | test single flag for multiple patches (and warning when mailing dirty rev): | |
2165 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \ |
|
2165 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \ | |
2166 | > -r 0:1 |
|
2166 | > -r 0:1 | |
2167 | warning: working directory has uncommitted changes |
|
2167 | warning: working directory has uncommitted changes | |
2168 | this patch series consists of 2 patches. |
|
2168 | this patch series consists of 2 patches. | |
2169 |
|
2169 | |||
2170 |
|
2170 | |||
2171 | Write the introductory message for the patch series. |
|
2171 | Write the introductory message for the patch series. | |
2172 |
|
2172 | |||
2173 |
|
2173 | |||
2174 | displaying [PATCH 0 of 2 fooFlag] test ... |
|
2174 | displaying [PATCH 0 of 2 fooFlag] test ... | |
2175 | MIME-Version: 1.0 |
|
2175 | MIME-Version: 1.0 | |
2176 | Content-Type: text/plain; charset="us-ascii" |
|
2176 | Content-Type: text/plain; charset="us-ascii" | |
2177 | Content-Transfer-Encoding: 7bit |
|
2177 | Content-Transfer-Encoding: 7bit | |
2178 | Subject: [PATCH 0 of 2 fooFlag] test |
|
2178 | Subject: [PATCH 0 of 2 fooFlag] test | |
2179 | Message-Id: <patchbomb.60@test-hostname> |
|
2179 | Message-Id: <patchbomb.60@test-hostname> | |
2180 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2180 | User-Agent: Mercurial-patchbomb/* (glob) | |
2181 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2181 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2182 | From: quux |
|
2182 | From: quux | |
2183 | To: foo |
|
2183 | To: foo | |
2184 | Cc: bar |
|
2184 | Cc: bar | |
2185 |
|
2185 | |||
2186 |
|
2186 | |||
2187 | displaying [PATCH 1 of 2 fooFlag] a ... |
|
2187 | displaying [PATCH 1 of 2 fooFlag] a ... | |
2188 | MIME-Version: 1.0 |
|
2188 | MIME-Version: 1.0 | |
2189 | Content-Type: text/plain; charset="us-ascii" |
|
2189 | Content-Type: text/plain; charset="us-ascii" | |
2190 | Content-Transfer-Encoding: 7bit |
|
2190 | Content-Transfer-Encoding: 7bit | |
2191 | Subject: [PATCH 1 of 2 fooFlag] a |
|
2191 | Subject: [PATCH 1 of 2 fooFlag] a | |
2192 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2192 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2193 | X-Mercurial-Series-Index: 1 |
|
2193 | X-Mercurial-Series-Index: 1 | |
2194 | X-Mercurial-Series-Total: 2 |
|
2194 | X-Mercurial-Series-Total: 2 | |
2195 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2195 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2196 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2196 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2197 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2197 | In-Reply-To: <patchbomb.60@test-hostname> | |
2198 | References: <patchbomb.60@test-hostname> |
|
2198 | References: <patchbomb.60@test-hostname> | |
2199 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2199 | User-Agent: Mercurial-patchbomb/* (glob) | |
2200 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
2200 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
2201 | From: quux |
|
2201 | From: quux | |
2202 | To: foo |
|
2202 | To: foo | |
2203 | Cc: bar |
|
2203 | Cc: bar | |
2204 |
|
2204 | |||
2205 | # HG changeset patch |
|
2205 | # HG changeset patch | |
2206 | # User test |
|
2206 | # User test | |
2207 | # Date 1 0 |
|
2207 | # Date 1 0 | |
2208 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2208 | # Thu Jan 01 00:00:01 1970 +0000 | |
2209 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2209 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2210 | # Parent 0000000000000000000000000000000000000000 |
|
2210 | # Parent 0000000000000000000000000000000000000000 | |
2211 | a |
|
2211 | a | |
2212 |
|
2212 | |||
2213 | diff -r 000000000000 -r 8580ff50825a a |
|
2213 | diff -r 000000000000 -r 8580ff50825a a | |
2214 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2214 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2215 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2215 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2216 | @@ -0,0 +1,1 @@ |
|
2216 | @@ -0,0 +1,1 @@ | |
2217 | +a |
|
2217 | +a | |
2218 |
|
2218 | |||
2219 | displaying [PATCH 2 of 2 fooFlag] b ... |
|
2219 | displaying [PATCH 2 of 2 fooFlag] b ... | |
2220 | MIME-Version: 1.0 |
|
2220 | MIME-Version: 1.0 | |
2221 | Content-Type: text/plain; charset="us-ascii" |
|
2221 | Content-Type: text/plain; charset="us-ascii" | |
2222 | Content-Transfer-Encoding: 7bit |
|
2222 | Content-Transfer-Encoding: 7bit | |
2223 | Subject: [PATCH 2 of 2 fooFlag] b |
|
2223 | Subject: [PATCH 2 of 2 fooFlag] b | |
2224 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2224 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2225 | X-Mercurial-Series-Index: 2 |
|
2225 | X-Mercurial-Series-Index: 2 | |
2226 | X-Mercurial-Series-Total: 2 |
|
2226 | X-Mercurial-Series-Total: 2 | |
2227 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
2227 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
2228 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2228 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2229 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2229 | In-Reply-To: <patchbomb.60@test-hostname> | |
2230 | References: <patchbomb.60@test-hostname> |
|
2230 | References: <patchbomb.60@test-hostname> | |
2231 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2231 | User-Agent: Mercurial-patchbomb/* (glob) | |
2232 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
2232 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
2233 | From: quux |
|
2233 | From: quux | |
2234 | To: foo |
|
2234 | To: foo | |
2235 | Cc: bar |
|
2235 | Cc: bar | |
2236 |
|
2236 | |||
2237 | # HG changeset patch |
|
2237 | # HG changeset patch | |
2238 | # User test |
|
2238 | # User test | |
2239 | # Date 2 0 |
|
2239 | # Date 2 0 | |
2240 | # Thu Jan 01 00:00:02 1970 +0000 |
|
2240 | # Thu Jan 01 00:00:02 1970 +0000 | |
2241 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2241 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2242 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2242 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2243 | b |
|
2243 | b | |
2244 |
|
2244 | |||
2245 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
2245 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
2246 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2246 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2247 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
2247 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
2248 | @@ -0,0 +1,1 @@ |
|
2248 | @@ -0,0 +1,1 @@ | |
2249 | +b |
|
2249 | +b | |
2250 |
|
2250 | |||
2251 | $ hg revert --no-b a |
|
2251 | $ hg revert --no-b a | |
2252 | $ hg up -q |
|
2252 | $ hg up -q | |
2253 |
|
2253 | |||
2254 | test multiple flags for single patch: |
|
2254 | test multiple flags for single patch: | |
2255 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ |
|
2255 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ | |
2256 | > -c bar -s test -r 2 |
|
2256 | > -c bar -s test -r 2 | |
2257 | this patch series consists of 1 patches. |
|
2257 | this patch series consists of 1 patches. | |
2258 |
|
2258 | |||
2259 |
|
2259 | |||
2260 | displaying [PATCH fooFlag barFlag] test ... |
|
2260 | displaying [PATCH fooFlag barFlag] test ... | |
2261 | MIME-Version: 1.0 |
|
2261 | MIME-Version: 1.0 | |
2262 | Content-Type: text/plain; charset="us-ascii" |
|
2262 | Content-Type: text/plain; charset="us-ascii" | |
2263 | Content-Transfer-Encoding: 7bit |
|
2263 | Content-Transfer-Encoding: 7bit | |
2264 | Subject: [PATCH fooFlag barFlag] test |
|
2264 | Subject: [PATCH fooFlag barFlag] test | |
2265 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2265 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2266 | X-Mercurial-Series-Index: 1 |
|
2266 | X-Mercurial-Series-Index: 1 | |
2267 | X-Mercurial-Series-Total: 1 |
|
2267 | X-Mercurial-Series-Total: 1 | |
2268 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
2268 | Message-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
2269 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> |
|
2269 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.60@test-hostname> | |
2270 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2270 | User-Agent: Mercurial-patchbomb/* (glob) | |
2271 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2271 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2272 | From: quux |
|
2272 | From: quux | |
2273 | To: foo |
|
2273 | To: foo | |
2274 | Cc: bar |
|
2274 | Cc: bar | |
2275 |
|
2275 | |||
2276 | # HG changeset patch |
|
2276 | # HG changeset patch | |
2277 | # User test |
|
2277 | # User test | |
2278 | # Date 3 0 |
|
2278 | # Date 3 0 | |
2279 | # Thu Jan 01 00:00:03 1970 +0000 |
|
2279 | # Thu Jan 01 00:00:03 1970 +0000 | |
2280 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2280 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2281 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2281 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2282 | c |
|
2282 | c | |
2283 |
|
2283 | |||
2284 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
2284 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
2285 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2285 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2286 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
2286 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
2287 | @@ -0,0 +1,1 @@ |
|
2287 | @@ -0,0 +1,1 @@ | |
2288 | +c |
|
2288 | +c | |
2289 |
|
2289 | |||
2290 |
|
2290 | |||
2291 | test multiple flags for multiple patches: |
|
2291 | test multiple flags for multiple patches: | |
2292 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ |
|
2292 | $ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \ | |
2293 | > -c bar -s test -r 0:1 |
|
2293 | > -c bar -s test -r 0:1 | |
2294 | this patch series consists of 2 patches. |
|
2294 | this patch series consists of 2 patches. | |
2295 |
|
2295 | |||
2296 |
|
2296 | |||
2297 | Write the introductory message for the patch series. |
|
2297 | Write the introductory message for the patch series. | |
2298 |
|
2298 | |||
2299 |
|
2299 | |||
2300 | displaying [PATCH 0 of 2 fooFlag barFlag] test ... |
|
2300 | displaying [PATCH 0 of 2 fooFlag barFlag] test ... | |
2301 | MIME-Version: 1.0 |
|
2301 | MIME-Version: 1.0 | |
2302 | Content-Type: text/plain; charset="us-ascii" |
|
2302 | Content-Type: text/plain; charset="us-ascii" | |
2303 | Content-Transfer-Encoding: 7bit |
|
2303 | Content-Transfer-Encoding: 7bit | |
2304 | Subject: [PATCH 0 of 2 fooFlag barFlag] test |
|
2304 | Subject: [PATCH 0 of 2 fooFlag barFlag] test | |
2305 | Message-Id: <patchbomb.60@test-hostname> |
|
2305 | Message-Id: <patchbomb.60@test-hostname> | |
2306 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2306 | User-Agent: Mercurial-patchbomb/* (glob) | |
2307 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2307 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2308 | From: quux |
|
2308 | From: quux | |
2309 | To: foo |
|
2309 | To: foo | |
2310 | Cc: bar |
|
2310 | Cc: bar | |
2311 |
|
2311 | |||
2312 |
|
2312 | |||
2313 | displaying [PATCH 1 of 2 fooFlag barFlag] a ... |
|
2313 | displaying [PATCH 1 of 2 fooFlag barFlag] a ... | |
2314 | MIME-Version: 1.0 |
|
2314 | MIME-Version: 1.0 | |
2315 | Content-Type: text/plain; charset="us-ascii" |
|
2315 | Content-Type: text/plain; charset="us-ascii" | |
2316 | Content-Transfer-Encoding: 7bit |
|
2316 | Content-Transfer-Encoding: 7bit | |
2317 | Subject: [PATCH 1 of 2 fooFlag barFlag] a |
|
2317 | Subject: [PATCH 1 of 2 fooFlag barFlag] a | |
2318 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2318 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2319 | X-Mercurial-Series-Index: 1 |
|
2319 | X-Mercurial-Series-Index: 1 | |
2320 | X-Mercurial-Series-Total: 2 |
|
2320 | X-Mercurial-Series-Total: 2 | |
2321 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2321 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2322 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2322 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2323 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2323 | In-Reply-To: <patchbomb.60@test-hostname> | |
2324 | References: <patchbomb.60@test-hostname> |
|
2324 | References: <patchbomb.60@test-hostname> | |
2325 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2325 | User-Agent: Mercurial-patchbomb/* (glob) | |
2326 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
2326 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
2327 | From: quux |
|
2327 | From: quux | |
2328 | To: foo |
|
2328 | To: foo | |
2329 | Cc: bar |
|
2329 | Cc: bar | |
2330 |
|
2330 | |||
2331 | # HG changeset patch |
|
2331 | # HG changeset patch | |
2332 | # User test |
|
2332 | # User test | |
2333 | # Date 1 0 |
|
2333 | # Date 1 0 | |
2334 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2334 | # Thu Jan 01 00:00:01 1970 +0000 | |
2335 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2335 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2336 | # Parent 0000000000000000000000000000000000000000 |
|
2336 | # Parent 0000000000000000000000000000000000000000 | |
2337 | a |
|
2337 | a | |
2338 |
|
2338 | |||
2339 | diff -r 000000000000 -r 8580ff50825a a |
|
2339 | diff -r 000000000000 -r 8580ff50825a a | |
2340 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2340 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2341 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2341 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2342 | @@ -0,0 +1,1 @@ |
|
2342 | @@ -0,0 +1,1 @@ | |
2343 | +a |
|
2343 | +a | |
2344 |
|
2344 | |||
2345 | displaying [PATCH 2 of 2 fooFlag barFlag] b ... |
|
2345 | displaying [PATCH 2 of 2 fooFlag barFlag] b ... | |
2346 | MIME-Version: 1.0 |
|
2346 | MIME-Version: 1.0 | |
2347 | Content-Type: text/plain; charset="us-ascii" |
|
2347 | Content-Type: text/plain; charset="us-ascii" | |
2348 | Content-Transfer-Encoding: 7bit |
|
2348 | Content-Transfer-Encoding: 7bit | |
2349 | Subject: [PATCH 2 of 2 fooFlag barFlag] b |
|
2349 | Subject: [PATCH 2 of 2 fooFlag barFlag] b | |
2350 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2350 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2351 | X-Mercurial-Series-Index: 2 |
|
2351 | X-Mercurial-Series-Index: 2 | |
2352 | X-Mercurial-Series-Total: 2 |
|
2352 | X-Mercurial-Series-Total: 2 | |
2353 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
2353 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
2354 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2354 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2355 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2355 | In-Reply-To: <patchbomb.60@test-hostname> | |
2356 | References: <patchbomb.60@test-hostname> |
|
2356 | References: <patchbomb.60@test-hostname> | |
2357 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2357 | User-Agent: Mercurial-patchbomb/* (glob) | |
2358 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
2358 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
2359 | From: quux |
|
2359 | From: quux | |
2360 | To: foo |
|
2360 | To: foo | |
2361 | Cc: bar |
|
2361 | Cc: bar | |
2362 |
|
2362 | |||
2363 | # HG changeset patch |
|
2363 | # HG changeset patch | |
2364 | # User test |
|
2364 | # User test | |
2365 | # Date 2 0 |
|
2365 | # Date 2 0 | |
2366 | # Thu Jan 01 00:00:02 1970 +0000 |
|
2366 | # Thu Jan 01 00:00:02 1970 +0000 | |
2367 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2367 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2368 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2368 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2369 | b |
|
2369 | b | |
2370 |
|
2370 | |||
2371 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
2371 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
2372 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2372 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2373 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
2373 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
2374 | @@ -0,0 +1,1 @@ |
|
2374 | @@ -0,0 +1,1 @@ | |
2375 | +b |
|
2375 | +b | |
2376 |
|
2376 | |||
2377 |
|
2377 | |||
2378 | test multi-address parsing: |
|
2378 | test multi-address parsing: | |
2379 | $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \ |
|
2379 | $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \ | |
2380 | > -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \ |
|
2380 | > -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \ | |
2381 | > --config email.bcc='"Quux, A." <quux>' |
|
2381 | > --config email.bcc='"Quux, A." <quux>' | |
2382 | this patch series consists of 1 patches. |
|
2382 | this patch series consists of 1 patches. | |
2383 |
|
2383 | |||
2384 |
|
2384 | |||
2385 | sending [PATCH] test ... |
|
2385 | sending [PATCH] test ... | |
2386 | $ cat < tmp.mbox |
|
2386 | $ cat < tmp.mbox | |
2387 | From quux ... ... .. ..:..:.. .... (re) |
|
2387 | From quux ... ... .. ..:..:.. .... (re) | |
2388 | MIME-Version: 1.0 |
|
2388 | MIME-Version: 1.0 | |
2389 | Content-Type: text/plain; charset="us-ascii" |
|
2389 | Content-Type: text/plain; charset="us-ascii" | |
2390 | Content-Transfer-Encoding: 7bit |
|
2390 | Content-Transfer-Encoding: 7bit | |
2391 | Subject: [PATCH] test |
|
2391 | Subject: [PATCH] test | |
2392 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2392 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2393 | X-Mercurial-Series-Index: 1 |
|
2393 | X-Mercurial-Series-Index: 1 | |
2394 | X-Mercurial-Series-Total: 1 |
|
2394 | X-Mercurial-Series-Total: 1 | |
2395 | Message-Id: <8580ff50825a50c8f716.315532860@test-hostname> |
|
2395 | Message-Id: <8580ff50825a50c8f716.315532860@test-hostname> | |
2396 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname> |
|
2396 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname> | |
2397 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2397 | User-Agent: Mercurial-patchbomb/* (glob) | |
2398 | Date: Tue, 01 Jan 1980 00:01:00 +0000 |
|
2398 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |
2399 | From: quux |
|
2399 | From: quux | |
2400 | To: spam <spam>, eggs, toast |
|
2400 | To: spam <spam>, eggs, toast | |
2401 | Cc: foo, bar@example.com, "A, B <>" <a@example.com> |
|
2401 | Cc: foo, bar@example.com, "A, B <>" <a@example.com> | |
2402 | Bcc: "Quux, A." <quux> |
|
2402 | Bcc: "Quux, A." <quux> | |
2403 |
|
2403 | |||
2404 | # HG changeset patch |
|
2404 | # HG changeset patch | |
2405 | # User test |
|
2405 | # User test | |
2406 | # Date 1 0 |
|
2406 | # Date 1 0 | |
2407 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2407 | # Thu Jan 01 00:00:01 1970 +0000 | |
2408 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2408 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2409 | # Parent 0000000000000000000000000000000000000000 |
|
2409 | # Parent 0000000000000000000000000000000000000000 | |
2410 | a |
|
2410 | a | |
2411 |
|
2411 | |||
2412 | diff -r 000000000000 -r 8580ff50825a a |
|
2412 | diff -r 000000000000 -r 8580ff50825a a | |
2413 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2413 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2414 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2414 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2415 | @@ -0,0 +1,1 @@ |
|
2415 | @@ -0,0 +1,1 @@ | |
2416 | +a |
|
2416 | +a | |
2417 |
|
2417 | |||
2418 |
|
2418 | |||
2419 |
|
2419 | |||
2420 | test flag template: |
|
2420 | test flag template: | |
2421 | $ echo foo > intro.text |
|
2421 | $ echo foo > intro.text | |
2422 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0:1 \ |
|
2422 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0:1 \ | |
2423 | > --desc intro.text --subject test \ |
|
2423 | > --desc intro.text --subject test \ | |
2424 | > --config patchbomb.flagtemplate='R{rev}' |
|
2424 | > --config patchbomb.flagtemplate='R{rev}' | |
2425 | this patch series consists of 2 patches. |
|
2425 | this patch series consists of 2 patches. | |
2426 |
|
2426 | |||
2427 | Cc: |
|
2427 | Cc: | |
2428 |
|
2428 | |||
2429 | displaying [PATCH 0 of 2 R1] test ... |
|
2429 | displaying [PATCH 0 of 2 R1] test ... | |
2430 | MIME-Version: 1.0 |
|
2430 | MIME-Version: 1.0 | |
2431 | Content-Type: text/plain; charset="us-ascii" |
|
2431 | Content-Type: text/plain; charset="us-ascii" | |
2432 | Content-Transfer-Encoding: 7bit |
|
2432 | Content-Transfer-Encoding: 7bit | |
2433 | Subject: [PATCH 0 of 2 R1] test |
|
2433 | Subject: [PATCH 0 of 2 R1] test | |
2434 | Message-Id: <patchbomb.60@test-hostname> |
|
2434 | Message-Id: <patchbomb.60@test-hostname> | |
2435 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2435 | User-Agent: Mercurial-patchbomb/* (glob) | |
2436 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2436 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2437 | From: quux |
|
2437 | From: quux | |
2438 | To: foo |
|
2438 | To: foo | |
2439 |
|
2439 | |||
2440 | foo |
|
2440 | foo | |
2441 |
|
2441 | |||
2442 | displaying [PATCH 1 of 2 R0] a ... |
|
2442 | displaying [PATCH 1 of 2 R0] a ... | |
2443 | MIME-Version: 1.0 |
|
2443 | MIME-Version: 1.0 | |
2444 | Content-Type: text/plain; charset="us-ascii" |
|
2444 | Content-Type: text/plain; charset="us-ascii" | |
2445 | Content-Transfer-Encoding: 7bit |
|
2445 | Content-Transfer-Encoding: 7bit | |
2446 | Subject: [PATCH 1 of 2 R0] a |
|
2446 | Subject: [PATCH 1 of 2 R0] a | |
2447 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2447 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2448 | X-Mercurial-Series-Index: 1 |
|
2448 | X-Mercurial-Series-Index: 1 | |
2449 | X-Mercurial-Series-Total: 2 |
|
2449 | X-Mercurial-Series-Total: 2 | |
2450 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2450 | Message-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2451 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2451 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2452 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2452 | In-Reply-To: <patchbomb.60@test-hostname> | |
2453 | References: <patchbomb.60@test-hostname> |
|
2453 | References: <patchbomb.60@test-hostname> | |
2454 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2454 | User-Agent: Mercurial-patchbomb/* (glob) | |
2455 | Date: Thu, 01 Jan 1970 00:01:01 +0000 |
|
2455 | Date: Thu, 01 Jan 1970 00:01:01 +0000 | |
2456 | From: quux |
|
2456 | From: quux | |
2457 | To: foo |
|
2457 | To: foo | |
2458 |
|
2458 | |||
2459 | # HG changeset patch |
|
2459 | # HG changeset patch | |
2460 | # User test |
|
2460 | # User test | |
2461 | # Date 1 0 |
|
2461 | # Date 1 0 | |
2462 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2462 | # Thu Jan 01 00:00:01 1970 +0000 | |
2463 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2463 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2464 | # Parent 0000000000000000000000000000000000000000 |
|
2464 | # Parent 0000000000000000000000000000000000000000 | |
2465 | a |
|
2465 | a | |
2466 |
|
2466 | |||
2467 | diff -r 000000000000 -r 8580ff50825a a |
|
2467 | diff -r 000000000000 -r 8580ff50825a a | |
2468 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2468 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2469 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2469 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2470 | @@ -0,0 +1,1 @@ |
|
2470 | @@ -0,0 +1,1 @@ | |
2471 | +a |
|
2471 | +a | |
2472 |
|
2472 | |||
2473 | displaying [PATCH 2 of 2 R1] b ... |
|
2473 | displaying [PATCH 2 of 2 R1] b ... | |
2474 | MIME-Version: 1.0 |
|
2474 | MIME-Version: 1.0 | |
2475 | Content-Type: text/plain; charset="us-ascii" |
|
2475 | Content-Type: text/plain; charset="us-ascii" | |
2476 | Content-Transfer-Encoding: 7bit |
|
2476 | Content-Transfer-Encoding: 7bit | |
2477 | Subject: [PATCH 2 of 2 R1] b |
|
2477 | Subject: [PATCH 2 of 2 R1] b | |
2478 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2478 | X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2479 | X-Mercurial-Series-Index: 2 |
|
2479 | X-Mercurial-Series-Index: 2 | |
2480 | X-Mercurial-Series-Total: 2 |
|
2480 | X-Mercurial-Series-Total: 2 | |
2481 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> |
|
2481 | Message-Id: <97d72e5f12c7e84f8506.62@test-hostname> | |
2482 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> |
|
2482 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.61@test-hostname> | |
2483 | In-Reply-To: <patchbomb.60@test-hostname> |
|
2483 | In-Reply-To: <patchbomb.60@test-hostname> | |
2484 | References: <patchbomb.60@test-hostname> |
|
2484 | References: <patchbomb.60@test-hostname> | |
2485 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2485 | User-Agent: Mercurial-patchbomb/* (glob) | |
2486 | Date: Thu, 01 Jan 1970 00:01:02 +0000 |
|
2486 | Date: Thu, 01 Jan 1970 00:01:02 +0000 | |
2487 | From: quux |
|
2487 | From: quux | |
2488 | To: foo |
|
2488 | To: foo | |
2489 |
|
2489 | |||
2490 | # HG changeset patch |
|
2490 | # HG changeset patch | |
2491 | # User test |
|
2491 | # User test | |
2492 | # Date 2 0 |
|
2492 | # Date 2 0 | |
2493 | # Thu Jan 01 00:00:02 1970 +0000 |
|
2493 | # Thu Jan 01 00:00:02 1970 +0000 | |
2494 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2494 | # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2495 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2495 | # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2496 | b |
|
2496 | b | |
2497 |
|
2497 | |||
2498 | diff -r 8580ff50825a -r 97d72e5f12c7 b |
|
2498 | diff -r 8580ff50825a -r 97d72e5f12c7 b | |
2499 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2499 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2500 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
2500 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
2501 | @@ -0,0 +1,1 @@ |
|
2501 | @@ -0,0 +1,1 @@ | |
2502 | +b |
|
2502 | +b | |
2503 |
|
2503 | |||
2504 |
|
2504 | |||
2505 | test flag template plus --flag: |
|
2505 | test flag template plus --flag: | |
2506 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0 --flag 'V2' \ |
|
2506 | $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -r 0 --flag 'V2' \ | |
2507 | > --config patchbomb.flagtemplate='{branch} {flags}' |
|
2507 | > --config patchbomb.flagtemplate='{branch} {flags}' | |
2508 | this patch series consists of 1 patches. |
|
2508 | this patch series consists of 1 patches. | |
2509 |
|
2509 | |||
2510 | Cc: |
|
2510 | Cc: | |
2511 |
|
2511 | |||
2512 | displaying [PATCH default V2] a ... |
|
2512 | displaying [PATCH default V2] a ... | |
2513 | MIME-Version: 1.0 |
|
2513 | MIME-Version: 1.0 | |
2514 | Content-Type: text/plain; charset="us-ascii" |
|
2514 | Content-Type: text/plain; charset="us-ascii" | |
2515 | Content-Transfer-Encoding: 7bit |
|
2515 | Content-Transfer-Encoding: 7bit | |
2516 | Subject: [PATCH default V2] a |
|
2516 | Subject: [PATCH default V2] a | |
2517 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2517 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2518 | X-Mercurial-Series-Index: 1 |
|
2518 | X-Mercurial-Series-Index: 1 | |
2519 | X-Mercurial-Series-Total: 1 |
|
2519 | X-Mercurial-Series-Total: 1 | |
2520 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
2520 | Message-Id: <8580ff50825a50c8f716.60@test-hostname> | |
2521 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> |
|
2521 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.60@test-hostname> | |
2522 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2522 | User-Agent: Mercurial-patchbomb/* (glob) | |
2523 | Date: Thu, 01 Jan 1970 00:01:00 +0000 |
|
2523 | Date: Thu, 01 Jan 1970 00:01:00 +0000 | |
2524 | From: quux |
|
2524 | From: quux | |
2525 | To: foo |
|
2525 | To: foo | |
2526 |
|
2526 | |||
2527 | # HG changeset patch |
|
2527 | # HG changeset patch | |
2528 | # User test |
|
2528 | # User test | |
2529 | # Date 1 0 |
|
2529 | # Date 1 0 | |
2530 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2530 | # Thu Jan 01 00:00:01 1970 +0000 | |
2531 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2531 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2532 | # Parent 0000000000000000000000000000000000000000 |
|
2532 | # Parent 0000000000000000000000000000000000000000 | |
2533 | a |
|
2533 | a | |
2534 |
|
2534 | |||
2535 | diff -r 000000000000 -r 8580ff50825a a |
|
2535 | diff -r 000000000000 -r 8580ff50825a a | |
2536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2537 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2537 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2538 | @@ -0,0 +1,1 @@ |
|
2538 | @@ -0,0 +1,1 @@ | |
2539 | +a |
|
2539 | +a | |
2540 |
|
2540 | |||
2541 |
|
2541 | |||
2542 | test multi-byte domain parsing: |
|
2542 | test multi-byte domain parsing: | |
2543 | >>> with open('toaddress.txt', 'wb') as f: |
|
2543 | >>> with open('toaddress.txt', 'wb') as f: | |
2544 | ... f.write(b'bar@\xfcnicode.com') and None |
|
2544 | ... f.write(b'bar@\xfcnicode.com') and None | |
2545 | $ HGENCODING=iso-8859-1 |
|
2545 | $ HGENCODING=iso-8859-1 | |
2546 | $ export HGENCODING |
|
2546 | $ export HGENCODING | |
2547 | $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "`cat toaddress.txt`" -s test -r 0 |
|
2547 | $ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "`cat toaddress.txt`" -s test -r 0 | |
2548 | this patch series consists of 1 patches. |
|
2548 | this patch series consists of 1 patches. | |
2549 |
|
2549 | |||
2550 | Cc: |
|
2550 | Cc: | |
2551 |
|
2551 | |||
2552 | sending [PATCH] test ... |
|
2552 | sending [PATCH] test ... | |
2553 |
|
2553 | |||
2554 | $ cat tmp.mbox |
|
2554 | $ cat tmp.mbox | |
2555 | From quux ... ... .. ..:..:.. .... (re) |
|
2555 | From quux ... ... .. ..:..:.. .... (re) | |
2556 | MIME-Version: 1.0 |
|
2556 | MIME-Version: 1.0 | |
2557 | Content-Type: text/plain; charset="us-ascii" |
|
2557 | Content-Type: text/plain; charset="us-ascii" | |
2558 | Content-Transfer-Encoding: 7bit |
|
2558 | Content-Transfer-Encoding: 7bit | |
2559 | Subject: [PATCH] test |
|
2559 | Subject: [PATCH] test | |
2560 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2560 | X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2561 | X-Mercurial-Series-Index: 1 |
|
2561 | X-Mercurial-Series-Index: 1 | |
2562 | X-Mercurial-Series-Total: 1 |
|
2562 | X-Mercurial-Series-Total: 1 | |
2563 | Message-Id: <8580ff50825a50c8f716.315532860@test-hostname> |
|
2563 | Message-Id: <8580ff50825a50c8f716.315532860@test-hostname> | |
2564 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname> |
|
2564 | X-Mercurial-Series-Id: <8580ff50825a50c8f716.315532860@test-hostname> | |
2565 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2565 | User-Agent: Mercurial-patchbomb/* (glob) | |
2566 | Date: Tue, 01 Jan 1980 00:01:00 +0000 |
|
2566 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |
2567 | From: quux |
|
2567 | From: quux | |
2568 | To: bar@xn--nicode-2ya.com |
|
2568 | To: bar@xn--nicode-2ya.com | |
2569 |
|
2569 | |||
2570 | # HG changeset patch |
|
2570 | # HG changeset patch | |
2571 | # User test |
|
2571 | # User test | |
2572 | # Date 1 0 |
|
2572 | # Date 1 0 | |
2573 | # Thu Jan 01 00:00:01 1970 +0000 |
|
2573 | # Thu Jan 01 00:00:01 1970 +0000 | |
2574 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
2574 | # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab | |
2575 | # Parent 0000000000000000000000000000000000000000 |
|
2575 | # Parent 0000000000000000000000000000000000000000 | |
2576 | a |
|
2576 | a | |
2577 |
|
2577 | |||
2578 | diff -r 000000000000 -r 8580ff50825a a |
|
2578 | diff -r 000000000000 -r 8580ff50825a a | |
2579 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2579 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2580 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
2580 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
2581 | @@ -0,0 +1,1 @@ |
|
2581 | @@ -0,0 +1,1 @@ | |
2582 | +a |
|
2582 | +a | |
2583 |
|
2583 | |||
2584 |
|
2584 | |||
2585 |
|
2585 | |||
2586 | test outgoing: |
|
2586 | test outgoing: | |
2587 | $ hg up 1 |
|
2587 | $ hg up 1 | |
2588 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved |
|
2588 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |
2589 |
|
2589 | |||
2590 | $ hg branch test |
|
2590 | $ hg branch test | |
2591 | marked working directory as branch test |
|
2591 | marked working directory as branch test | |
2592 | (branches are permanent and global, did you want a bookmark?) |
|
2592 | (branches are permanent and global, did you want a bookmark?) | |
2593 |
|
2593 | |||
2594 | $ echo d > d |
|
2594 | $ echo d > d | |
2595 | $ hg add d |
|
2595 | $ hg add d | |
2596 | $ hg ci -md -d '4 0' |
|
2596 | $ hg ci -md -d '4 0' | |
2597 | $ echo d >> d |
|
2597 | $ echo d >> d | |
2598 | $ hg ci -mdd -d '5 0' |
|
2598 | $ hg ci -mdd -d '5 0' | |
2599 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
2599 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" | |
2600 | @ 10:3b6f1ec9dde9 dd |
|
2600 | @ 10:3b6f1ec9dde9 dd | |
2601 | | |
|
2601 | | | |
2602 | o 9:2f9fa9b998c5 d |
|
2602 | o 9:2f9fa9b998c5 d | |
2603 | | |
|
2603 | | | |
2604 | | o 8:7aead2484924 Added tag two, two.diff for changeset ff2c9fa2018b |
|
2604 | | o 8:7aead2484924 Added tag two, two.diff for changeset ff2c9fa2018b | |
2605 | | | |
|
2605 | | | | |
2606 | | o 7:045ca29b1ea2 Added tag one, one.patch for changeset 97d72e5f12c7 |
|
2606 | | o 7:045ca29b1ea2 Added tag one, one.patch for changeset 97d72e5f12c7 | |
2607 | | | |
|
2607 | | | | |
2608 | | o 6:5d5ef15dfe5e Added tag zero, zero.foo for changeset 8580ff50825a |
|
2608 | | o 6:5d5ef15dfe5e Added tag zero, zero.foo for changeset 8580ff50825a | |
2609 | | | |
|
2609 | | | | |
2610 | | o 5:240fb913fc1b isolatin 8-bit encoding |
|
2610 | | o 5:240fb913fc1b isolatin 8-bit encoding | |
2611 | | | |
|
2611 | | | | |
2612 | | o 4:a2ea8fc83dd8 long line |
|
2612 | | o 4:a2ea8fc83dd8 long line | |
2613 | | | |
|
2613 | | | | |
2614 | | o 3:909a00e13e9d utf-8 content |
|
2614 | | o 3:909a00e13e9d utf-8 content | |
2615 | | | |
|
2615 | | | | |
2616 | | o 2:ff2c9fa2018b c |
|
2616 | | o 2:ff2c9fa2018b c | |
2617 | |/ |
|
2617 | |/ | |
2618 | o 1:97d72e5f12c7 b |
|
2618 | o 1:97d72e5f12c7 b | |
2619 | | |
|
2619 | | | |
2620 | o 0:8580ff50825a a |
|
2620 | o 0:8580ff50825a a | |
2621 |
|
2621 | |||
2622 | $ hg phase --force --secret -r 10 |
|
2622 | $ hg phase --force --secret -r 10 | |
2623 | $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 'rev(10) or rev(6)' |
|
2623 | $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 'rev(10) or rev(6)' | |
2624 | comparing with ../t |
|
2624 | comparing with ../t | |
2625 | From [test]: test |
|
2625 | From [test]: test | |
2626 | this patch series consists of 6 patches. |
|
2626 | this patch series consists of 6 patches. | |
2627 |
|
2627 | |||
2628 |
|
2628 | |||
2629 | Write the introductory message for the patch series. |
|
2629 | Write the introductory message for the patch series. | |
2630 |
|
2630 | |||
2631 | Cc: |
|
2631 | Cc: | |
2632 |
|
2632 | |||
2633 | displaying [PATCH 0 of 6] test ... |
|
2633 | displaying [PATCH 0 of 6] test ... | |
2634 | MIME-Version: 1.0 |
|
2634 | MIME-Version: 1.0 | |
2635 | Content-Type: text/plain; charset="us-ascii" |
|
2635 | Content-Type: text/plain; charset="us-ascii" | |
2636 | Content-Transfer-Encoding: 7bit |
|
2636 | Content-Transfer-Encoding: 7bit | |
2637 | Subject: [PATCH 0 of 6] test |
|
2637 | Subject: [PATCH 0 of 6] test | |
2638 | Message-Id: <patchbomb.315532860@test-hostname> |
|
2638 | Message-Id: <patchbomb.315532860@test-hostname> | |
2639 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2639 | User-Agent: Mercurial-patchbomb/* (glob) | |
2640 | Date: Tue, 01 Jan 1980 00:01:00 +0000 |
|
2640 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |
2641 | From: test |
|
2641 | From: test | |
2642 | To: foo |
|
2642 | To: foo | |
2643 |
|
2643 | |||
2644 |
|
2644 | |||
2645 | displaying [PATCH 1 of 6] c ... |
|
2645 | displaying [PATCH 1 of 6] c ... | |
2646 | MIME-Version: 1.0 |
|
2646 | MIME-Version: 1.0 | |
2647 | Content-Type: text/plain; charset="us-ascii" |
|
2647 | Content-Type: text/plain; charset="us-ascii" | |
2648 | Content-Transfer-Encoding: 7bit |
|
2648 | Content-Transfer-Encoding: 7bit | |
2649 | Subject: [PATCH 1 of 6] c |
|
2649 | Subject: [PATCH 1 of 6] c | |
2650 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2650 | X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2651 | X-Mercurial-Series-Index: 1 |
|
2651 | X-Mercurial-Series-Index: 1 | |
2652 | X-Mercurial-Series-Total: 6 |
|
2652 | X-Mercurial-Series-Total: 6 | |
2653 | Message-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2653 | Message-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2654 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2654 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2655 | In-Reply-To: <patchbomb.315532860@test-hostname> |
|
2655 | In-Reply-To: <patchbomb.315532860@test-hostname> | |
2656 | References: <patchbomb.315532860@test-hostname> |
|
2656 | References: <patchbomb.315532860@test-hostname> | |
2657 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2657 | User-Agent: Mercurial-patchbomb/* (glob) | |
2658 | Date: Tue, 01 Jan 1980 00:01:01 +0000 |
|
2658 | Date: Tue, 01 Jan 1980 00:01:01 +0000 | |
2659 | From: test |
|
2659 | From: test | |
2660 | To: foo |
|
2660 | To: foo | |
2661 |
|
2661 | |||
2662 | # HG changeset patch |
|
2662 | # HG changeset patch | |
2663 | # User test |
|
2663 | # User test | |
2664 | # Date 3 0 |
|
2664 | # Date 3 0 | |
2665 | # Thu Jan 01 00:00:03 1970 +0000 |
|
2665 | # Thu Jan 01 00:00:03 1970 +0000 | |
2666 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2666 | # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2667 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2667 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2668 | c |
|
2668 | c | |
2669 |
|
2669 | |||
2670 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c |
|
2670 | diff -r 97d72e5f12c7 -r ff2c9fa2018b c | |
2671 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2671 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2672 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 |
|
2672 | +++ b/c Thu Jan 01 00:00:03 1970 +0000 | |
2673 | @@ -0,0 +1,1 @@ |
|
2673 | @@ -0,0 +1,1 @@ | |
2674 | +c |
|
2674 | +c | |
2675 |
|
2675 | |||
2676 | displaying [PATCH 2 of 6] utf-8 content ... |
|
2676 | displaying [PATCH 2 of 6] utf-8 content ... | |
2677 | MIME-Version: 1.0 |
|
2677 | MIME-Version: 1.0 | |
2678 | Content-Type: text/plain; charset="iso-8859-1" |
|
2678 | Content-Type: text/plain; charset="iso-8859-1" | |
2679 | Content-Transfer-Encoding: quoted-printable |
|
2679 | Content-Transfer-Encoding: quoted-printable | |
2680 | Subject: [PATCH 2 of 6] utf-8 content |
|
2680 | Subject: [PATCH 2 of 6] utf-8 content | |
2681 | X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
2681 | X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f | |
2682 | X-Mercurial-Series-Index: 2 |
|
2682 | X-Mercurial-Series-Index: 2 | |
2683 | X-Mercurial-Series-Total: 6 |
|
2683 | X-Mercurial-Series-Total: 6 | |
2684 | Message-Id: <909a00e13e9d78b575ae.315532862@test-hostname> |
|
2684 | Message-Id: <909a00e13e9d78b575ae.315532862@test-hostname> | |
2685 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2685 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2686 | In-Reply-To: <patchbomb.315532860@test-hostname> |
|
2686 | In-Reply-To: <patchbomb.315532860@test-hostname> | |
2687 | References: <patchbomb.315532860@test-hostname> |
|
2687 | References: <patchbomb.315532860@test-hostname> | |
2688 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2688 | User-Agent: Mercurial-patchbomb/* (glob) | |
2689 | Date: Tue, 01 Jan 1980 00:01:02 +0000 |
|
2689 | Date: Tue, 01 Jan 1980 00:01:02 +0000 | |
2690 | From: test |
|
2690 | From: test | |
2691 | To: foo |
|
2691 | To: foo | |
2692 |
|
2692 | |||
2693 | # HG changeset patch |
|
2693 | # HG changeset patch | |
2694 | # User test |
|
2694 | # User test | |
2695 | # Date 4 0 |
|
2695 | # Date 4 0 | |
2696 | # Thu Jan 01 00:00:04 1970 +0000 |
|
2696 | # Thu Jan 01 00:00:04 1970 +0000 | |
2697 | # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
2697 | # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f | |
2698 | # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f |
|
2698 | # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f | |
2699 | utf-8 content |
|
2699 | utf-8 content | |
2700 |
|
2700 | |||
2701 | diff -r ff2c9fa2018b -r 909a00e13e9d description |
|
2701 | diff -r ff2c9fa2018b -r 909a00e13e9d description | |
2702 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2702 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2703 | +++ b/description Thu Jan 01 00:00:04 1970 +0000 |
|
2703 | +++ b/description Thu Jan 01 00:00:04 1970 +0000 | |
2704 | @@ -0,0 +1,3 @@ |
|
2704 | @@ -0,0 +1,3 @@ | |
2705 | +a multiline |
|
2705 | +a multiline | |
2706 | + |
|
2706 | + | |
2707 | +description |
|
2707 | +description | |
2708 | diff -r ff2c9fa2018b -r 909a00e13e9d utf |
|
2708 | diff -r ff2c9fa2018b -r 909a00e13e9d utf | |
2709 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2709 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2710 | +++ b/utf Thu Jan 01 00:00:04 1970 +0000 |
|
2710 | +++ b/utf Thu Jan 01 00:00:04 1970 +0000 | |
2711 | @@ -0,0 +1,1 @@ |
|
2711 | @@ -0,0 +1,1 @@ | |
2712 | +h=C3=B6mma! |
|
2712 | +h=C3=B6mma! | |
2713 |
|
2713 | |||
2714 | displaying [PATCH 3 of 6] long line ... |
|
2714 | displaying [PATCH 3 of 6] long line ... | |
2715 | MIME-Version: 1.0 |
|
2715 | MIME-Version: 1.0 | |
2716 | Content-Type: text/plain; charset="us-ascii" |
|
2716 | Content-Type: text/plain; charset="us-ascii" | |
2717 | Content-Transfer-Encoding: quoted-printable |
|
2717 | Content-Transfer-Encoding: quoted-printable | |
2718 | Subject: [PATCH 3 of 6] long line |
|
2718 | Subject: [PATCH 3 of 6] long line | |
2719 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
2719 | X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
2720 | X-Mercurial-Series-Index: 3 |
|
2720 | X-Mercurial-Series-Index: 3 | |
2721 | X-Mercurial-Series-Total: 6 |
|
2721 | X-Mercurial-Series-Total: 6 | |
2722 | Message-Id: <a2ea8fc83dd8b93cfd86.315532863@test-hostname> |
|
2722 | Message-Id: <a2ea8fc83dd8b93cfd86.315532863@test-hostname> | |
2723 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2723 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2724 | In-Reply-To: <patchbomb.315532860@test-hostname> |
|
2724 | In-Reply-To: <patchbomb.315532860@test-hostname> | |
2725 | References: <patchbomb.315532860@test-hostname> |
|
2725 | References: <patchbomb.315532860@test-hostname> | |
2726 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2726 | User-Agent: Mercurial-patchbomb/* (glob) | |
2727 | Date: Tue, 01 Jan 1980 00:01:03 +0000 |
|
2727 | Date: Tue, 01 Jan 1980 00:01:03 +0000 | |
2728 | From: test |
|
2728 | From: test | |
2729 | To: foo |
|
2729 | To: foo | |
2730 |
|
2730 | |||
2731 | # HG changeset patch |
|
2731 | # HG changeset patch | |
2732 | # User test |
|
2732 | # User test | |
2733 | # Date 4 0 |
|
2733 | # Date 4 0 | |
2734 | # Thu Jan 01 00:00:04 1970 +0000 |
|
2734 | # Thu Jan 01 00:00:04 1970 +0000 | |
2735 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
2735 | # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
2736 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f |
|
2736 | # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f | |
2737 | long line |
|
2737 | long line | |
2738 |
|
2738 | |||
2739 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long |
|
2739 | diff -r 909a00e13e9d -r a2ea8fc83dd8 long | |
2740 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2740 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2741 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 |
|
2741 | +++ b/long Thu Jan 01 00:00:04 1970 +0000 | |
2742 | @@ -0,0 +1,4 @@ |
|
2742 | @@ -0,0 +1,4 @@ | |
2743 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2743 | +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2744 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2744 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2745 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2745 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2746 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2746 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2747 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2747 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2748 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2748 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2749 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2749 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2750 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2750 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2751 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2751 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2752 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2752 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2753 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2753 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2754 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2754 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2755 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= |
|
2755 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx= | |
2756 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
|
2756 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
2757 | +foo |
|
2757 | +foo | |
2758 | + |
|
2758 | + | |
2759 | +bar |
|
2759 | +bar | |
2760 |
|
2760 | |||
2761 | displaying [PATCH 4 of 6] isolatin 8-bit encoding ... |
|
2761 | displaying [PATCH 4 of 6] isolatin 8-bit encoding ... | |
2762 | MIME-Version: 1.0 |
|
2762 | MIME-Version: 1.0 | |
2763 | Content-Type: text/plain; charset="iso-8859-1" |
|
2763 | Content-Type: text/plain; charset="iso-8859-1" | |
2764 | Content-Transfer-Encoding: quoted-printable |
|
2764 | Content-Transfer-Encoding: quoted-printable | |
2765 | Subject: [PATCH 4 of 6] isolatin 8-bit encoding |
|
2765 | Subject: [PATCH 4 of 6] isolatin 8-bit encoding | |
2766 | X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 |
|
2766 | X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 | |
2767 | X-Mercurial-Series-Index: 4 |
|
2767 | X-Mercurial-Series-Index: 4 | |
2768 | X-Mercurial-Series-Total: 6 |
|
2768 | X-Mercurial-Series-Total: 6 | |
2769 | Message-Id: <240fb913fc1b7ff15ddb.315532864@test-hostname> |
|
2769 | Message-Id: <240fb913fc1b7ff15ddb.315532864@test-hostname> | |
2770 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2770 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2771 | In-Reply-To: <patchbomb.315532860@test-hostname> |
|
2771 | In-Reply-To: <patchbomb.315532860@test-hostname> | |
2772 | References: <patchbomb.315532860@test-hostname> |
|
2772 | References: <patchbomb.315532860@test-hostname> | |
2773 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2773 | User-Agent: Mercurial-patchbomb/* (glob) | |
2774 | Date: Tue, 01 Jan 1980 00:01:04 +0000 |
|
2774 | Date: Tue, 01 Jan 1980 00:01:04 +0000 | |
2775 | From: test |
|
2775 | From: test | |
2776 | To: foo |
|
2776 | To: foo | |
2777 |
|
2777 | |||
2778 | # HG changeset patch |
|
2778 | # HG changeset patch | |
2779 | # User test |
|
2779 | # User test | |
2780 | # Date 5 0 |
|
2780 | # Date 5 0 | |
2781 | # Thu Jan 01 00:00:05 1970 +0000 |
|
2781 | # Thu Jan 01 00:00:05 1970 +0000 | |
2782 | # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 |
|
2782 | # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 | |
2783 | # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 |
|
2783 | # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 | |
2784 | isolatin 8-bit encoding |
|
2784 | isolatin 8-bit encoding | |
2785 |
|
2785 | |||
2786 | diff -r a2ea8fc83dd8 -r 240fb913fc1b isolatin |
|
2786 | diff -r a2ea8fc83dd8 -r 240fb913fc1b isolatin | |
2787 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2787 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2788 | +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000 |
|
2788 | +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000 | |
2789 | @@ -0,0 +1,1 @@ |
|
2789 | @@ -0,0 +1,1 @@ | |
2790 | +h=F6mma! |
|
2790 | +h=F6mma! | |
2791 |
|
2791 | |||
2792 | displaying [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a ... |
|
2792 | displaying [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a ... | |
2793 | MIME-Version: 1.0 |
|
2793 | MIME-Version: 1.0 | |
2794 | Content-Type: text/plain; charset="us-ascii" |
|
2794 | Content-Type: text/plain; charset="us-ascii" | |
2795 | Content-Transfer-Encoding: 7bit |
|
2795 | Content-Transfer-Encoding: 7bit | |
2796 | Subject: [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a |
|
2796 | Subject: [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a | |
2797 | X-Mercurial-Node: 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433 |
|
2797 | X-Mercurial-Node: 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433 | |
2798 | X-Mercurial-Series-Index: 5 |
|
2798 | X-Mercurial-Series-Index: 5 | |
2799 | X-Mercurial-Series-Total: 6 |
|
2799 | X-Mercurial-Series-Total: 6 | |
2800 | Message-Id: <5d5ef15dfe5e7bd3a4ee.315532865@test-hostname> |
|
2800 | Message-Id: <5d5ef15dfe5e7bd3a4ee.315532865@test-hostname> | |
2801 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2801 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2802 | In-Reply-To: <patchbomb.315532860@test-hostname> |
|
2802 | In-Reply-To: <patchbomb.315532860@test-hostname> | |
2803 | References: <patchbomb.315532860@test-hostname> |
|
2803 | References: <patchbomb.315532860@test-hostname> | |
2804 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2804 | User-Agent: Mercurial-patchbomb/* (glob) | |
2805 | Date: Tue, 01 Jan 1980 00:01:05 +0000 |
|
2805 | Date: Tue, 01 Jan 1980 00:01:05 +0000 | |
2806 | From: test |
|
2806 | From: test | |
2807 | To: foo |
|
2807 | To: foo | |
2808 |
|
2808 | |||
2809 | # HG changeset patch |
|
2809 | # HG changeset patch | |
2810 | # User test |
|
2810 | # User test | |
2811 | # Date 0 0 |
|
2811 | # Date 0 0 | |
2812 | # Thu Jan 01 00:00:00 1970 +0000 |
|
2812 | # Thu Jan 01 00:00:00 1970 +0000 | |
2813 | # Node ID 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433 |
|
2813 | # Node ID 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433 | |
2814 | # Parent 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 |
|
2814 | # Parent 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 | |
2815 | Added tag zero, zero.foo for changeset 8580ff50825a |
|
2815 | Added tag zero, zero.foo for changeset 8580ff50825a | |
2816 |
|
2816 | |||
2817 | diff -r 240fb913fc1b -r 5d5ef15dfe5e .hgtags |
|
2817 | diff -r 240fb913fc1b -r 5d5ef15dfe5e .hgtags | |
2818 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2818 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2819 | +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 |
|
2819 | +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 | |
2820 | @@ -0,0 +1,2 @@ |
|
2820 | @@ -0,0 +1,2 @@ | |
2821 | +8580ff50825a50c8f716709acdf8de0deddcd6ab zero |
|
2821 | +8580ff50825a50c8f716709acdf8de0deddcd6ab zero | |
2822 | +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo |
|
2822 | +8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo | |
2823 |
|
2823 | |||
2824 | displaying [PATCH 6 of 6] d ... |
|
2824 | displaying [PATCH 6 of 6] d ... | |
2825 | MIME-Version: 1.0 |
|
2825 | MIME-Version: 1.0 | |
2826 | Content-Type: text/plain; charset="us-ascii" |
|
2826 | Content-Type: text/plain; charset="us-ascii" | |
2827 | Content-Transfer-Encoding: 7bit |
|
2827 | Content-Transfer-Encoding: 7bit | |
2828 | Subject: [PATCH 6 of 6] d |
|
2828 | Subject: [PATCH 6 of 6] d | |
2829 | X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 |
|
2829 | X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 | |
2830 | X-Mercurial-Series-Index: 6 |
|
2830 | X-Mercurial-Series-Index: 6 | |
2831 | X-Mercurial-Series-Total: 6 |
|
2831 | X-Mercurial-Series-Total: 6 | |
2832 | Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@test-hostname> |
|
2832 | Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@test-hostname> | |
2833 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> |
|
2833 | X-Mercurial-Series-Id: <ff2c9fa2018b15fa74b3.315532861@test-hostname> | |
2834 | In-Reply-To: <patchbomb.315532860@test-hostname> |
|
2834 | In-Reply-To: <patchbomb.315532860@test-hostname> | |
2835 | References: <patchbomb.315532860@test-hostname> |
|
2835 | References: <patchbomb.315532860@test-hostname> | |
2836 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2836 | User-Agent: Mercurial-patchbomb/* (glob) | |
2837 | Date: Tue, 01 Jan 1980 00:01:06 +0000 |
|
2837 | Date: Tue, 01 Jan 1980 00:01:06 +0000 | |
2838 | From: test |
|
2838 | From: test | |
2839 | To: foo |
|
2839 | To: foo | |
2840 |
|
2840 | |||
2841 | # HG changeset patch |
|
2841 | # HG changeset patch | |
2842 | # User test |
|
2842 | # User test | |
2843 | # Date 4 0 |
|
2843 | # Date 4 0 | |
2844 | # Thu Jan 01 00:00:04 1970 +0000 |
|
2844 | # Thu Jan 01 00:00:04 1970 +0000 | |
2845 | # Branch test |
|
2845 | # Branch test | |
2846 | # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 |
|
2846 | # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 | |
2847 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2847 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2848 | d |
|
2848 | d | |
2849 |
|
2849 | |||
2850 | diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d |
|
2850 | diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d | |
2851 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2851 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2852 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
2852 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
2853 | @@ -0,0 +1,1 @@ |
|
2853 | @@ -0,0 +1,1 @@ | |
2854 | +d |
|
2854 | +d | |
2855 |
|
2855 | |||
2856 |
|
2856 | |||
2857 | Don't prompt for a CC header. |
|
2857 | Don't prompt for a CC header. | |
2858 |
|
2858 | |||
2859 | $ echo "[email]" >> $HGRCPATH |
|
2859 | $ echo "[email]" >> $HGRCPATH | |
2860 | $ echo "cc=" >> $HGRCPATH |
|
2860 | $ echo "cc=" >> $HGRCPATH | |
2861 |
|
2861 | |||
2862 | dest#branch URIs: |
|
2862 | dest#branch URIs: | |
2863 | $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test |
|
2863 | $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test | |
2864 | comparing with ../t |
|
2864 | comparing with ../t | |
2865 | From [test]: test |
|
2865 | From [test]: test | |
2866 | this patch series consists of 1 patches. |
|
2866 | this patch series consists of 1 patches. | |
2867 |
|
2867 | |||
2868 |
|
2868 | |||
2869 | displaying [PATCH] test ... |
|
2869 | displaying [PATCH] test ... | |
2870 | MIME-Version: 1.0 |
|
2870 | MIME-Version: 1.0 | |
2871 | Content-Type: text/plain; charset="us-ascii" |
|
2871 | Content-Type: text/plain; charset="us-ascii" | |
2872 | Content-Transfer-Encoding: 7bit |
|
2872 | Content-Transfer-Encoding: 7bit | |
2873 | Subject: [PATCH] test |
|
2873 | Subject: [PATCH] test | |
2874 | X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 |
|
2874 | X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 | |
2875 | X-Mercurial-Series-Index: 1 |
|
2875 | X-Mercurial-Series-Index: 1 | |
2876 | X-Mercurial-Series-Total: 1 |
|
2876 | X-Mercurial-Series-Total: 1 | |
2877 | Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname> |
|
2877 | Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname> | |
2878 | X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname> |
|
2878 | X-Mercurial-Series-Id: <2f9fa9b998c5fe3ac2bd.315532860@test-hostname> | |
2879 | User-Agent: Mercurial-patchbomb/* (glob) |
|
2879 | User-Agent: Mercurial-patchbomb/* (glob) | |
2880 | Date: Tue, 01 Jan 1980 00:01:00 +0000 |
|
2880 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |
2881 | From: test |
|
2881 | From: test | |
2882 | To: foo |
|
2882 | To: foo | |
2883 |
|
2883 | |||
2884 | # HG changeset patch |
|
2884 | # HG changeset patch | |
2885 | # User test |
|
2885 | # User test | |
2886 | # Date 4 0 |
|
2886 | # Date 4 0 | |
2887 | # Thu Jan 01 00:00:04 1970 +0000 |
|
2887 | # Thu Jan 01 00:00:04 1970 +0000 | |
2888 | # Branch test |
|
2888 | # Branch test | |
2889 | # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 |
|
2889 | # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 | |
2890 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 |
|
2890 | # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 | |
2891 | d |
|
2891 | d | |
2892 |
|
2892 | |||
2893 | diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d |
|
2893 | diff -r 97d72e5f12c7 -r 2f9fa9b998c5 d | |
2894 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
2894 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
2895 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
2895 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
2896 | @@ -0,0 +1,1 @@ |
|
2896 | @@ -0,0 +1,1 @@ | |
2897 | +d |
|
2897 | +d | |
2898 |
|
2898 | |||
2899 | #if no-windows |
|
2899 | #if no-windows | |
2900 |
|
2900 | |||
2901 | Set up a fake sendmail program |
|
2901 | Set up a fake sendmail program | |
2902 |
|
2902 | |||
2903 | $ cat > pretendmail.sh << 'EOF' |
|
2903 | $ cat > pretendmail.sh << 'EOF' | |
2904 | > #!/bin/sh |
|
2904 | > #!/bin/sh | |
2905 | > echo "$@" |
|
2905 | > echo "$@" | |
2906 | > cat |
|
2906 | > cat | |
2907 | > EOF |
|
2907 | > EOF | |
2908 | $ chmod +x pretendmail.sh |
|
2908 | $ chmod +x pretendmail.sh | |
2909 |
|
2909 | |||
2910 | $ echo '[email]' >> $HGRCPATH |
|
2910 | $ echo '[email]' >> $HGRCPATH | |
2911 | $ echo "method=`pwd`/pretendmail.sh" >> $HGRCPATH |
|
2911 | $ echo "method=`pwd`/pretendmail.sh" >> $HGRCPATH | |
2912 |
|
2912 | |||
2913 | Test introduction configuration |
|
2913 | Test introduction configuration | |
2914 | ================================= |
|
2914 | ================================= | |
2915 |
|
2915 | |||
2916 | $ echo '[patchbomb]' >> $HGRCPATH |
|
2916 | $ echo '[patchbomb]' >> $HGRCPATH | |
2917 |
|
2917 | |||
2918 | "auto" setting |
|
2918 | "auto" setting | |
2919 | ---------------- |
|
2919 | ---------------- | |
2920 |
|
2920 | |||
2921 | $ echo 'intro=auto' >> $HGRCPATH |
|
2921 | $ echo 'intro=auto' >> $HGRCPATH | |
2922 |
|
2922 | |||
2923 | single rev |
|
2923 | single rev | |
2924 |
|
2924 | |||
2925 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series." |
|
2925 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series." | |
2926 | [1] |
|
2926 | [1] | |
2927 |
|
2927 | |||
2928 | single rev + flag |
|
2928 | single rev + flag | |
2929 |
|
2929 | |||
2930 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series." |
|
2930 | $ 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 | Write the introductory message for the patch series. |
|
2931 | Write the introductory message for the patch series. | |
2932 |
|
2932 | |||
2933 |
|
2933 | |||
2934 | Multi rev |
|
2934 | Multi rev | |
2935 |
|
2935 | |||
2936 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series." |
|
2936 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series." | |
2937 | Write the introductory message for the patch series. |
|
2937 | Write the introductory message for the patch series. | |
2938 |
|
2938 | |||
2939 | "never" setting |
|
2939 | "never" setting | |
2940 | ----------------- |
|
2940 | ----------------- | |
2941 |
|
2941 | |||
2942 | $ echo 'intro=never' >> $HGRCPATH |
|
2942 | $ echo 'intro=never' >> $HGRCPATH | |
2943 |
|
2943 | |||
2944 | single rev |
|
2944 | single rev | |
2945 |
|
2945 | |||
2946 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series." |
|
2946 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series." | |
2947 | [1] |
|
2947 | [1] | |
2948 |
|
2948 | |||
2949 | single rev + flag |
|
2949 | single rev + flag | |
2950 |
|
2950 | |||
2951 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series." |
|
2951 | $ 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 | Write the introductory message for the patch series. |
|
2952 | Write the introductory message for the patch series. | |
2953 |
|
2953 | |||
2954 |
|
2954 | |||
2955 | Multi rev |
|
2955 | Multi rev | |
2956 |
|
2956 | |||
2957 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series." |
|
2957 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series." | |
2958 | [1] |
|
2958 | [1] | |
2959 |
|
2959 | |||
2960 | Multi rev + flag |
|
2960 | Multi rev + flag | |
2961 |
|
2961 | |||
2962 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' --intro | grep "Write the introductory message for the patch series." |
|
2962 | $ 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 | Write the introductory message for the patch series. |
|
2963 | Write the introductory message for the patch series. | |
2964 |
|
2964 | |||
2965 | "always" setting |
|
2965 | "always" setting | |
2966 | ----------------- |
|
2966 | ----------------- | |
2967 |
|
2967 | |||
2968 | $ echo 'intro=always' >> $HGRCPATH |
|
2968 | $ echo 'intro=always' >> $HGRCPATH | |
2969 |
|
2969 | |||
2970 | single rev |
|
2970 | single rev | |
2971 |
|
2971 | |||
2972 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series." |
|
2972 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep "Write the introductory message for the patch series." | |
2973 | Write the introductory message for the patch series. |
|
2973 | Write the introductory message for the patch series. | |
2974 |
|
2974 | |||
2975 | single rev + flag |
|
2975 | single rev + flag | |
2976 |
|
2976 | |||
2977 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' --intro | grep "Write the introductory message for the patch series." |
|
2977 | $ 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 | Write the introductory message for the patch series. |
|
2978 | Write the introductory message for the patch series. | |
2979 |
|
2979 | |||
2980 |
|
2980 | |||
2981 | Multi rev |
|
2981 | Multi rev | |
2982 |
|
2982 | |||
2983 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series." |
|
2983 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' | grep "Write the introductory message for the patch series." | |
2984 | Write the introductory message for the patch series. |
|
2984 | Write the introductory message for the patch series. | |
2985 |
|
2985 | |||
2986 | Multi rev + flag |
|
2986 | Multi rev + flag | |
2987 |
|
2987 | |||
2988 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '9::' --intro | grep "Write the introductory message for the patch series." |
|
2988 | $ 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 | Write the introductory message for the patch series. |
|
2989 | Write the introductory message for the patch series. | |
2990 |
|
2990 | |||
2991 | bad value setting |
|
2991 | bad value setting | |
2992 | ----------------- |
|
2992 | ----------------- | |
2993 |
|
2993 | |||
2994 | $ echo 'intro=mpmwearaclownnose' >> $HGRCPATH |
|
2994 | $ echo 'intro=mpmwearaclownnose' >> $HGRCPATH | |
2995 |
|
2995 | |||
2996 | single rev |
|
2996 | single rev | |
2997 |
|
2997 | |||
2998 | $ hg email --date '1980-1-1 0:1' -v -t foo -s test -r '10' |
|
2998 | $ hg email --date '1980-1-1 0:1' -v -t foo -s test -r '10' | |
2999 | From [test]: test |
|
2999 | From [test]: test | |
3000 | this patch series consists of 1 patches. |
|
3000 | this patch series consists of 1 patches. | |
3001 |
|
3001 | |||
3002 | warning: invalid patchbomb.intro value "mpmwearaclownnose" |
|
3002 | warning: invalid patchbomb.intro value "mpmwearaclownnose" | |
3003 | (should be one of always, never, auto) |
|
3003 | (should be one of always, never, auto) | |
3004 | -f test foo |
|
3004 | -f test foo | |
3005 | MIME-Version: 1.0 |
|
3005 | MIME-Version: 1.0 | |
3006 | Content-Type: text/plain; charset="us-ascii" |
|
3006 | Content-Type: text/plain; charset="us-ascii" | |
3007 | Content-Transfer-Encoding: 7bit |
|
3007 | Content-Transfer-Encoding: 7bit | |
3008 | Subject: [PATCH] test |
|
3008 | Subject: [PATCH] test | |
3009 | X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af |
|
3009 | X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af | |
3010 | X-Mercurial-Series-Index: 1 |
|
3010 | X-Mercurial-Series-Index: 1 | |
3011 | X-Mercurial-Series-Total: 1 |
|
3011 | X-Mercurial-Series-Total: 1 | |
3012 | Message-Id: <3b6f1ec9dde933a40a11*> (glob) |
|
3012 | Message-Id: <3b6f1ec9dde933a40a11*> (glob) | |
3013 | X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.*> (glob) |
|
3013 | X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.*> (glob) | |
3014 | User-Agent: Mercurial-patchbomb/* (glob) |
|
3014 | User-Agent: Mercurial-patchbomb/* (glob) | |
3015 | Date: Tue, 01 Jan 1980 00:01:00 +0000 |
|
3015 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |
3016 | From: test |
|
3016 | From: test | |
3017 | To: foo |
|
3017 | To: foo | |
3018 |
|
3018 | |||
3019 | # HG changeset patch |
|
3019 | # HG changeset patch | |
3020 | # User test |
|
3020 | # User test | |
3021 | # Date 5 0 |
|
3021 | # Date 5 0 | |
3022 | # Thu Jan 01 00:00:05 1970 +0000 |
|
3022 | # Thu Jan 01 00:00:05 1970 +0000 | |
3023 | # Branch test |
|
3023 | # Branch test | |
3024 | # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af |
|
3024 | # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af | |
3025 | # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 |
|
3025 | # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 | |
3026 | dd |
|
3026 | dd | |
3027 |
|
3027 | |||
3028 | diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d |
|
3028 | diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d | |
3029 | --- a/d Thu Jan 01 00:00:04 1970 +0000 |
|
3029 | --- a/d Thu Jan 01 00:00:04 1970 +0000 | |
3030 | +++ b/d Thu Jan 01 00:00:05 1970 +0000 |
|
3030 | +++ b/d Thu Jan 01 00:00:05 1970 +0000 | |
3031 | @@ -1,1 +1,2 @@ |
|
3031 | @@ -1,1 +1,2 @@ | |
3032 | d |
|
3032 | d | |
3033 | +d |
|
3033 | +d | |
3034 |
|
3034 | |||
3035 | sending [PATCH] test ... |
|
3035 | sending [PATCH] test ... | |
3036 | sending mail: $TESTTMP/t2/pretendmail.sh -f test foo |
|
3036 | sending mail: $TESTTMP/t2/pretendmail.sh -f test foo | |
3037 |
|
3037 | |||
|
3038 | Shell characters in addresses | |||
|
3039 | ||||
|
3040 | $ hg email --date '1980-1-1 0:1' -v -t '~foo/bar@example.com' -f 'me*@example.com' -r '10' | |||
|
3041 | this patch series consists of 1 patches. | |||
|
3042 | ||||
|
3043 | warning: invalid patchbomb.intro value "mpmwearaclownnose" | |||
|
3044 | (should be one of always, never, auto) | |||
|
3045 | -f me*@example.com ~foo/bar@example.com | |||
|
3046 | MIME-Version: 1.0 | |||
|
3047 | Content-Type: text/plain; charset="us-ascii" | |||
|
3048 | Content-Transfer-Encoding: 7bit | |||
|
3049 | Subject: [PATCH] dd | |||
|
3050 | X-Mercurial-Node: 3b6f1ec9dde933a40a115a7990f8b320477231af | |||
|
3051 | X-Mercurial-Series-Index: 1 | |||
|
3052 | X-Mercurial-Series-Total: 1 | |||
|
3053 | Message-Id: <3b6f1ec9dde933a40a11.315532860@test-hostname> | |||
|
3054 | X-Mercurial-Series-Id: <3b6f1ec9dde933a40a11.315532860@test-hostname> | |||
|
3055 | User-Agent: Mercurial-patchbomb/* (glob) | |||
|
3056 | Date: Tue, 01 Jan 1980 00:01:00 +0000 | |||
|
3057 | From: me*@example.com | |||
|
3058 | To: ~foo/bar@example.com | |||
|
3059 | ||||
|
3060 | # HG changeset patch | |||
|
3061 | # User test | |||
|
3062 | # Date 5 0 | |||
|
3063 | # Thu Jan 01 00:00:05 1970 +0000 | |||
|
3064 | # Branch test | |||
|
3065 | # Node ID 3b6f1ec9dde933a40a115a7990f8b320477231af | |||
|
3066 | # Parent 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 | |||
|
3067 | dd | |||
|
3068 | ||||
|
3069 | diff -r 2f9fa9b998c5 -r 3b6f1ec9dde9 d | |||
|
3070 | --- a/d Thu Jan 01 00:00:04 1970 +0000 | |||
|
3071 | +++ b/d Thu Jan 01 00:00:05 1970 +0000 | |||
|
3072 | @@ -1,1 +1,2 @@ | |||
|
3073 | d | |||
|
3074 | +d | |||
|
3075 | ||||
|
3076 | sending [PATCH] dd ... | |||
|
3077 | sending mail: $TESTTMP/t2/pretendmail.sh -f 'me*@example.com' '~foo/bar@example.com' | |||
|
3078 | ||||
3038 | Test pull url header |
|
3079 | Test pull url header | |
3039 | ================================= |
|
3080 | ================================= | |
3040 |
|
3081 | |||
3041 | basic version |
|
3082 | basic version | |
3042 |
|
3083 | |||
3043 | $ echo 'intro=auto' >> $HGRCPATH |
|
3084 | $ echo 'intro=auto' >> $HGRCPATH | |
3044 | $ echo "publicurl=$TESTTMP/t2" >> $HGRCPATH |
|
3085 | $ echo "publicurl=$TESTTMP/t2" >> $HGRCPATH | |
3045 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep '^#' |
|
3086 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | grep '^#' | |
3046 | abort: public url $TESTTMP/t2 is missing 3b6f1ec9dde9 |
|
3087 | abort: public url $TESTTMP/t2 is missing 3b6f1ec9dde9 | |
3047 | (use 'hg push $TESTTMP/t2 -r 3b6f1ec9dde9') |
|
3088 | (use 'hg push $TESTTMP/t2 -r 3b6f1ec9dde9') | |
3048 | [1] |
|
3089 | [1] | |
3049 |
|
3090 | |||
3050 | public missing |
|
3091 | public missing | |
3051 |
|
3092 | |||
3052 | $ echo 'publicurl=$TESTTMP/missing' >> $HGRCPATH |
|
3093 | $ echo 'publicurl=$TESTTMP/missing' >> $HGRCPATH | |
3053 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' |
|
3094 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | |
3054 | unable to access public repo: $TESTTMP/missing |
|
3095 | unable to access public repo: $TESTTMP/missing | |
3055 | abort: repository $TESTTMP/missing not found! |
|
3096 | abort: repository $TESTTMP/missing not found! | |
3056 | [255] |
|
3097 | [255] | |
3057 |
|
3098 | |||
3058 | node missing at public |
|
3099 | node missing at public | |
3059 |
|
3100 | |||
3060 | $ hg clone -r '9' . ../t3 |
|
3101 | $ hg clone -r '9' . ../t3 | |
3061 | adding changesets |
|
3102 | adding changesets | |
3062 | adding manifests |
|
3103 | adding manifests | |
3063 | adding file changes |
|
3104 | adding file changes | |
3064 | added 3 changesets with 3 changes to 3 files |
|
3105 | added 3 changesets with 3 changes to 3 files | |
3065 | new changesets 8580ff50825a:2f9fa9b998c5 |
|
3106 | new changesets 8580ff50825a:2f9fa9b998c5 | |
3066 | updating to branch test |
|
3107 | updating to branch test | |
3067 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3108 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
3068 | $ echo 'publicurl=$TESTTMP/t3' >> $HGRCPATH |
|
3109 | $ echo 'publicurl=$TESTTMP/t3' >> $HGRCPATH | |
3069 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' |
|
3110 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '10' | |
3070 | abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9 |
|
3111 | abort: public url $TESTTMP/t3 is missing 3b6f1ec9dde9 | |
3071 | (use 'hg push $TESTTMP/t3 -r 3b6f1ec9dde9') |
|
3112 | (use 'hg push $TESTTMP/t3 -r 3b6f1ec9dde9') | |
3072 | [255] |
|
3113 | [255] | |
3073 |
|
3114 | |||
3074 | multiple heads are missing at public |
|
3115 | multiple heads are missing at public | |
3075 |
|
3116 | |||
3076 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '2+10' |
|
3117 | $ hg email --date '1980-1-1 0:1' -t foo -s test -r '2+10' | |
3077 | abort: public "$TESTTMP/t3" is missing ff2c9fa2018b and 1 others |
|
3118 | abort: public "$TESTTMP/t3" is missing ff2c9fa2018b and 1 others | |
3078 | (use 'hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9') |
|
3119 | (use 'hg push $TESTTMP/t3 -r ff2c9fa2018b -r 3b6f1ec9dde9') | |
3079 | [255] |
|
3120 | [255] | |
3080 |
|
3121 | |||
3081 | #endif |
|
3122 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now