##// END OF EJS Templates
test-notify-changegroup: test notifications on unbundle
Patrick Mezard -
r14868:cdd6ecfd default
parent child Browse files
Show More
@@ -1,75 +1,128 b''
1
1
2 $ cat <<EOF >> $HGRCPATH
2 $ cat <<EOF >> $HGRCPATH
3 > [extensions]
3 > [extensions]
4 > notify=
4 > notify=
5 >
5 >
6 > [hooks]
6 > [hooks]
7 > changegroup.notify = python:hgext.notify.hook
7 > changegroup.notify = python:hgext.notify.hook
8 >
8 >
9 > [notify]
9 > [notify]
10 > sources = push
10 > sources = push
11 > diffstat = False
11 > diffstat = False
12 > maxsubject = 10
12 > maxsubject = 10
13 >
13 >
14 > [usersubs]
14 > [usersubs]
15 > foo@bar = *
15 > foo@bar = *
16 >
16 >
17 > [reposubs]
17 > [reposubs]
18 > * = baz
18 > * = baz
19 > EOF
19 > EOF
20 $ hg init a
20 $ hg init a
21
21
22 clone
22 clone
23
23
24 $ hg --traceback clone a b
24 $ hg --traceback clone a b
25 updating to branch default
25 updating to branch default
26 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 $ echo a > b/a
27 $ echo a > b/a
28
28
29 commit
29 commit
30
30
31 $ hg --traceback --cwd b commit -Ama
31 $ hg --traceback --cwd b commit -Ama
32 adding a
32 adding a
33 $ echo a >> b/a
33 $ echo a >> b/a
34
34
35 commit
35 commit
36
36
37 $ hg --traceback --cwd b commit -Amb
37 $ hg --traceback --cwd b commit -Amb
38
38
39 push
39 push
40
40
41 $ hg --traceback --cwd b push ../a 2>&1 |
41 $ hg --traceback --cwd b push ../a 2>&1 |
42 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
42 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
43 pushing to ../a
43 pushing to ../a
44 searching for changes
44 searching for changes
45 adding changesets
45 adding changesets
46 adding manifests
46 adding manifests
47 adding file changes
47 adding file changes
48 added 2 changesets with 2 changes to 1 files
48 added 2 changesets with 2 changes to 1 files
49 Content-Type: text/plain; charset="us-ascii"
49 Content-Type: text/plain; charset="us-ascii"
50 MIME-Version: 1.0
50 MIME-Version: 1.0
51 Content-Transfer-Encoding: 7bit
51 Content-Transfer-Encoding: 7bit
52 Date: * (glob)
52 Date: * (glob)
53 Subject: * (glob)
53 Subject: * (glob)
54 From: test
54 From: test
55 X-Hg-Notification: changeset cb9a9f314b8b
55 X-Hg-Notification: changeset cb9a9f314b8b
56 Message-Id: <*> (glob)
56 Message-Id: <*> (glob)
57 To: baz, foo@bar
57 To: baz, foo@bar
58
58
59 changeset cb9a9f314b8b in $TESTTMP/a
59 changeset cb9a9f314b8b in $TESTTMP/a
60 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
60 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
61 summary: a
61 summary: a
62
62
63 changeset ba677d0156c1 in $TESTTMP/a
63 changeset ba677d0156c1 in $TESTTMP/a
64 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
64 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
65 summary: b
65 summary: b
66
66
67 diffs (6 lines):
67 diffs (6 lines):
68
68
69 diff -r 000000000000 -r ba677d0156c1 a
69 diff -r 000000000000 -r ba677d0156c1 a
70 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
70 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
71 +++ b/a Thu Jan 01 00:00:00 1970 +0000
71 +++ b/a Thu Jan 01 00:00:00 1970 +0000
72 @@ -0,0 +1,2 @@
72 @@ -0,0 +1,2 @@
73 +a
73 +a
74 +a
74 +a
75 $ hg --cwd a rollback
76 repository tip rolled back to revision -1 (undo push)
77 working directory now based on revision -1
75
78
79 unbundle with unrelated source
80
81 $ hg --cwd b bundle ../test.hg ../a
82 searching for changes
83 2 changesets found
84 $ hg --cwd a unbundle ../test.hg
85 adding changesets
86 adding manifests
87 adding file changes
88 added 2 changesets with 2 changes to 1 files
89 (run 'hg update' to get a working copy)
90 $ hg --cwd a rollback
91 repository tip rolled back to revision -1 (undo unbundle)
92 working directory now based on revision -1
93
94 unbundle with correct source
95
96 $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 |
97 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
98 adding changesets
99 adding manifests
100 adding file changes
101 added 2 changesets with 2 changes to 1 files
102 Content-Type: text/plain; charset="us-ascii"
103 MIME-Version: 1.0
104 Content-Transfer-Encoding: 7bit
105 Date: * (glob)
106 Subject: * (glob)
107 From: test
108 X-Hg-Notification: changeset cb9a9f314b8b
109 Message-Id: <*> (glob)
110 To: baz, foo@bar
111
112 changeset cb9a9f314b8b in $TESTTMP/a
113 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
114 summary: a
115
116 changeset ba677d0156c1 in $TESTTMP/a
117 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
118 summary: b
119
120 diffs (6 lines):
121
122 diff -r 000000000000 -r ba677d0156c1 a
123 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
124 +++ b/a Thu Jan 01 00:00:00 1970 +0000
125 @@ -0,0 +1,2 @@
126 +a
127 +a
128 (run 'hg update' to get a working copy)
General Comments 0
You need to be logged in to leave comments. Login now