Issue25

Title automate bug closing via commit hook
Priority wish Status resolved
Superseder Nosy List mpm, tonfa
Assigned To mpm Topics

Created on 2005-10-23.03:22:58 by mpm, last changed 2010-02-05.17:50:58 by mpm.

Messages
msg11611 (view) Author: mpm Date: 2010-02-05.17:45:12
This can be done now.

subject: [issue25] [status=testing]
msg11338 (view) Author: mpm Date: 2009-12-31.19:20:42
-- 
http://selenic.com : development and support for Mercurial and Linux
msg9626 (view) Author: mpm Date: 2009-06-20.15:39:34
Yeah, let's close this.
msg9381 (view) Author: tonfa Date: 2009-05-20.17:19:27
I'm not sure we want it -> deffered
msg40 (view) Author: mpm Date: 2005-10-24.22:42:59
This has shell escaping security issues. Better to have a quick Python script.
msg33 (view) Author: tonfa Date: 2005-10-23.13:12:39
I added a (not tested) example commit hook in the wiki
(http://www.selenic.com/mercurial/wiki/index.cgi/CommitHook):

if you add "fix:issueNUMBER" in your changeset description, it will send a mail
to close issueNUMBER.

#!/bin/sh

ISSUE=`hg log -vr $NODE | grep -o "\<fix:[[:alnum:]]*" |head -n 1 | sed s/fix://`
[ -z $ISSUE ] && exit
SUBJECT=`hg log -r $NODE | grep "^summary:" | cut -b 14-`
hg log -vr $NODE | mail -s "[$ISSUE] [status=resolved] commit: $SUBJECT"
roundup@example.com
History
Date User Action Args
2010-02-05 17:50:58mpmsetstatus: testing -> resolved
nosy: mpm, tonfa
2010-02-05 17:45:12mpmsetnosy: mpm, tonfa
messages: + msg11611
2009-12-31 19:20:42mpmsetstatus: resolved -> testing
nosy: mpm, tonfa
messages: + msg11338
2009-06-20 15:39:34mpmsetstatus: deferred -> resolved
nosy: mpm, tonfa
messages: + msg9626
2009-05-20 17:19:27tonfasetstatus: chatting -> deferred
nosy: mpm, tonfa
messages: + msg9381
2005-10-24 22:42:59mpmsetnosy: mpm, tonfa
messages: + msg40
2005-10-23 13:12:39tonfasetstatus: unread -> chatting
nosy: + tonfa
messages: + msg33
2005-10-23 03:22:58mpmcreate