diff tests/test-notify @ 3740:aef384dbc731

add test for the notify extension
author Matt Mackall <mpm@selenic.com>
date Fri, 01 Dec 2006 01:29:13 -0600
parents
children b5c4d749f37f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-notify	Fri Dec 01 01:29:13 2006 -0600
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+cat <<EOF >> $HGRCPATH
+[extensions]
+notify=
+
+[hooks]
+incoming.notify = python:hgext.notify.hook
+
+[notify]
+config = $HGTMP/.notify.conf
+sources = pull
+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/
+
+[usersubs]
+foo@bar = *
+EOF
+
+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'
+
+echo % pull
+hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \
+  -e 's/changeset \([0-9a-f]*\) in .*/changeset \1/'