tests/test-notify-changegroup
author Mads Kiilerich <mads@kiilerich.com>
Thu, 09 Jul 2009 23:59:03 +0200
changeset 9110 561ff8d9e4f0
parent 7043 b714aac1f7b3
child 11671 ca6ede0988d5
permissions -rwxr-xr-x
mq: qpop now tells which patches are popped When navigating through a patch series by qpushing and qpopping it was easy to get lost because qpop was silent. I found myself often running qnext after qpop to see which patch I just dropped - especially if I was about to qrm it. This patch makes qpop more symmetric to qpush by showing which patches are applied/"unapplied". I think it is a good change even though it changes output by adding a new line of output.

#!/bin/sh

cat <<EOF >> $HGRCPATH
[extensions]
notify=

[hooks]
changegroup.notify = python:hgext.notify.hook

[notify]
sources = push
diffstat = False
maxsubject = 200

[usersubs]
foo@bar = *

[reposubs]
* = baz
EOF

hg init a

echo % clone
hg --traceback clone a b

echo a > b/a
echo % commit
hg --traceback --cwd b commit -Ama

echo a >> b/a
echo % commit
hg --traceback --cwd b commit -Amb

echo % push
hg --traceback --cwd b push ../a 2>&1 |
    python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
    sed -e 's/\(Message-Id:\).*/\1/' \
        -e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \
        -e 's/^Subject: .*test-notify/Subject: test-notify/' \
        -e 's/^details: .*test-notify/details: test-notify/' \
        -e 's/^Date:.*/Date:/'