tests/test-notify
author Matt Mackall <mpm@selenic.com>
Fri, 01 Dec 2006 01:29:13 -0600
changeset 3740 aef384dbc731
child 3747 b5c4d749f37f
permissions -rwxr-xr-x
add test for the notify extension
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3740
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
#!/bin/sh
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
cat <<EOF >> $HGRCPATH
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
[extensions]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
notify=
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     6
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
[hooks]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
incoming.notify = python:hgext.notify.hook
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
[notify]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
config = $HGTMP/.notify.conf
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
sources = pull
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
domain = test.com
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    14
strip = 3
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
template = Subject: {desc|firstline|strip}\nFrom: {author}\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip}
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    16
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    17
[web]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
baseurl = http://test/
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    19
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    20
[usersubs]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    21
foo@bar = *
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    22
EOF
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    24
hg init a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    25
echo a > a/a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
echo % commit
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
hg --traceback --cwd a commit -Ama -d '0 0'
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    28
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    29
echo % clone
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
hg --traceback clone a b
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    31
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
echo a >> a/a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
echo % commit
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    34
hg --traceback --cwd a commit -Amb -d '1 0'
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
echo % pull
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    37
hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    38
  -e 's/changeset \([0-9a-f]*\) in .*/changeset \1/'