# HG changeset patch # User Henrik Stuart # Date 1240468767 -7200 # Node ID 094e0d982c8ae047fa2dc0e441bfdc5821324dea # Parent 19f22977e6359fb9be6a6d407702f26a413e0be5 patchbomb: add user agent header to mails diff -r 19f22977e635 -r 094e0d982c8a hgext/patchbomb.py --- 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]) diff -r 19f22977e635 -r 094e0d982c8a tests/test-patchbomb --- 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/===.*/===/' } diff -r 19f22977e635 -r 094e0d982c8a tests/test-patchbomb.out --- 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: