[PATCH] patchbomb: add user agent header to mails
Henrik Stuart
hg at hstuart.dk
Thu Apr 23 06:18:47 UTC 2009
Martin Geisler wrote:
> Henrik Stuart <hg at hstuart.dk> writes:
>
>> # HG changeset patch
>> # User Henrik Stuart <hg at hstuart.dk>
>> # Date 1240426029 -7200
>> # Node ID 87ffda90c838b2c67b4642a0f96ff62533b5de29
>> # Parent c11636f0609effbb14964a6e8939c2e2d3453450
>> patchbomb: add user agent header to mails
>
> Is there a good use case for this? If it is for sorting mails, then note
> that there is already a X-Mercurial-Node header inserted.
Nothing in particular, no. It mostly just gives you cute little images
on the mails if you're using Thunderbird's "Display mail user agent"
extension - other clients may have something similar.
> If it's just because it looks nice, then inserting the Mercurial version
> number might be fun too, just like most other mail programs do.
diff -r c11636f0609e -r 87ffda90c838 hgext/patchbomb.py
--- a/hgext/patchbomb.py Wed Apr 22 09:11:46 2009 +0200
+++ b/hgext/patchbomb.py Wed Apr 22 20:47:09 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")
Yes, adding that version number would be fun. ;o)
--
Kind regards,
Henrik
More information about the Mercurial-devel
mailing list