tests/test-notify
author Thomas Arendsen Hein <thomas@intevation.de>
Fri, 01 Dec 2006 14:46:05 +0100
changeset 3747 b5c4d749f37f
parent 3740 aef384dbc731
child 4009 86098ec4b77a
permissions -rwxr-xr-x
Fix test-notify for systems without or with a different version of diffstat. Some diffstat versions say "1 file changed", others "1 files changed".
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}
3747
b5c4d749f37f Fix test-notify for systems without or with a different version of diffstat.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3740
diff changeset
    16
diffstat = False
3740
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    17
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
[web]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    19
baseurl = http://test/
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    20
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    21
[usersubs]
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    22
foo@bar = *
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
EOF
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    24
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    25
hg init a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
echo a > a/a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
echo % commit
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    28
hg --traceback --cwd a commit -Ama -d '0 0'
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    29
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
echo % clone
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    31
hg --traceback clone a b
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
echo a >> a/a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    34
echo % commit
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
hg --traceback --cwd a commit -Amb -d '1 0'
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    37
echo % pull
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    38
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
    39
  -e 's/changeset \([0-9a-f]*\) in .*/changeset \1/'