[issue2208] The notify extension template repeats the email subject for every changeset
didlybom
bugs at mercurial.selenic.com
Fri May 21 09:37:36 UTC 2010
New submission from didlybom <didlybom at gmail.com>:
I think I found a bug on the notify extension but it may also be a problem
with the way I configure my notify extension "template" option. If that is
the case please accept my apologies for creating this issue.
If you use the template option of the notify extension to customize the
subject of the email that is sent by mercurial and the notification email
contains several changesets (for instance if it is triggered by a push
affecting multiple changesets), the subject is repeated for each of the
changesets listed in the notification email.
For instance, I configured the notify extension as follows:
[notify]
sources = pull
maxdiff = 0
test = True
config = \\Xilinxsrv2\Mercurial\notify\notify.conf.txt
template = Subject: Mercurial repository '{webroot|basename|strip}'
changed in '{webroot|strip}'\n[Revision {rev}]: {desc|strip}\n
The idea was to set the Subject to "Mercurial repository SHORT_REPO_NAME
changed", and the message body to the revision number followed by the change
description.
Then I ran "hg pull" on one of my repos. The result was as follows (note
that I redacted it a bit to hide the machine and usernames):
c:\Repo_clone> hg pull
pulling from c:\Repo_clone
searching for changes
adding changesets
adding manifests
adding file changes
added 4 changesets with 4 changes to 2 files (+1 heads)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Date: Fri, 21 May 2010 11:09:06 +0200
Subject: Mercurial repository 'Repo_clone' changed in 'c:/Repo_clone...
From: user at server.com
X-Hg-Notification: changeset a9fe7b44de8c
Message-Id: <hg.a9fe7b44de8c.1274432946.-745217469 at machine.server.com>
To: user at server.com
[Revision 19]: New file added
Subject: Mercurial repository 'Repo_clone' changed in 'c:/Repo_clone'
[Revision 20]: Small changes
Subject: Mercurial repository 'Repo_clone' changed in 'c:/Repo_clone'
[Revision 21]: Bugfix
Subject: Mercurial repository 'Repo_clone' changed in 'c:/Repo_clone'
[Revision 22]: Change
diffstat:
sbtest.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
(run 'hg heads' to see heads, 'hg merge' to merge)
As you can see, the subject line is repeated for every changeset. I did not
find in the notify extension documentation any way to change the subject
other than to set the "Subject:" field as I did. That is why I think that
this is a bug. If there is some other way, or if there is no other way but
this is how it is supposed to work then this could be a feature request
rather than a bug report.
Cheers,
Didly
----------
messages: 12619
nosy: didlybom
priority: bug
status: unread
title: The notify extension template repeats the email subject for every changeset
topic: notify
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2208>
____________________________________________________
More information about the Mercurial-devel
mailing list