##// END OF EJS Templates
py3: add some b'' prefixes in test-notify.t...
Pulkit Goyal -
r41598:47536118 default draft
parent child Browse files
Show More
@@ -1,748 +1,748
1 $ cat > $TESTTMP/filter.py <<EOF
1 $ cat > $TESTTMP/filter.py <<EOF
2 > from __future__ import absolute_import, print_function
2 > from __future__ import absolute_import, print_function
3 > import re
3 > import re
4 > import sys
4 > import sys
5 > print(re.sub("\n[ \t]", " ", sys.stdin.read()), end="")
5 > print(re.sub("\n[ \t]", " ", sys.stdin.read()), end="")
6 > EOF
6 > EOF
7
7
8 $ cat <<EOF >> $HGRCPATH
8 $ cat <<EOF >> $HGRCPATH
9 > [extensions]
9 > [extensions]
10 > notify=
10 > notify=
11 >
11 >
12 > [hooks]
12 > [hooks]
13 > incoming.notify = python:hgext.notify.hook
13 > incoming.notify = python:hgext.notify.hook
14 >
14 >
15 > [notify]
15 > [notify]
16 > sources = pull
16 > sources = pull
17 > diffstat = False
17 > diffstat = False
18 >
18 >
19 > [usersubs]
19 > [usersubs]
20 > foo@bar = *
20 > foo@bar = *
21 >
21 >
22 > [reposubs]
22 > [reposubs]
23 > * = baz
23 > * = baz
24 > EOF
24 > EOF
25 $ hg help notify
25 $ hg help notify
26 notify extension - hooks for sending email push notifications
26 notify extension - hooks for sending email push notifications
27
27
28 This extension implements hooks to send email notifications when changesets
28 This extension implements hooks to send email notifications when changesets
29 are sent from or received by the local repository.
29 are sent from or received by the local repository.
30
30
31 First, enable the extension as explained in 'hg help extensions', and register
31 First, enable the extension as explained in 'hg help extensions', and register
32 the hook you want to run. "incoming" and "changegroup" hooks are run when
32 the hook you want to run. "incoming" and "changegroup" hooks are run when
33 changesets are received, while "outgoing" hooks are for changesets sent to
33 changesets are received, while "outgoing" hooks are for changesets sent to
34 another repository:
34 another repository:
35
35
36 [hooks]
36 [hooks]
37 # one email for each incoming changeset
37 # one email for each incoming changeset
38 incoming.notify = python:hgext.notify.hook
38 incoming.notify = python:hgext.notify.hook
39 # one email for all incoming changesets
39 # one email for all incoming changesets
40 changegroup.notify = python:hgext.notify.hook
40 changegroup.notify = python:hgext.notify.hook
41
41
42 # one email for all outgoing changesets
42 # one email for all outgoing changesets
43 outgoing.notify = python:hgext.notify.hook
43 outgoing.notify = python:hgext.notify.hook
44
44
45 This registers the hooks. To enable notification, subscribers must be assigned
45 This registers the hooks. To enable notification, subscribers must be assigned
46 to repositories. The "[usersubs]" section maps multiple repositories to a
46 to repositories. The "[usersubs]" section maps multiple repositories to a
47 given recipient. The "[reposubs]" section maps multiple recipients to a single
47 given recipient. The "[reposubs]" section maps multiple recipients to a single
48 repository:
48 repository:
49
49
50 [usersubs]
50 [usersubs]
51 # key is subscriber email, value is a comma-separated list of repo patterns
51 # key is subscriber email, value is a comma-separated list of repo patterns
52 user@host = pattern
52 user@host = pattern
53
53
54 [reposubs]
54 [reposubs]
55 # key is repo pattern, value is a comma-separated list of subscriber emails
55 # key is repo pattern, value is a comma-separated list of subscriber emails
56 pattern = user@host
56 pattern = user@host
57
57
58 A "pattern" is a "glob" matching the absolute path to a repository, optionally
58 A "pattern" is a "glob" matching the absolute path to a repository, optionally
59 combined with a revset expression. A revset expression, if present, is
59 combined with a revset expression. A revset expression, if present, is
60 separated from the glob by a hash. Example:
60 separated from the glob by a hash. Example:
61
61
62 [reposubs]
62 [reposubs]
63 */widgets#branch(release) = qa-team@example.com
63 */widgets#branch(release) = qa-team@example.com
64
64
65 This sends to "qa-team@example.com" whenever a changeset on the "release"
65 This sends to "qa-team@example.com" whenever a changeset on the "release"
66 branch triggers a notification in any repository ending in "widgets".
66 branch triggers a notification in any repository ending in "widgets".
67
67
68 In order to place them under direct user management, "[usersubs]" and
68 In order to place them under direct user management, "[usersubs]" and
69 "[reposubs]" sections may be placed in a separate "hgrc" file and incorporated
69 "[reposubs]" sections may be placed in a separate "hgrc" file and incorporated
70 by reference:
70 by reference:
71
71
72 [notify]
72 [notify]
73 config = /path/to/subscriptionsfile
73 config = /path/to/subscriptionsfile
74
74
75 Notifications will not be sent until the "notify.test" value is set to
75 Notifications will not be sent until the "notify.test" value is set to
76 "False"; see below.
76 "False"; see below.
77
77
78 Notifications content can be tweaked with the following configuration entries:
78 Notifications content can be tweaked with the following configuration entries:
79
79
80 notify.test
80 notify.test
81 If "True", print messages to stdout instead of sending them. Default: True.
81 If "True", print messages to stdout instead of sending them. Default: True.
82
82
83 notify.sources
83 notify.sources
84 Space-separated list of change sources. Notifications are activated only
84 Space-separated list of change sources. Notifications are activated only
85 when a changeset's source is in this list. Sources may be:
85 when a changeset's source is in this list. Sources may be:
86
86
87 "serve" changesets received via http or ssh
87 "serve" changesets received via http or ssh
88 "pull" changesets received via "hg pull"
88 "pull" changesets received via "hg pull"
89 "unbundle" changesets received via "hg unbundle"
89 "unbundle" changesets received via "hg unbundle"
90 "push" changesets sent or received via "hg push"
90 "push" changesets sent or received via "hg push"
91 "bundle" changesets sent via "hg unbundle"
91 "bundle" changesets sent via "hg unbundle"
92
92
93 Default: serve.
93 Default: serve.
94
94
95 notify.strip
95 notify.strip
96 Number of leading slashes to strip from url paths. By default, notifications
96 Number of leading slashes to strip from url paths. By default, notifications
97 reference repositories with their absolute path. "notify.strip" lets you
97 reference repositories with their absolute path. "notify.strip" lets you
98 turn them into relative paths. For example, "notify.strip=3" will change
98 turn them into relative paths. For example, "notify.strip=3" will change
99 "/long/path/repository" into "repository". Default: 0.
99 "/long/path/repository" into "repository". Default: 0.
100
100
101 notify.domain
101 notify.domain
102 Default email domain for sender or recipients with no explicit domain.
102 Default email domain for sender or recipients with no explicit domain.
103
103
104 notify.style
104 notify.style
105 Style file to use when formatting emails.
105 Style file to use when formatting emails.
106
106
107 notify.template
107 notify.template
108 Template to use when formatting emails.
108 Template to use when formatting emails.
109
109
110 notify.incoming
110 notify.incoming
111 Template to use when run as an incoming hook, overriding "notify.template".
111 Template to use when run as an incoming hook, overriding "notify.template".
112
112
113 notify.outgoing
113 notify.outgoing
114 Template to use when run as an outgoing hook, overriding "notify.template".
114 Template to use when run as an outgoing hook, overriding "notify.template".
115
115
116 notify.changegroup
116 notify.changegroup
117 Template to use when running as a changegroup hook, overriding
117 Template to use when running as a changegroup hook, overriding
118 "notify.template".
118 "notify.template".
119
119
120 notify.maxdiff
120 notify.maxdiff
121 Maximum number of diff lines to include in notification email. Set to 0 to
121 Maximum number of diff lines to include in notification email. Set to 0 to
122 disable the diff, or -1 to include all of it. Default: 300.
122 disable the diff, or -1 to include all of it. Default: 300.
123
123
124 notify.maxdiffstat
124 notify.maxdiffstat
125 Maximum number of diffstat lines to include in notification email. Set to -1
125 Maximum number of diffstat lines to include in notification email. Set to -1
126 to include all of it. Default: -1.
126 to include all of it. Default: -1.
127
127
128 notify.maxsubject
128 notify.maxsubject
129 Maximum number of characters in email's subject line. Default: 67.
129 Maximum number of characters in email's subject line. Default: 67.
130
130
131 notify.diffstat
131 notify.diffstat
132 Set to True to include a diffstat before diff content. Default: True.
132 Set to True to include a diffstat before diff content. Default: True.
133
133
134 notify.showfunc
134 notify.showfunc
135 If set, override "diff.showfunc" for the diff content. Default: None.
135 If set, override "diff.showfunc" for the diff content. Default: None.
136
136
137 notify.merge
137 notify.merge
138 If True, send notifications for merge changesets. Default: True.
138 If True, send notifications for merge changesets. Default: True.
139
139
140 notify.mbox
140 notify.mbox
141 If set, append mails to this mbox file instead of sending. Default: None.
141 If set, append mails to this mbox file instead of sending. Default: None.
142
142
143 notify.fromauthor
143 notify.fromauthor
144 If set, use the committer of the first changeset in a changegroup for the
144 If set, use the committer of the first changeset in a changegroup for the
145 "From" field of the notification mail. If not set, take the user from the
145 "From" field of the notification mail. If not set, take the user from the
146 pushing repo. Default: False.
146 pushing repo. Default: False.
147
147
148 If set, the following entries will also be used to customize the
148 If set, the following entries will also be used to customize the
149 notifications:
149 notifications:
150
150
151 email.from
151 email.from
152 Email "From" address to use if none can be found in the generated email
152 Email "From" address to use if none can be found in the generated email
153 content.
153 content.
154
154
155 web.baseurl
155 web.baseurl
156 Root repository URL to combine with repository paths when making references.
156 Root repository URL to combine with repository paths when making references.
157 See also "notify.strip".
157 See also "notify.strip".
158
158
159 no commands defined
159 no commands defined
160 $ hg init a
160 $ hg init a
161 $ echo a > a/a
161 $ echo a > a/a
162 $ echo b > a/b
162 $ echo b > a/b
163
163
164 commit
164 commit
165
165
166 $ hg --cwd a commit -Ama -d '0 0'
166 $ hg --cwd a commit -Ama -d '0 0'
167 adding a
167 adding a
168 adding b
168 adding b
169
169
170 clone
170 clone
171
171
172 $ hg --traceback clone a b
172 $ hg --traceback clone a b
173 updating to branch default
173 updating to branch default
174 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
174 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 $ echo a >> a/a
175 $ echo a >> a/a
176 $ echo b >> a/b
176 $ echo b >> a/b
177
177
178 commit
178 commit
179
179
180 $ hg --traceback --cwd a commit -Amb -d '1 0'
180 $ hg --traceback --cwd a commit -Amb -d '1 0'
181
181
182 on Mac OS X 10.5 the tmp path is very long so would get stripped in the subject line
182 on Mac OS X 10.5 the tmp path is very long so would get stripped in the subject line
183
183
184 $ cat <<EOF >> $HGRCPATH
184 $ cat <<EOF >> $HGRCPATH
185 > [notify]
185 > [notify]
186 > maxsubject = 200
186 > maxsubject = 200
187 > EOF
187 > EOF
188
188
189 the python call below wraps continuation lines, which appear on Mac OS X 10.5 because
189 the python call below wraps continuation lines, which appear on Mac OS X 10.5 because
190 of the very long subject line
190 of the very long subject line
191 pull (minimal config)
191 pull (minimal config)
192
192
193 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
193 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
194 pulling from ../a
194 pulling from ../a
195 searching for changes
195 searching for changes
196 adding changesets
196 adding changesets
197 adding manifests
197 adding manifests
198 adding file changes
198 adding file changes
199 added 1 changesets with 2 changes to 2 files
199 added 1 changesets with 2 changes to 2 files
200 new changesets 00a13f371396
200 new changesets 00a13f371396
201 MIME-Version: 1.0
201 MIME-Version: 1.0
202 Content-Type: text/plain; charset="us-ascii"
202 Content-Type: text/plain; charset="us-ascii"
203 Content-Transfer-Encoding: 7bit
203 Content-Transfer-Encoding: 7bit
204 Date: * (glob)
204 Date: * (glob)
205 Subject: changeset in $TESTTMP/b: b
205 Subject: changeset in $TESTTMP/b: b
206 From: test
206 From: test
207 X-Hg-Notification: changeset 00a13f371396
207 X-Hg-Notification: changeset 00a13f371396
208 Message-Id: <*> (glob)
208 Message-Id: <*> (glob)
209 To: baz, foo@bar
209 To: baz, foo@bar
210
210
211 changeset 00a13f371396 in $TESTTMP/b
211 changeset 00a13f371396 in $TESTTMP/b
212 details: $TESTTMP/b?cmd=changeset;node=00a13f371396
212 details: $TESTTMP/b?cmd=changeset;node=00a13f371396
213 description: b
213 description: b
214
214
215 diffs (12 lines):
215 diffs (12 lines):
216
216
217 diff -r 0cd96de13884 -r 00a13f371396 a
217 diff -r 0cd96de13884 -r 00a13f371396 a
218 --- a/a Thu Jan 01 00:00:00 1970 +0000
218 --- a/a Thu Jan 01 00:00:00 1970 +0000
219 +++ b/a Thu Jan 01 00:00:01 1970 +0000
219 +++ b/a Thu Jan 01 00:00:01 1970 +0000
220 @@ -1,1 +1,2 @@ a
220 @@ -1,1 +1,2 @@ a
221 +a
221 +a
222 diff -r 0cd96de13884 -r 00a13f371396 b
222 diff -r 0cd96de13884 -r 00a13f371396 b
223 --- a/b Thu Jan 01 00:00:00 1970 +0000
223 --- a/b Thu Jan 01 00:00:00 1970 +0000
224 +++ b/b Thu Jan 01 00:00:01 1970 +0000
224 +++ b/b Thu Jan 01 00:00:01 1970 +0000
225 @@ -1,1 +1,2 @@ b
225 @@ -1,1 +1,2 @@ b
226 +b
226 +b
227 (run 'hg update' to get a working copy)
227 (run 'hg update' to get a working copy)
228
228
229 $ cat <<EOF >> $HGRCPATH
229 $ cat <<EOF >> $HGRCPATH
230 > [notify]
230 > [notify]
231 > config = `pwd`/.notify.conf
231 > config = `pwd`/.notify.conf
232 > domain = test.com
232 > domain = test.com
233 > strip = 42
233 > strip = 42
234 > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip}
234 > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip}
235 >
235 >
236 > [web]
236 > [web]
237 > baseurl = http://test/
237 > baseurl = http://test/
238 > EOF
238 > EOF
239
239
240 fail for config file is missing
240 fail for config file is missing
241
241
242 $ hg --cwd b rollback
242 $ hg --cwd b rollback
243 repository tip rolled back to revision 0 (undo pull)
243 repository tip rolled back to revision 0 (undo pull)
244 $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed
244 $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed
245 pull failed
245 pull failed
246 $ touch ".notify.conf"
246 $ touch ".notify.conf"
247
247
248 pull
248 pull
249
249
250 $ hg --cwd b rollback
250 $ hg --cwd b rollback
251 repository tip rolled back to revision 0 (undo pull)
251 repository tip rolled back to revision 0 (undo pull)
252 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
252 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
253 pulling from ../a
253 pulling from ../a
254 searching for changes
254 searching for changes
255 adding changesets
255 adding changesets
256 adding manifests
256 adding manifests
257 adding file changes
257 adding file changes
258 added 1 changesets with 2 changes to 2 files
258 added 1 changesets with 2 changes to 2 files
259 new changesets 00a13f371396
259 new changesets 00a13f371396
260 MIME-Version: 1.0
260 MIME-Version: 1.0
261 Content-Type: text/plain; charset="us-ascii"
261 Content-Type: text/plain; charset="us-ascii"
262 Content-Transfer-Encoding: 7bit
262 Content-Transfer-Encoding: 7bit
263 X-Test: foo
263 X-Test: foo
264 Date: * (glob)
264 Date: * (glob)
265 Subject: b
265 Subject: b
266 From: test@test.com
266 From: test@test.com
267 X-Hg-Notification: changeset 00a13f371396
267 X-Hg-Notification: changeset 00a13f371396
268 Message-Id: <*> (glob)
268 Message-Id: <*> (glob)
269 To: baz@test.com, foo@bar
269 To: baz@test.com, foo@bar
270
270
271 changeset 00a13f371396 in b
271 changeset 00a13f371396 in b
272 description: b
272 description: b
273 diffs (12 lines):
273 diffs (12 lines):
274
274
275 diff -r 0cd96de13884 -r 00a13f371396 a
275 diff -r 0cd96de13884 -r 00a13f371396 a
276 --- a/a Thu Jan 01 00:00:00 1970 +0000
276 --- a/a Thu Jan 01 00:00:00 1970 +0000
277 +++ b/a Thu Jan 01 00:00:01 1970 +0000
277 +++ b/a Thu Jan 01 00:00:01 1970 +0000
278 @@ -1,1 +1,2 @@ a
278 @@ -1,1 +1,2 @@ a
279 +a
279 +a
280 diff -r 0cd96de13884 -r 00a13f371396 b
280 diff -r 0cd96de13884 -r 00a13f371396 b
281 --- a/b Thu Jan 01 00:00:00 1970 +0000
281 --- a/b Thu Jan 01 00:00:00 1970 +0000
282 +++ b/b Thu Jan 01 00:00:01 1970 +0000
282 +++ b/b Thu Jan 01 00:00:01 1970 +0000
283 @@ -1,1 +1,2 @@ b
283 @@ -1,1 +1,2 @@ b
284 +b
284 +b
285 (run 'hg update' to get a working copy)
285 (run 'hg update' to get a working copy)
286
286
287 $ cat << EOF >> $HGRCPATH
287 $ cat << EOF >> $HGRCPATH
288 > [hooks]
288 > [hooks]
289 > incoming.notify = python:hgext.notify.hook
289 > incoming.notify = python:hgext.notify.hook
290 >
290 >
291 > [notify]
291 > [notify]
292 > sources = pull
292 > sources = pull
293 > diffstat = True
293 > diffstat = True
294 > EOF
294 > EOF
295
295
296 pull
296 pull
297
297
298 $ hg --cwd b rollback
298 $ hg --cwd b rollback
299 repository tip rolled back to revision 0 (undo pull)
299 repository tip rolled back to revision 0 (undo pull)
300 $ hg --traceback --config notify.maxdiffstat=1 --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
300 $ hg --traceback --config notify.maxdiffstat=1 --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
301 pulling from ../a
301 pulling from ../a
302 searching for changes
302 searching for changes
303 adding changesets
303 adding changesets
304 adding manifests
304 adding manifests
305 adding file changes
305 adding file changes
306 added 1 changesets with 2 changes to 2 files
306 added 1 changesets with 2 changes to 2 files
307 new changesets 00a13f371396
307 new changesets 00a13f371396
308 MIME-Version: 1.0
308 MIME-Version: 1.0
309 Content-Type: text/plain; charset="us-ascii"
309 Content-Type: text/plain; charset="us-ascii"
310 Content-Transfer-Encoding: 7bit
310 Content-Transfer-Encoding: 7bit
311 X-Test: foo
311 X-Test: foo
312 Date: * (glob)
312 Date: * (glob)
313 Subject: b
313 Subject: b
314 From: test@test.com
314 From: test@test.com
315 X-Hg-Notification: changeset 00a13f371396
315 X-Hg-Notification: changeset 00a13f371396
316 Message-Id: <*> (glob)
316 Message-Id: <*> (glob)
317 To: baz@test.com, foo@bar
317 To: baz@test.com, foo@bar
318
318
319 changeset 00a13f371396 in b
319 changeset 00a13f371396 in b
320 description: b
320 description: b
321 diffstat (truncated from 2 to 1 lines):
321 diffstat (truncated from 2 to 1 lines):
322 a | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
322 a | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
323
323
324 diffs (12 lines):
324 diffs (12 lines):
325
325
326 diff -r 0cd96de13884 -r 00a13f371396 a
326 diff -r 0cd96de13884 -r 00a13f371396 a
327 --- a/a Thu Jan 01 00:00:00 1970 +0000
327 --- a/a Thu Jan 01 00:00:00 1970 +0000
328 +++ b/a Thu Jan 01 00:00:01 1970 +0000
328 +++ b/a Thu Jan 01 00:00:01 1970 +0000
329 @@ -1,1 +1,2 @@ a
329 @@ -1,1 +1,2 @@ a
330 +a
330 +a
331 diff -r 0cd96de13884 -r 00a13f371396 b
331 diff -r 0cd96de13884 -r 00a13f371396 b
332 --- a/b Thu Jan 01 00:00:00 1970 +0000
332 --- a/b Thu Jan 01 00:00:00 1970 +0000
333 +++ b/b Thu Jan 01 00:00:01 1970 +0000
333 +++ b/b Thu Jan 01 00:00:01 1970 +0000
334 @@ -1,1 +1,2 @@ b
334 @@ -1,1 +1,2 @@ b
335 +b
335 +b
336 (run 'hg update' to get a working copy)
336 (run 'hg update' to get a working copy)
337
337
338 test merge
338 test merge
339
339
340 $ cd a
340 $ cd a
341 $ hg up -C 0
341 $ hg up -C 0
342 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
342 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
343 $ echo a >> a
343 $ echo a >> a
344 $ hg ci -Am adda2 -d '2 0'
344 $ hg ci -Am adda2 -d '2 0'
345 created new head
345 created new head
346 $ hg merge
346 $ hg merge
347 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
347 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
348 (branch merge, don't forget to commit)
348 (branch merge, don't forget to commit)
349 $ hg ci -m merge -d '3 0'
349 $ hg ci -m merge -d '3 0'
350 $ cd ..
350 $ cd ..
351 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
351 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
352 pulling from ../a
352 pulling from ../a
353 searching for changes
353 searching for changes
354 adding changesets
354 adding changesets
355 adding manifests
355 adding manifests
356 adding file changes
356 adding file changes
357 added 2 changesets with 0 changes to 0 files
357 added 2 changesets with 0 changes to 0 files
358 new changesets 3332653e1f3c:fccf66cd0c35
358 new changesets 3332653e1f3c:fccf66cd0c35
359 MIME-Version: 1.0
359 MIME-Version: 1.0
360 Content-Type: text/plain; charset="us-ascii"
360 Content-Type: text/plain; charset="us-ascii"
361 Content-Transfer-Encoding: 7bit
361 Content-Transfer-Encoding: 7bit
362 X-Test: foo
362 X-Test: foo
363 Date: * (glob)
363 Date: * (glob)
364 Subject: adda2
364 Subject: adda2
365 From: test@test.com
365 From: test@test.com
366 X-Hg-Notification: changeset 3332653e1f3c
366 X-Hg-Notification: changeset 3332653e1f3c
367 Message-Id: <*> (glob)
367 Message-Id: <*> (glob)
368 To: baz@test.com, foo@bar
368 To: baz@test.com, foo@bar
369
369
370 changeset 3332653e1f3c in b
370 changeset 3332653e1f3c in b
371 description: adda2
371 description: adda2
372 diffstat:
372 diffstat:
373 a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
373 a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
374
374
375 diffs (6 lines):
375 diffs (6 lines):
376
376
377 diff -r 0cd96de13884 -r 3332653e1f3c a
377 diff -r 0cd96de13884 -r 3332653e1f3c a
378 --- a/a Thu Jan 01 00:00:00 1970 +0000
378 --- a/a Thu Jan 01 00:00:00 1970 +0000
379 +++ b/a Thu Jan 01 00:00:02 1970 +0000
379 +++ b/a Thu Jan 01 00:00:02 1970 +0000
380 @@ -1,1 +1,2 @@ a
380 @@ -1,1 +1,2 @@ a
381 +a
381 +a
382 MIME-Version: 1.0
382 MIME-Version: 1.0
383 Content-Type: text/plain; charset="us-ascii"
383 Content-Type: text/plain; charset="us-ascii"
384 Content-Transfer-Encoding: 7bit
384 Content-Transfer-Encoding: 7bit
385 X-Test: foo
385 X-Test: foo
386 Date: * (glob)
386 Date: * (glob)
387 Subject: merge
387 Subject: merge
388 From: test@test.com
388 From: test@test.com
389 X-Hg-Notification: changeset fccf66cd0c35
389 X-Hg-Notification: changeset fccf66cd0c35
390 Message-Id: <*> (glob)
390 Message-Id: <*> (glob)
391 To: baz@test.com, foo@bar
391 To: baz@test.com, foo@bar
392
392
393 changeset fccf66cd0c35 in b
393 changeset fccf66cd0c35 in b
394 description: merge
394 description: merge
395 diffstat:
395 diffstat:
396 b | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
396 b | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
397
397
398 diffs (6 lines):
398 diffs (6 lines):
399
399
400 diff -r 3332653e1f3c -r fccf66cd0c35 b
400 diff -r 3332653e1f3c -r fccf66cd0c35 b
401 --- a/b Thu Jan 01 00:00:02 1970 +0000
401 --- a/b Thu Jan 01 00:00:02 1970 +0000
402 +++ b/b Thu Jan 01 00:00:03 1970 +0000
402 +++ b/b Thu Jan 01 00:00:03 1970 +0000
403 @@ -1,1 +1,2 @@ b
403 @@ -1,1 +1,2 @@ b
404 +b
404 +b
405 (run 'hg update' to get a working copy)
405 (run 'hg update' to get a working copy)
406
406
407 non-ascii content and truncation of multi-byte subject
407 non-ascii content and truncation of multi-byte subject
408
408
409 $ cat <<EOF >> $HGRCPATH
409 $ cat <<EOF >> $HGRCPATH
410 > [notify]
410 > [notify]
411 > maxsubject = 4
411 > maxsubject = 4
412 > EOF
412 > EOF
413 $ echo a >> a/a
413 $ echo a >> a/a
414 $ hg --cwd a --encoding utf-8 commit -A -d '0 0' \
414 $ hg --cwd a --encoding utf-8 commit -A -d '0 0' \
415 > -m `"$PYTHON" -c 'print("\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4")'`
415 > -m `"$PYTHON" -c 'print("\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4")'`
416 $ hg --traceback --cwd b --encoding utf-8 pull ../a | \
416 $ hg --traceback --cwd b --encoding utf-8 pull ../a | \
417 > "$PYTHON" $TESTTMP/filter.py
417 > "$PYTHON" $TESTTMP/filter.py
418 pulling from ../a
418 pulling from ../a
419 searching for changes
419 searching for changes
420 adding changesets
420 adding changesets
421 adding manifests
421 adding manifests
422 adding file changes
422 adding file changes
423 added 1 changesets with 1 changes to 1 files
423 added 1 changesets with 1 changes to 1 files
424 new changesets 0f25f9c22b4c
424 new changesets 0f25f9c22b4c
425 MIME-Version: 1.0
425 MIME-Version: 1.0
426 Content-Type: text/plain; charset="us-ascii"
426 Content-Type: text/plain; charset="us-ascii"
427 Content-Transfer-Encoding: 8bit
427 Content-Transfer-Encoding: 8bit
428 X-Test: foo
428 X-Test: foo
429 Date: * (glob)
429 Date: * (glob)
430 Subject: \xc3\xa0... (esc)
430 Subject: \xc3\xa0... (esc)
431 From: test@test.com
431 From: test@test.com
432 X-Hg-Notification: changeset 0f25f9c22b4c
432 X-Hg-Notification: changeset 0f25f9c22b4c
433 Message-Id: <*> (glob)
433 Message-Id: <*> (glob)
434 To: baz@test.com, foo@bar
434 To: baz@test.com, foo@bar
435
435
436 changeset 0f25f9c22b4c in b
436 changeset 0f25f9c22b4c in b
437 description: \xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4 (esc)
437 description: \xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4 (esc)
438 diffstat:
438 diffstat:
439 a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
439 a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
440
440
441 diffs (7 lines):
441 diffs (7 lines):
442
442
443 diff -r fccf66cd0c35 -r 0f25f9c22b4c a
443 diff -r fccf66cd0c35 -r 0f25f9c22b4c a
444 --- a/a Thu Jan 01 00:00:03 1970 +0000
444 --- a/a Thu Jan 01 00:00:03 1970 +0000
445 +++ b/a Thu Jan 01 00:00:00 1970 +0000
445 +++ b/a Thu Jan 01 00:00:00 1970 +0000
446 @@ -1,2 +1,3 @@ a a
446 @@ -1,2 +1,3 @@ a a
447 +a
447 +a
448 (run 'hg update' to get a working copy)
448 (run 'hg update' to get a working copy)
449
449
450 long lines
450 long lines
451
451
452 $ cat <<EOF >> $HGRCPATH
452 $ cat <<EOF >> $HGRCPATH
453 > [notify]
453 > [notify]
454 > maxsubject = 67
454 > maxsubject = 67
455 > test = False
455 > test = False
456 > mbox = mbox
456 > mbox = mbox
457 > EOF
457 > EOF
458 $ "$PYTHON" -c 'open("a/a", "ab").write("no" * 500 + "\xd1\x84" + "\n")'
458 $ "$PYTHON" -c 'open("a/a", "ab").write(b"no" * 500 + b"\xd1\x84" + b"\n")'
459 $ hg --cwd a commit -A -m "long line"
459 $ hg --cwd a commit -A -m "long line"
460 $ hg --traceback --cwd b pull ../a
460 $ hg --traceback --cwd b pull ../a
461 pulling from ../a
461 pulling from ../a
462 searching for changes
462 searching for changes
463 adding changesets
463 adding changesets
464 adding manifests
464 adding manifests
465 adding file changes
465 adding file changes
466 added 1 changesets with 1 changes to 1 files
466 added 1 changesets with 1 changes to 1 files
467 new changesets a846b5f6ebb7
467 new changesets a846b5f6ebb7
468 notify: sending 2 subscribers 1 changes
468 notify: sending 2 subscribers 1 changes
469 (run 'hg update' to get a working copy)
469 (run 'hg update' to get a working copy)
470 $ "$PYTHON" $TESTTMP/filter.py < b/mbox
470 $ "$PYTHON" $TESTTMP/filter.py < b/mbox
471 From test@test.com ... ... .. ..:..:.. .... (re)
471 From test@test.com ... ... .. ..:..:.. .... (re)
472 MIME-Version: 1.0
472 MIME-Version: 1.0
473 Content-Type: text/plain; charset="*" (glob)
473 Content-Type: text/plain; charset="*" (glob)
474 Content-Transfer-Encoding: quoted-printable
474 Content-Transfer-Encoding: quoted-printable
475 X-Test: foo
475 X-Test: foo
476 Date: * (glob)
476 Date: * (glob)
477 Subject: long line
477 Subject: long line
478 From: test@test.com
478 From: test@test.com
479 X-Hg-Notification: changeset a846b5f6ebb7
479 X-Hg-Notification: changeset a846b5f6ebb7
480 Message-Id: <hg.a846b5f6ebb7.*.*@*> (glob)
480 Message-Id: <hg.a846b5f6ebb7.*.*@*> (glob)
481 To: baz@test.com, foo@bar
481 To: baz@test.com, foo@bar
482
482
483 changeset a846b5f6ebb7 in b
483 changeset a846b5f6ebb7 in b
484 description: long line
484 description: long line
485 diffstat:
485 diffstat:
486 a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
486 a | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
487
487
488 diffs (8 lines):
488 diffs (8 lines):
489
489
490 diff -r 0f25f9c22b4c -r a846b5f6ebb7 a
490 diff -r 0f25f9c22b4c -r a846b5f6ebb7 a
491 --- a/a Thu Jan 01 00:00:00 1970 +0000
491 --- a/a Thu Jan 01 00:00:00 1970 +0000
492 +++ b/a Thu Jan 01 00:00:00 1970 +0000
492 +++ b/a Thu Jan 01 00:00:00 1970 +0000
493 @@ -1,3 +1,4 @@ a a a
493 @@ -1,3 +1,4 @@ a a a
494 +nonononononononononononononononononononononononononononononononononononono=
494 +nonononononononononononononononononononononononononononononononononononono=
495 nononononononononononononononononononononononononononononononononononononon=
495 nononononononononononononononononononononononononononononononononononononon=
496 ononononononononononononononononononononononononononononononononononononono=
496 ononononononononononononononononononononononononononononononononononononono=
497 nononononononononononononononononononononononononononononononononononononon=
497 nononononononononononononononononononononononononononononononononononononon=
498 ononononononononononononononononononononononononononononononononononononono=
498 ononononononononononononononononononononononononononononononononononononono=
499 nononononononononononononononononononononononononononononononononononononon=
499 nononononononononononononononononononononononononononononononononononononon=
500 ononononononononononononononononononononononononononononononononononononono=
500 ononononononononononononononononononononononononononononononononononononono=
501 nononononononononononononononononononononononononononononononononononononon=
501 nononononononononononononononononononononononononononononononononononononon=
502 ononononononononononononononononononononononononononononononononononononono=
502 ononononononononononononononononononononononononononononononononononononono=
503 nononononononononononononononononononononononononononononononononononononon=
503 nononononononononononononononononononononononononononononononononononononon=
504 ononononononononononononononononononononononononononononononononononononono=
504 ononononononononononononononononononononononononononononononononononononono=
505 nononononononononononononononononononononononononononononononononononononon=
505 nononononononononononononononononononononononononononononononononononononon=
506 ononononononononononononononononononononononononononononononononononononono=
506 ononononononononononononononononononononononononononononononononononononono=
507 nonononononononononononono=D1=84
507 nonononononononononononono=D1=84
508
508
509 revset selection: send to address that matches branch and repo
509 revset selection: send to address that matches branch and repo
510
510
511 $ cat << EOF >> $HGRCPATH
511 $ cat << EOF >> $HGRCPATH
512 > [hooks]
512 > [hooks]
513 > incoming.notify = python:hgext.notify.hook
513 > incoming.notify = python:hgext.notify.hook
514 >
514 >
515 > [notify]
515 > [notify]
516 > sources = pull
516 > sources = pull
517 > test = True
517 > test = True
518 > diffstat = False
518 > diffstat = False
519 > maxdiff = 0
519 > maxdiff = 0
520 >
520 >
521 > [reposubs]
521 > [reposubs]
522 > */a#branch(test) = will_no_be_send@example.com
522 > */a#branch(test) = will_no_be_send@example.com
523 > */b#branch(test) = notify@example.com
523 > */b#branch(test) = notify@example.com
524 > EOF
524 > EOF
525 $ hg --cwd a branch test
525 $ hg --cwd a branch test
526 marked working directory as branch test
526 marked working directory as branch test
527 (branches are permanent and global, did you want a bookmark?)
527 (branches are permanent and global, did you want a bookmark?)
528 $ echo a >> a/a
528 $ echo a >> a/a
529 $ hg --cwd a ci -m test -d '1 0'
529 $ hg --cwd a ci -m test -d '1 0'
530 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
530 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
531 pulling from ../a
531 pulling from ../a
532 searching for changes
532 searching for changes
533 adding changesets
533 adding changesets
534 adding manifests
534 adding manifests
535 adding file changes
535 adding file changes
536 added 1 changesets with 1 changes to 1 files
536 added 1 changesets with 1 changes to 1 files
537 new changesets f7e5aaed4080
537 new changesets f7e5aaed4080
538 MIME-Version: 1.0
538 MIME-Version: 1.0
539 Content-Type: text/plain; charset="us-ascii"
539 Content-Type: text/plain; charset="us-ascii"
540 Content-Transfer-Encoding: 7bit
540 Content-Transfer-Encoding: 7bit
541 X-Test: foo
541 X-Test: foo
542 Date: * (glob)
542 Date: * (glob)
543 Subject: test
543 Subject: test
544 From: test@test.com
544 From: test@test.com
545 X-Hg-Notification: changeset f7e5aaed4080
545 X-Hg-Notification: changeset f7e5aaed4080
546 Message-Id: <hg.f7e5aaed4080.*.*@*> (glob)
546 Message-Id: <hg.f7e5aaed4080.*.*@*> (glob)
547 To: baz@test.com, foo@bar, notify@example.com
547 To: baz@test.com, foo@bar, notify@example.com
548
548
549 changeset f7e5aaed4080 in b
549 changeset f7e5aaed4080 in b
550 description: test
550 description: test
551 (run 'hg update' to get a working copy)
551 (run 'hg update' to get a working copy)
552
552
553 revset selection: don't send to address that waits for mails
553 revset selection: don't send to address that waits for mails
554 from different branch
554 from different branch
555
555
556 $ hg --cwd a update default
556 $ hg --cwd a update default
557 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
557 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
558 $ echo a >> a/a
558 $ echo a >> a/a
559 $ hg --cwd a ci -m test -d '1 0'
559 $ hg --cwd a ci -m test -d '1 0'
560 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
560 $ hg --traceback --cwd b pull ../a | "$PYTHON" $TESTTMP/filter.py
561 pulling from ../a
561 pulling from ../a
562 searching for changes
562 searching for changes
563 adding changesets
563 adding changesets
564 adding manifests
564 adding manifests
565 adding file changes
565 adding file changes
566 added 1 changesets with 0 changes to 0 files (+1 heads)
566 added 1 changesets with 0 changes to 0 files (+1 heads)
567 new changesets 645eb6690ecf
567 new changesets 645eb6690ecf
568 MIME-Version: 1.0
568 MIME-Version: 1.0
569 Content-Type: text/plain; charset="us-ascii"
569 Content-Type: text/plain; charset="us-ascii"
570 Content-Transfer-Encoding: 7bit
570 Content-Transfer-Encoding: 7bit
571 X-Test: foo
571 X-Test: foo
572 Date: * (glob)
572 Date: * (glob)
573 Subject: test
573 Subject: test
574 From: test@test.com
574 From: test@test.com
575 X-Hg-Notification: changeset 645eb6690ecf
575 X-Hg-Notification: changeset 645eb6690ecf
576 Message-Id: <hg.645eb6690ecf.*.*@*> (glob)
576 Message-Id: <hg.645eb6690ecf.*.*@*> (glob)
577 To: baz@test.com, foo@bar
577 To: baz@test.com, foo@bar
578
578
579 changeset 645eb6690ecf in b
579 changeset 645eb6690ecf in b
580 description: test
580 description: test
581 (run 'hg heads' to see heads)
581 (run 'hg heads' to see heads)
582
582
583 default template:
583 default template:
584
584
585 $ grep -v '^template =' $HGRCPATH > "$HGRCPATH.new"
585 $ grep -v '^template =' $HGRCPATH > "$HGRCPATH.new"
586 $ mv "$HGRCPATH.new" $HGRCPATH
586 $ mv "$HGRCPATH.new" $HGRCPATH
587 $ echo a >> a/a
587 $ echo a >> a/a
588 $ hg --cwd a commit -m 'default template'
588 $ hg --cwd a commit -m 'default template'
589 $ hg --cwd b pull ../a -q | "$PYTHON" $TESTTMP/filter.py
589 $ hg --cwd b pull ../a -q | "$PYTHON" $TESTTMP/filter.py
590 MIME-Version: 1.0
590 MIME-Version: 1.0
591 Content-Type: text/plain; charset="us-ascii"
591 Content-Type: text/plain; charset="us-ascii"
592 Content-Transfer-Encoding: 7bit
592 Content-Transfer-Encoding: 7bit
593 Date: * (glob)
593 Date: * (glob)
594 Subject: changeset in b: default template
594 Subject: changeset in b: default template
595 From: test@test.com
595 From: test@test.com
596 X-Hg-Notification: changeset 5cd4346eed47
596 X-Hg-Notification: changeset 5cd4346eed47
597 Message-Id: <hg.5cd4346eed47.*.*@*> (glob)
597 Message-Id: <hg.5cd4346eed47.*.*@*> (glob)
598 To: baz@test.com, foo@bar
598 To: baz@test.com, foo@bar
599
599
600 changeset 5cd4346eed47 in $TESTTMP/b
600 changeset 5cd4346eed47 in $TESTTMP/b
601 details: http://test/b?cmd=changeset;node=5cd4346eed47
601 details: http://test/b?cmd=changeset;node=5cd4346eed47
602 description: default template
602 description: default template
603
603
604 with style:
604 with style:
605
605
606 $ cat <<EOF > notifystyle.map
606 $ cat <<EOF > notifystyle.map
607 > changeset = "Subject: {desc|firstline|strip}
607 > changeset = "Subject: {desc|firstline|strip}
608 > From: {author}
608 > From: {author}
609 > {""}
609 > {""}
610 > changeset {node|short}"
610 > changeset {node|short}"
611 > EOF
611 > EOF
612 $ cat <<EOF >> $HGRCPATH
612 $ cat <<EOF >> $HGRCPATH
613 > [notify]
613 > [notify]
614 > style = $TESTTMP/notifystyle.map
614 > style = $TESTTMP/notifystyle.map
615 > EOF
615 > EOF
616 $ echo a >> a/a
616 $ echo a >> a/a
617 $ hg --cwd a commit -m 'with style'
617 $ hg --cwd a commit -m 'with style'
618 $ hg --cwd b pull ../a -q | "$PYTHON" $TESTTMP/filter.py
618 $ hg --cwd b pull ../a -q | "$PYTHON" $TESTTMP/filter.py
619 MIME-Version: 1.0
619 MIME-Version: 1.0
620 Content-Type: text/plain; charset="us-ascii"
620 Content-Type: text/plain; charset="us-ascii"
621 Content-Transfer-Encoding: 7bit
621 Content-Transfer-Encoding: 7bit
622 Date: * (glob)
622 Date: * (glob)
623 Subject: with style
623 Subject: with style
624 From: test@test.com
624 From: test@test.com
625 X-Hg-Notification: changeset ec8d9d852f56
625 X-Hg-Notification: changeset ec8d9d852f56
626 Message-Id: <hg.ec8d9d852f56.*.*@*> (glob)
626 Message-Id: <hg.ec8d9d852f56.*.*@*> (glob)
627 To: baz@test.com, foo@bar
627 To: baz@test.com, foo@bar
628
628
629 changeset ec8d9d852f56
629 changeset ec8d9d852f56
630
630
631 with template (overrides style):
631 with template (overrides style):
632
632
633 $ cat <<EOF >> $HGRCPATH
633 $ cat <<EOF >> $HGRCPATH
634 > template = Subject: {node|short}: {desc|firstline|strip}
634 > template = Subject: {node|short}: {desc|firstline|strip}
635 > From: {author}
635 > From: {author}
636 > {""}
636 > {""}
637 > {desc}
637 > {desc}
638 > EOF
638 > EOF
639 $ echo a >> a/a
639 $ echo a >> a/a
640 $ hg --cwd a commit -m 'with template'
640 $ hg --cwd a commit -m 'with template'
641 $ hg --cwd b pull ../a -q | "$PYTHON" $TESTTMP/filter.py
641 $ hg --cwd b pull ../a -q | "$PYTHON" $TESTTMP/filter.py
642 MIME-Version: 1.0
642 MIME-Version: 1.0
643 Content-Type: text/plain; charset="us-ascii"
643 Content-Type: text/plain; charset="us-ascii"
644 Content-Transfer-Encoding: 7bit
644 Content-Transfer-Encoding: 7bit
645 Date: * (glob)
645 Date: * (glob)
646 Subject: 14721b538ae3: with template
646 Subject: 14721b538ae3: with template
647 From: test@test.com
647 From: test@test.com
648 X-Hg-Notification: changeset 14721b538ae3
648 X-Hg-Notification: changeset 14721b538ae3
649 Message-Id: <hg.14721b538ae3.*.*@*> (glob)
649 Message-Id: <hg.14721b538ae3.*.*@*> (glob)
650 To: baz@test.com, foo@bar
650 To: baz@test.com, foo@bar
651
651
652 with template
652 with template
653
653
654 showfunc diff
654 showfunc diff
655 $ cat <<EOF >> $HGRCPATH
655 $ cat <<EOF >> $HGRCPATH
656 > showfunc = True
656 > showfunc = True
657 > template =
657 > template =
658 > maxdiff = -1
658 > maxdiff = -1
659 > EOF
659 > EOF
660 $ cd a
660 $ cd a
661 $ cat > f1 << EOF
661 $ cat > f1 << EOF
662 > int main() {
662 > int main() {
663 > int a = 0;
663 > int a = 0;
664 > int b = 1;
664 > int b = 1;
665 > int c = 2;
665 > int c = 2;
666 > int d = 3;
666 > int d = 3;
667 > return a + b + c + d;
667 > return a + b + c + d;
668 > }
668 > }
669 > EOF
669 > EOF
670 $ hg commit -Am addfunction
670 $ hg commit -Am addfunction
671 adding f1
671 adding f1
672 $ hg --cwd ../b pull ../a
672 $ hg --cwd ../b pull ../a
673 pulling from ../a
673 pulling from ../a
674 searching for changes
674 searching for changes
675 adding changesets
675 adding changesets
676 adding manifests
676 adding manifests
677 adding file changes
677 adding file changes
678 added 1 changesets with 1 changes to 1 files
678 added 1 changesets with 1 changes to 1 files
679 new changesets b86bc16ff894
679 new changesets b86bc16ff894
680 MIME-Version: 1.0
680 MIME-Version: 1.0
681 Content-Type: text/plain; charset="us-ascii"
681 Content-Type: text/plain; charset="us-ascii"
682 Content-Transfer-Encoding: 7bit
682 Content-Transfer-Encoding: 7bit
683 Date: * (glob)
683 Date: * (glob)
684 Subject: addfunction
684 Subject: addfunction
685 From: test@test.com
685 From: test@test.com
686 X-Hg-Notification: changeset b86bc16ff894
686 X-Hg-Notification: changeset b86bc16ff894
687 Message-Id: <hg.b86bc16ff894.*.*@*> (glob)
687 Message-Id: <hg.b86bc16ff894.*.*@*> (glob)
688 To: baz@test.com, foo@bar
688 To: baz@test.com, foo@bar
689
689
690 changeset b86bc16ff894
690 changeset b86bc16ff894
691 diffs (11 lines):
691 diffs (11 lines):
692
692
693 diff -r 14721b538ae3 -r b86bc16ff894 f1
693 diff -r 14721b538ae3 -r b86bc16ff894 f1
694 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
694 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
695 +++ b/f1 Thu Jan 01 00:00:00 1970 +0000
695 +++ b/f1 Thu Jan 01 00:00:00 1970 +0000
696 @@ -0,0 +1,7 @@
696 @@ -0,0 +1,7 @@
697 +int main() {
697 +int main() {
698 + int a = 0;
698 + int a = 0;
699 + int b = 1;
699 + int b = 1;
700 + int c = 2;
700 + int c = 2;
701 + int d = 3;
701 + int d = 3;
702 + return a + b + c + d;
702 + return a + b + c + d;
703 +}
703 +}
704 (run 'hg update' to get a working copy)
704 (run 'hg update' to get a working copy)
705 $ cat > f1 << EOF
705 $ cat > f1 << EOF
706 > int main() {
706 > int main() {
707 > int a = 0;
707 > int a = 0;
708 > int b = 1;
708 > int b = 1;
709 > int c = 2;
709 > int c = 2;
710 > int e = 3;
710 > int e = 3;
711 > return a + b + c + e;
711 > return a + b + c + e;
712 > }
712 > }
713 > EOF
713 > EOF
714 $ hg commit -m changefunction
714 $ hg commit -m changefunction
715 $ hg --cwd ../b --config notify.showfunc=True pull ../a
715 $ hg --cwd ../b --config notify.showfunc=True pull ../a
716 pulling from ../a
716 pulling from ../a
717 searching for changes
717 searching for changes
718 adding changesets
718 adding changesets
719 adding manifests
719 adding manifests
720 adding file changes
720 adding file changes
721 added 1 changesets with 1 changes to 1 files
721 added 1 changesets with 1 changes to 1 files
722 new changesets e81040e9838c
722 new changesets e81040e9838c
723 MIME-Version: 1.0
723 MIME-Version: 1.0
724 Content-Type: text/plain; charset="us-ascii"
724 Content-Type: text/plain; charset="us-ascii"
725 Content-Transfer-Encoding: 7bit
725 Content-Transfer-Encoding: 7bit
726 Date: * (glob)
726 Date: * (glob)
727 Subject: changefunction
727 Subject: changefunction
728 From: test@test.com
728 From: test@test.com
729 X-Hg-Notification: changeset e81040e9838c
729 X-Hg-Notification: changeset e81040e9838c
730 Message-Id: <hg.e81040e9838c.*.*@*> (glob)
730 Message-Id: <hg.e81040e9838c.*.*@*> (glob)
731 To: baz@test.com, foo@bar
731 To: baz@test.com, foo@bar
732
732
733 changeset e81040e9838c
733 changeset e81040e9838c
734 diffs (12 lines):
734 diffs (12 lines):
735
735
736 diff -r b86bc16ff894 -r e81040e9838c f1
736 diff -r b86bc16ff894 -r e81040e9838c f1
737 --- a/f1 Thu Jan 01 00:00:00 1970 +0000
737 --- a/f1 Thu Jan 01 00:00:00 1970 +0000
738 +++ b/f1 Thu Jan 01 00:00:00 1970 +0000
738 +++ b/f1 Thu Jan 01 00:00:00 1970 +0000
739 @@ -2,6 +2,6 @@ int main() {
739 @@ -2,6 +2,6 @@ int main() {
740 int a = 0;
740 int a = 0;
741 int b = 1;
741 int b = 1;
742 int c = 2;
742 int c = 2;
743 - int d = 3;
743 - int d = 3;
744 - return a + b + c + d;
744 - return a + b + c + d;
745 + int e = 3;
745 + int e = 3;
746 + return a + b + c + e;
746 + return a + b + c + e;
747 }
747 }
748 (run 'hg update' to get a working copy)
748 (run 'hg update' to get a working copy)
General Comments 0
You need to be logged in to leave comments. Login now