Mercurial > hg-stable
changeset 8160:094e0d982c8a
patchbomb: add user agent header to mails
author | Henrik Stuart <hg@hstuart.dk> |
---|---|
date | Thu, 23 Apr 2009 08:39:27 +0200 |
parents | 19f22977e635 |
children | 1bb8a75fceb3 |
files | hgext/patchbomb.py tests/test-patchbomb tests/test-patchbomb.out |
diffstat | 3 files changed, 32 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/patchbomb.py Fri Apr 24 19:39:27 2009 +0200 +++ b/hgext/patchbomb.py Thu Apr 23 08:39:27 2009 +0200 @@ -399,6 +399,7 @@ m['References'] = parent else: parent = m['Message-Id'] + m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version() m['Date'] = util.datestr(start_time, "%a, %d %b %Y %H:%M:%S %1%2") start_time = (start_time[0] + 1, start_time[1])
--- a/tests/test-patchbomb Fri Apr 24 19:39:27 2009 +0200 +++ b/tests/test-patchbomb Thu Apr 23 08:39:27 2009 +0200 @@ -5,6 +5,7 @@ sed -e 's/\(Message-Id:.*@\).*/\1/' \ -e 's/\(In-Reply-To:.*@\).*/\1/' \ -e 's/\(References:.*@\).*/\1/' \ + -e 's/\(User-Agent:.*\)\/.*/\1/' \ -e 's/===.*/===/' }
--- a/tests/test-patchbomb.out Fri Apr 24 19:39:27 2009 +0200 +++ b/tests/test-patchbomb.out Thu Apr 23 08:39:27 2009 +0200 @@ -9,6 +9,7 @@ Subject: [PATCH] a X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab Message-Id: <8580ff50825a50c8f716.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -40,6 +41,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 2] test Message-Id: <patchbomb.120@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:02:00 +0000 From: quux To: foo @@ -55,6 +57,7 @@ Message-Id: <8580ff50825a50c8f716.121@ In-Reply-To: <patchbomb.120@ References: <patchbomb.120@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:02:01 +0000 From: quux To: foo @@ -82,6 +85,7 @@ Message-Id: <97d72e5f12c7e84f8506.122@ In-Reply-To: <patchbomb.120@ References: <patchbomb.120@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:02:02 +0000 From: quux To: foo @@ -119,6 +123,7 @@ MIME-Version: 1.0 Subject: test Message-Id: <patchbomb.180@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:03:00 +0000 From: quux To: foo @@ -152,7 +157,7 @@ adding utf % no mime encoding for email --test % md5sum of 8-bit output -ad877786716d09fd7843cf0ed5e3d2a8 mailtest +e726c29b3008e77994c7572563e57c34 mailtest % mime encoded mbox This patch series consists of 1 patches. @@ -165,6 +170,7 @@ Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a Message-Id: <c3c9e37db9f4fe4882cd.240@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:04:00 +0000 From: quux To: foo @@ -190,7 +196,7 @@ Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ... % md5sum of 8-bit output -90fae277a4a85255e8262174fcefb59f mboxfix +40190791e367a851e42f0887b2d9439e mboxfix % test diffstat for single patch This patch series consists of 1 patches. @@ -207,6 +213,7 @@ Subject: [PATCH] test X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f Message-Id: <ff2c9fa2018b15fa74b3.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -258,6 +265,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 2] test Message-Id: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -277,6 +285,7 @@ Message-Id: <8580ff50825a50c8f716.61@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux To: foo @@ -308,6 +317,7 @@ Message-Id: <97d72e5f12c7e84f8506.62@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:02 +0000 From: quux To: foo @@ -340,6 +350,7 @@ Subject: [PATCH] test X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f Message-Id: <ff2c9fa2018b15fa74b3.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -378,6 +389,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 2] test Message-Id: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -392,6 +404,7 @@ Message-Id: <8580ff50825a50c8f716.61@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux To: foo @@ -425,6 +438,7 @@ Message-Id: <97d72e5f12c7e84f8506.62@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:02 +0000 From: quux To: foo @@ -460,6 +474,7 @@ Subject: [PATCH] test X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f Message-Id: <ff2c9fa2018b15fa74b3.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -507,6 +522,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 2] test Message-Id: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -521,6 +537,7 @@ Message-Id: <8580ff50825a50c8f716.61@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux To: foo @@ -563,6 +580,7 @@ Message-Id: <97d72e5f12c7e84f8506.62@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:02 +0000 From: quux To: foo @@ -610,6 +628,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 1] test Message-Id: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -625,6 +644,7 @@ Message-Id: <ff2c9fa2018b15fa74b3.61@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux To: foo @@ -656,6 +676,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 2] test Message-Id: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -671,6 +692,7 @@ Message-Id: <8580ff50825a50c8f716.61@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux To: foo @@ -698,6 +720,7 @@ Message-Id: <97d72e5f12c7e84f8506.62@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:02 +0000 From: quux To: foo @@ -727,6 +750,7 @@ Subject: [PATCH] test X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f Message-Id: <ff2c9fa2018b15fa74b3.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -765,6 +789,7 @@ Content-Transfer-Encoding: 7bit Subject: [PATCH 0 of 2] test Message-Id: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo @@ -779,6 +804,7 @@ Message-Id: <8580ff50825a50c8f716.61@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux To: foo @@ -812,6 +838,7 @@ Message-Id: <97d72e5f12c7e84f8506.62@ In-Reply-To: <patchbomb.60@ References: <patchbomb.60@ +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:02 +0000 From: quux To: foo @@ -850,6 +877,7 @@ Message-Id: <2c502b2db30e1ddd5e4e.60@ In-Reply-To: baz References: baz +User-Agent: Mercurial-patchbomb Date: Thu, 01 Jan 1970 00:01:00 +0000 From: quux To: foo