tests/test-notify
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 26 Dec 2006 21:59:01 +0100
changeset 4009 86098ec4b77a
parent 3747 b5c4d749f37f
child 4094 fbf0e9acfd83
permissions -rwxr-xr-x
fix hg help <ext> for extension that do not define any command solve issue462
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
4009
86098ec4b77a fix hg help <ext> for extension that do not define any command
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3747
diff changeset
    25
hg help notify
3740
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
hg init a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
echo a > a/a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    28
echo % commit
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    29
hg --traceback --cwd a commit -Ama -d '0 0'
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    31
echo % clone
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
hg --traceback clone a b
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    34
echo a >> a/a
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
echo % commit
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
hg --traceback --cwd a commit -Amb -d '1 0'
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    37
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    38
echo % pull
aef384dbc731 add test for the notify extension
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    39
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
    40
  -e 's/changeset \([0-9a-f]*\) in .*/changeset \1/'