##// END OF EJS Templates
patchbomb: with --in-reply-to, still thread message under first in series...
Cédric Duval -
r8514:25223262 default
parent child Browse files
Show More
@@ -397,6 +397,7 b' def patchbomb(ui, repo, *revs, **opts):'
397 ui.write('\n')
397 ui.write('\n')
398
398
399 parent = opts.get('in_reply_to') or None
399 parent = opts.get('in_reply_to') or None
400 first = True
400
401
401 sender_addr = email.Utils.parseaddr(sender)[1]
402 sender_addr = email.Utils.parseaddr(sender)[1]
402 sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
403 sender = mail.addressencode(ui, sender, _charsets, opts.get('test'))
@@ -409,8 +410,10 b' def patchbomb(ui, repo, *revs, **opts):'
409 if parent:
410 if parent:
410 m['In-Reply-To'] = parent
411 m['In-Reply-To'] = parent
411 m['References'] = parent
412 m['References'] = parent
412 else:
413 if first:
413 parent = m['Message-Id']
414 parent = m['Message-Id']
415 first = False
416
414 m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version()
417 m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version()
415 m['Date'] = util.datestr(start_time, "%a, %d %b %Y %H:%M:%S %1%2")
418 m['Date'] = util.datestr(start_time, "%a, %d %b %Y %H:%M:%S %1%2")
416
419
@@ -148,3 +148,6 b" hg email --date '1970-1-1 0:1' -n -f quu"
148 echo "% test inreplyto"
148 echo "% test inreplyto"
149 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
149 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
150 -r tip | fixheaders
150 -r tip | fixheaders
151
152 hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
153 -r 0:1 | fixheaders
@@ -1177,3 +1177,80 b' diff -r eae5fcf795ee -r e317db6a6f28 .hg'
1177 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1177 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
1178 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1178 +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
1179
1179
1180 This patch series consists of 2 patches.
1181
1182
1183 Write the introductory message for the patch series.
1184
1185
1186 Displaying [PATCH 0 of 2] None ...
1187 Content-Type: text/plain; charset="us-ascii"
1188 MIME-Version: 1.0
1189 Content-Transfer-Encoding: 7bit
1190 Subject: [PATCH 0 of 2] None
1191 Message-Id: <patchbomb.60@
1192 In-Reply-To: baz
1193 References: baz
1194 User-Agent: Mercurial-patchbomb
1195 Date: Thu, 01 Jan 1970 00:01:00 +0000
1196 From: quux
1197 To: foo
1198 Cc: bar
1199
1200
1201 Displaying [PATCH 1 of 2] a ...
1202 Content-Type: text/plain; charset="us-ascii"
1203 MIME-Version: 1.0
1204 Content-Transfer-Encoding: 7bit
1205 Subject: [PATCH 1 of 2] a
1206 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
1207 Message-Id: <8580ff50825a50c8f716.61@
1208 In-Reply-To: <patchbomb.60@
1209 References: <patchbomb.60@
1210 User-Agent: Mercurial-patchbomb
1211 Date: Thu, 01 Jan 1970 00:01:01 +0000
1212 From: quux
1213 To: foo
1214 Cc: bar
1215
1216 # HG changeset patch
1217 # User test
1218 # Date 1 0
1219 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
1220 # Parent 0000000000000000000000000000000000000000
1221 a
1222
1223 diff -r 000000000000 -r 8580ff50825a a
1224 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1225 +++ b/a Thu Jan 01 00:00:01 1970 +0000
1226 @@ -0,0 +1,1 @@
1227 +a
1228
1229 Displaying [PATCH 2 of 2] b ...
1230 Content-Type: text/plain; charset="us-ascii"
1231 MIME-Version: 1.0
1232 Content-Transfer-Encoding: 7bit
1233 Subject: [PATCH 2 of 2] b
1234 X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1235 Message-Id: <97d72e5f12c7e84f8506.62@
1236 In-Reply-To: <patchbomb.60@
1237 References: <patchbomb.60@
1238 User-Agent: Mercurial-patchbomb
1239 Date: Thu, 01 Jan 1970 00:01:02 +0000
1240 From: quux
1241 To: foo
1242 Cc: bar
1243
1244 # HG changeset patch
1245 # User test
1246 # Date 2 0
1247 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
1248 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
1249 b
1250
1251 diff -r 8580ff50825a -r 97d72e5f12c7 b
1252 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1253 +++ b/b Thu Jan 01 00:00:02 1970 +0000
1254 @@ -0,0 +1,1 @@
1255 +b
1256
General Comments 0
You need to be logged in to leave comments. Login now