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