Skip to content
Snippets Groups Projects
Commit f213af82 authored by Matt Mackall's avatar Matt Mackall
Browse files

tests: unify test-notify-changegroup

parent 52aac5c5
No related branches found
No related tags found
No related merge requests found
% clone
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
% commit
adding a
% commit
% push
pushing to ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Date:
Subject: test-notify-changegroup
From: test
X-Hg-Notification: changeset cb9a9f314b8b
Message-Id:
To: baz, foo@bar
changeset cb9a9f314b8b in test-notify-changegroup/a
details: test-notify-changegroup/a?cmd=changeset;node=cb9a9f314b8b
summary: a
changeset ba677d0156c1 in test-notify-changegroup/a
details: test-notify-changegroup/a?cmd=changeset;node=ba677d0156c1
summary: b
diffs (6 lines):
diff -r 000000000000 -r ba677d0156c1 a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/a Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,2 @@
+a
+a
#!/bin/sh
cat <<EOF >> $HGRCPATH
[extensions]
notify=
[hooks]
changegroup.notify = python:hgext.notify.hook
......@@ -9,6 +1,21 @@
[notify]
sources = push
diffstat = False
maxsubject = 10
$ cat <<EOF >> $HGRCPATH
> [extensions]
> notify=
>
> [hooks]
> changegroup.notify = python:hgext.notify.hook
>
> [notify]
> sources = push
> diffstat = False
> maxsubject = 10
>
> [usersubs]
> foo@bar = *
>
> [reposubs]
> * = baz
> EOF
$ hg init a
......@@ -14,4 +21,8 @@
[usersubs]
foo@bar = *
clone
$ hg --traceback clone a b
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a > b/a
......@@ -17,5 +28,11 @@
[reposubs]
* = baz
EOF
commit
$ hg --traceback --cwd b commit -Ama
adding a
$ echo a >> b/a
commit
$ hg --traceback --cwd b commit -Amb
......@@ -21,10 +38,3 @@
hg init a
echo % clone
hg --traceback clone a b
echo a > b/a
echo % commit
hg --traceback --cwd b commit -Ama
push
......@@ -30,5 +40,36 @@
echo a >> b/a
echo % commit
hg --traceback --cwd b commit -Amb
$ hg --traceback --cwd b push ../a 2>&1 |
> python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
pushing to ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Date: * (glob)
Subject: * (glob)
From: test
X-Hg-Notification: changeset cb9a9f314b8b
Message-Id: <*> (glob)
To: baz, foo@bar
changeset cb9a9f314b8b in */a (glob)
details: */a?cmd=changeset;node=cb9a9f314b8b (glob)
summary: a
changeset ba677d0156c1 in */a (glob)
details: */a?cmd=changeset;node=ba677d0156c1 (glob)
summary: b
diffs (6 lines):
diff -r 000000000000 -r ba677d0156c1 a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/a Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,2 @@
+a
+a
......@@ -34,10 +75,1 @@
echo % push
hg --traceback --cwd b push ../a 2>&1 |
python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
sed -e 's/\(Message-Id:\).*/\1/' \
-e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \
-e 's/^Subject: .*/Subject: test-notify-changegroup/' \
-e 's/^details: .*test-notify/details: test-notify/' \
-e 's/^Date:.*/Date:/'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment