test-notify
56 lines
| 1.1 KiB
| text/plain
|
TextLexer
/ tests / test-notify
|
r3740 | #!/bin/sh | ||
cat <<EOF >> $HGRCPATH | ||||
[extensions] | ||||
notify= | ||||
[hooks] | ||||
incoming.notify = python:hgext.notify.hook | ||||
[notify] | ||||
sources = pull | ||||
|
r3747 | diffstat = False | ||
|
r3740 | |||
[usersubs] | ||||
foo@bar = * | ||||
|
r4094 | |||
[reposubs] | ||||
* = baz | ||||
|
r3740 | EOF | ||
|
r4009 | hg help notify | ||
|
r3740 | hg init a | ||
echo a > a/a | ||||
echo % commit | ||||
hg --traceback --cwd a commit -Ama -d '0 0' | ||||
echo % clone | ||||
hg --traceback clone a b | ||||
echo a >> a/a | ||||
echo % commit | ||||
hg --traceback --cwd a commit -Amb -d '1 0' | ||||
|
r4094 | echo '% pull (minimal config)' | ||
hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \ | ||||
|
r4157 | -e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \ | ||
|
r4479 | -e 's/^details: .*test-notify/details: test-notify/' \ | ||
-e 's/^Date:.*/Date:/' | ||||
|
r4094 | |||
cat <<EOF >> $HGRCPATH | ||||
[notify] | ||||
config = $HGTMP/.notify.conf | ||||
domain = test.com | ||||
strip = 3 | ||||
template = Subject: {desc|firstline|strip}\nFrom: {author}\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip} | ||||
[web] | ||||
baseurl = http://test/ | ||||
EOF | ||||
|
r3740 | echo % pull | ||
|
r4094 | hg --cwd b rollback | ||
|
r3740 | hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \ | ||
|
r4479 | -e 's/changeset \([0-9a-f]*\) in .*/changeset \1/' \ | ||
-e 's/^Date:.*/Date:/' | ||||
|
r4094 | |||