##// END OF EJS Templates
tests: ignore slash direction in paths in test-notify-changegroup.t...
Mads Kiilerich -
r15766:8e185480 default
parent child Browse files
Show More
@@ -1,214 +1,214 b''
1 1
2 2 $ cat <<EOF >> $HGRCPATH
3 3 > [extensions]
4 4 > notify=
5 5 >
6 6 > [hooks]
7 7 > changegroup.notify = python:hgext.notify.hook
8 8 >
9 9 > [notify]
10 10 > sources = push
11 11 > diffstat = False
12 12 > maxsubject = 10
13 13 >
14 14 > [usersubs]
15 15 > foo@bar = *
16 16 >
17 17 > [reposubs]
18 18 > * = baz
19 19 > EOF
20 20 $ hg init a
21 21
22 22 clone
23 23
24 24 $ hg --traceback clone a b
25 25 updating to branch default
26 26 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 27 $ echo a > b/a
28 28
29 29 commit
30 30
31 31 $ hg --traceback --cwd b commit -Ama
32 32 adding a
33 33 $ echo a >> b/a
34 34
35 35 commit
36 36
37 37 $ hg --traceback --cwd b commit -Amb
38 38
39 39 push
40 40
41 41 $ hg --traceback --cwd b push ../a 2>&1 |
42 42 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
43 43 pushing to ../a
44 44 searching for changes
45 45 adding changesets
46 46 adding manifests
47 47 adding file changes
48 48 added 2 changesets with 2 changes to 1 files
49 49 Content-Type: text/plain; charset="us-ascii"
50 50 MIME-Version: 1.0
51 51 Content-Transfer-Encoding: 7bit
52 52 Date: * (glob)
53 53 Subject: * (glob)
54 54 From: test
55 55 X-Hg-Notification: changeset cb9a9f314b8b
56 56 Message-Id: <*> (glob)
57 57 To: baz, foo@bar
58 58
59 59 changeset cb9a9f314b8b in $TESTTMP/a (glob)
60 60 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
61 61 summary: a
62 62
63 63 changeset ba677d0156c1 in $TESTTMP/a (glob)
64 64 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
65 65 summary: b
66 66
67 67 diffs (6 lines):
68 68
69 69 diff -r 000000000000 -r ba677d0156c1 a
70 70 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
71 71 +++ b/a Thu Jan 01 00:00:00 1970 +0000
72 72 @@ -0,0 +1,2 @@
73 73 +a
74 74 +a
75 75 $ hg --cwd a rollback
76 76 repository tip rolled back to revision -1 (undo push)
77 77
78 78 unbundle with unrelated source
79 79
80 80 $ hg --cwd b bundle ../test.hg ../a
81 81 searching for changes
82 82 2 changesets found
83 83 $ hg --cwd a unbundle ../test.hg
84 84 adding changesets
85 85 adding manifests
86 86 adding file changes
87 87 added 2 changesets with 2 changes to 1 files
88 88 (run 'hg update' to get a working copy)
89 89 $ hg --cwd a rollback
90 90 repository tip rolled back to revision -1 (undo unbundle)
91 91
92 92 unbundle with correct source
93 93
94 94 $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 |
95 95 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
96 96 adding changesets
97 97 adding manifests
98 98 adding file changes
99 99 added 2 changesets with 2 changes to 1 files
100 100 Content-Type: text/plain; charset="us-ascii"
101 101 MIME-Version: 1.0
102 102 Content-Transfer-Encoding: 7bit
103 103 Date: * (glob)
104 104 Subject: * (glob)
105 105 From: test
106 106 X-Hg-Notification: changeset cb9a9f314b8b
107 107 Message-Id: <*> (glob)
108 108 To: baz, foo@bar
109 109
110 110 changeset cb9a9f314b8b in $TESTTMP/a (glob)
111 111 details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
112 112 summary: a
113 113
114 114 changeset ba677d0156c1 in $TESTTMP/a (glob)
115 115 details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
116 116 summary: b
117 117
118 118 diffs (6 lines):
119 119
120 120 diff -r 000000000000 -r ba677d0156c1 a
121 121 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
122 122 +++ b/a Thu Jan 01 00:00:00 1970 +0000
123 123 @@ -0,0 +1,2 @@
124 124 +a
125 125 +a
126 126 (run 'hg update' to get a working copy)
127 127
128 128 Check that using the first committer as the author of a changeset works:
129 129 Check that the config option works.
130 130 Check that the first committer is indeed used for "From:".
131 131 Check that the merge user is NOT used for "From:"
132 132
133 133 Create new file
134 134
135 135 $ echo a > b/b
136 136 $ echo b >> b/b
137 137 $ echo c >> b/b
138 138 $ hg --traceback --cwd b commit -Amnewfile -u committer_1
139 139 adding b
140 140
141 141 commit as one user
142 142
143 143 $ echo x > b/b
144 144 $ echo b >> b/b
145 145 $ echo c >> b/b
146 146 $ hg --traceback --cwd b commit -Amx -u committer_2
147 147
148 148 commit as other user, change file so we can do an (automatic) merge
149 149
150 150 $ hg --cwd b up 2
151 151 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 152 $ echo a > b/b
153 153 $ echo b >> b/b
154 154 $ echo y >> b/b
155 155 $ hg --traceback --cwd b commit -Amy -u committer_3
156 156 created new head
157 157
158 158 merge as a different user
159 159
160 160 $ hg --cwd b merge --config notify.fromauthor=True
161 161 merging b
162 162 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
163 163 (branch merge, don't forget to commit)
164 164
165 165 $ hg --traceback --cwd b commit -Am "merged"
166 166
167 167 push
168 168
169 169 $ hg --traceback --cwd b --config notify.fromauthor=True push ../a 2>&1 |
170 170 > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
171 171 pushing to ../a
172 172 searching for changes
173 173 adding changesets
174 174 adding manifests
175 175 adding file changes
176 176 added 4 changesets with 4 changes to 1 files
177 177 Content-Type: text/plain; charset="us-ascii"
178 178 MIME-Version: 1.0
179 179 Content-Transfer-Encoding: 7bit
180 180 Date: * (glob)
181 181 Subject: * (glob)
182 182 From: committer_1
183 183 X-Hg-Notification: changeset 84e487dddc58
184 184 Message-Id: <*> (glob)
185 185 To: baz, foo@bar
186 186
187 changeset 84e487dddc58 in $TESTTMP/a
187 changeset 84e487dddc58 in $TESTTMP/a (glob)
188 188 details: $TESTTMP/a?cmd=changeset;node=84e487dddc58
189 189 summary: newfile
190 190
191 changeset b29c7a2b6b0c in $TESTTMP/a
191 changeset b29c7a2b6b0c in $TESTTMP/a (glob)
192 192 details: $TESTTMP/a?cmd=changeset;node=b29c7a2b6b0c
193 193 summary: x
194 194
195 changeset 0957c7d64886 in $TESTTMP/a
195 changeset 0957c7d64886 in $TESTTMP/a (glob)
196 196 details: $TESTTMP/a?cmd=changeset;node=0957c7d64886
197 197 summary: y
198 198
199 changeset 485b4e6b0249 in $TESTTMP/a
199 changeset 485b4e6b0249 in $TESTTMP/a (glob)
200 200 details: $TESTTMP/a?cmd=changeset;node=485b4e6b0249
201 201 summary: merged
202 202
203 203 diffs (7 lines):
204 204
205 205 diff -r ba677d0156c1 -r 485b4e6b0249 b
206 206 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
207 207 +++ b/b Thu Jan 01 00:00:00 1970 +0000
208 208 @@ -0,0 +1,3 @@
209 209 +x
210 210 +b
211 211 +y
212 212 $ hg --cwd a rollback
213 213 repository tip rolled back to revision 1 (undo push)
214 214
General Comments 0
You need to be logged in to leave comments. Login now