##// END OF EJS Templates
notify: various fixes to docstring...
David Champion -
r16950:0fdd8193 stable
parent child Browse files
Show More
@@ -7,13 +7,13 b''
7
7
8 '''hooks for sending email push notifications
8 '''hooks for sending email push notifications
9
9
10 This extension let you run hooks sending email notifications when
10 This extension implements hooks to send email notifications when
11 changesets are being pushed, from the sending or receiving side.
11 changesets are sent from or received by the local repository.
12
12
13 First, enable the extension as explained in :hg:`help extensions`, and
13 First, enable the extension as explained in :hg:`help extensions`, and
14 register the hook you want to run. ``incoming`` and ``changegroup`` hooks
14 register the hook you want to run. ``incoming`` and ``changegroup`` hooks
15 are run by the changesets receiver while the ``outgoing`` one is for
15 are run when changesets are received, while ``outgoing`` hooks are for
16 the sender::
16 changesets sent to another repository::
17
17
18 [hooks]
18 [hooks]
19 # one email for each incoming changeset
19 # one email for each incoming changeset
@@ -24,13 +24,13 b' the sender::'
24 # one email for all outgoing changesets
24 # one email for all outgoing changesets
25 outgoing.notify = python:hgext.notify.hook
25 outgoing.notify = python:hgext.notify.hook
26
26
27 Now the hooks are running, subscribers must be assigned to
27 This registers the hooks. To enable notification, subscribers must
28 repositories. Use the ``[usersubs]`` section to map repositories to a
28 be assigned to repositories. The ``[usersubs]`` section maps multiple
29 given email or the ``[reposubs]`` section to map emails to a single
29 repositories to a given recipient. The ``[reposubs]`` section maps
30 repository::
30 multiple recipients to a single repository::
31
31
32 [usersubs]
32 [usersubs]
33 # key is subscriber email, value is a comma-separated list of glob
33 # key is subscriber email, value is a comma-separated list of repo glob
34 # patterns
34 # patterns
35 user@host = pattern
35 user@host = pattern
36
36
@@ -40,17 +40,17 b' repository::'
40 pattern = user@host
40 pattern = user@host
41
41
42 Glob patterns are matched against absolute path to repository
42 Glob patterns are matched against absolute path to repository
43 root. The subscriptions can be defined in their own file and
43 root.
44 referenced with::
44
45 In order to place them under direct user management, ``[usersubs]`` and
46 ``[reposubs]`` sections may be placed in a separate ``hgrc`` file and
47 incorporated by reference::
45
48
46 [notify]
49 [notify]
47 config = /path/to/subscriptionsfile
50 config = /path/to/subscriptionsfile
48
51
49 Alternatively, they can be added to Mercurial configuration files by
52 Notifications will not be sent until the ``notify.test`` value is set
50 setting the previous entry to an empty value.
53 to ``False``; see below.
51
52 At this point, notifications should be generated but will not be sent until you
53 set the ``notify.test`` entry to ``False``.
54
54
55 Notifications content can be tweaked with the following configuration entries:
55 Notifications content can be tweaked with the following configuration entries:
56
56
@@ -58,23 +58,25 b' notify.test'
58 If ``True``, print messages to stdout instead of sending them. Default: True.
58 If ``True``, print messages to stdout instead of sending them. Default: True.
59
59
60 notify.sources
60 notify.sources
61 Space separated list of change sources. Notifications are sent only
61 Space-separated list of change sources. Notifications are activated only
62 if it includes the incoming or outgoing changes source. Incoming
62 when a changeset's source is in this list. Sources may be:
63 sources can be ``serve`` for changes coming from http or ssh,
63
64 ``pull`` for pulled changes, ``unbundle`` for changes added by
64 :``serve``: changesets received via http or ssh
65 :hg:`unbundle` or ``push`` for changes being pushed
65 :``pull``: changesets received via ``hg pull``
66 locally. Outgoing sources are the same except for ``unbundle`` which
66 :``unbundle``: changesets received via ``hg unbundle``
67 is replaced by ``bundle``. Default: serve.
67 :``push``: changesets sent or received via ``hg push``
68 :``bundle``: changesets sent via ``hg unbundle``
69
70 Default: serve.
68
71
69 notify.strip
72 notify.strip
70 Number of leading slashes to strip from url paths. By default, notifications
73 Number of leading slashes to strip from url paths. By default, notifications
71 references repositories with their absolute path. ``notify.strip`` let you
74 reference repositories with their absolute path. ``notify.strip`` lets you
72 turn them into relative paths. For example, ``notify.strip=3`` will change
75 turn them into relative paths. For example, ``notify.strip=3`` will change
73 ``/long/path/repository`` into ``repository``. Default: 0.
76 ``/long/path/repository`` into ``repository``. Default: 0.
74
77
75 notify.domain
78 notify.domain
76 If subscribers emails or the from email have no domain set, complete them
79 Default email domain for sender or recipients with no explicit domain.
77 with this value.
78
80
79 notify.style
81 notify.style
80 Style file to use when formatting emails.
82 Style file to use when formatting emails.
@@ -83,21 +85,21 b' notify.template'
83 Template to use when formatting emails.
85 Template to use when formatting emails.
84
86
85 notify.incoming
87 notify.incoming
86 Template to use when run as incoming hook, override ``notify.template``.
88 Template to use when run as an incoming hook, overriding ``notify.template``.
87
89
88 notify.outgoing
90 notify.outgoing
89 Template to use when run as outgoing hook, override ``notify.template``.
91 Template to use when run as an outgoing hook, overriding ``notify.template``.
90
92
91 notify.changegroup
93 notify.changegroup
92 Template to use when running as changegroup hook, override
94 Template to use when running as a changegroup hook, overriding
93 ``notify.template``.
95 ``notify.template``.
94
96
95 notify.maxdiff
97 notify.maxdiff
96 Maximum number of diff lines to include in notification email. Set to 0
98 Maximum number of diff lines to include in notification email. Set to 0
97 to disable the diff, -1 to include all of it. Default: 300.
99 to disable the diff, or -1 to include all of it. Default: 300.
98
100
99 notify.maxsubject
101 notify.maxsubject
100 Maximum number of characters in emails subject line. Default: 67.
102 Maximum number of characters in email's subject line. Default: 67.
101
103
102 notify.diffstat
104 notify.diffstat
103 Set to True to include a diffstat before diff content. Default: True.
105 Set to True to include a diffstat before diff content. Default: True.
@@ -109,17 +111,19 b' notify.mbox'
109 If set, append mails to this mbox file instead of sending. Default: None.
111 If set, append mails to this mbox file instead of sending. Default: None.
110
112
111 notify.fromauthor
113 notify.fromauthor
112 If set, use the first committer of the changegroup for the "From" field of
114 If set, use the committer of the first changeset in a changegroup for
113 the notification mail. If not set, take the user from the pushing repo.
115 the "From" field of the notification mail. If not set, take the user
114 Default: False.
116 from the pushing repo. Default: False.
115
117
116 If set, the following entries will also be used to customize the notifications:
118 If set, the following entries will also be used to customize the
119 notifications:
117
120
118 email.from
121 email.from
119 Email ``From`` address to use if none can be found in generated email content.
122 Email ``From`` address to use if none can be found in the generated
123 email content.
120
124
121 web.baseurl
125 web.baseurl
122 Root repository browsing URL to combine with repository paths when making
126 Root repository URL to combine with repository paths when making
123 references. See also ``notify.strip``.
127 references. See also ``notify.strip``.
124
128
125 '''
129 '''
@@ -19,12 +19,13 b''
19 $ hg help notify
19 $ hg help notify
20 notify extension - hooks for sending email push notifications
20 notify extension - hooks for sending email push notifications
21
21
22 This extension let you run hooks sending email notifications when changesets
22 This extension implements hooks to send email notifications when changesets
23 are being pushed, from the sending or receiving side.
23 are sent from or received by the local repository.
24
24
25 First, enable the extension as explained in "hg help extensions", and register
25 First, enable the extension as explained in "hg help extensions", and register
26 the hook you want to run. "incoming" and "changegroup" hooks are run by the
26 the hook you want to run. "incoming" and "changegroup" hooks are run when
27 changesets receiver while the "outgoing" one is for the sender:
27 changesets are received, while "outgoing" hooks are for changesets sent to
28 another repository:
28
29
29 [hooks]
30 [hooks]
30 # one email for each incoming changeset
31 # one email for each incoming changeset
@@ -35,12 +36,13 b''
35 # one email for all outgoing changesets
36 # one email for all outgoing changesets
36 outgoing.notify = python:hgext.notify.hook
37 outgoing.notify = python:hgext.notify.hook
37
38
38 Now the hooks are running, subscribers must be assigned to repositories. Use
39 This registers the hooks. To enable notification, subscribers must be assigned
39 the "[usersubs]" section to map repositories to a given email or the
40 to repositories. The "[usersubs]" section maps multiple repositories to a
40 "[reposubs]" section to map emails to a single repository:
41 given recipient. The "[reposubs]" section maps multiple recipients to a single
42 repository:
41
43
42 [usersubs]
44 [usersubs]
43 # key is subscriber email, value is a comma-separated list of glob
45 # key is subscriber email, value is a comma-separated list of repo glob
44 # patterns
46 # patterns
45 user@host = pattern
47 user@host = pattern
46
48
@@ -49,17 +51,17 b''
49 # emails
51 # emails
50 pattern = user@host
52 pattern = user@host
51
53
52 Glob patterns are matched against absolute path to repository root. The
54 Glob patterns are matched against absolute path to repository root.
53 subscriptions can be defined in their own file and referenced with:
55
56 In order to place them under direct user management, "[usersubs]" and
57 "[reposubs]" sections may be placed in a separate "hgrc" file and incorporated
58 by reference:
54
59
55 [notify]
60 [notify]
56 config = /path/to/subscriptionsfile
61 config = /path/to/subscriptionsfile
57
62
58 Alternatively, they can be added to Mercurial configuration files by setting
63 Notifications will not be sent until the "notify.test" value is set to
59 the previous entry to an empty value.
64 "False"; see below.
60
61 At this point, notifications should be generated but will not be sent until
62 you set the "notify.test" entry to "False".
63
65
64 Notifications content can be tweaked with the following configuration entries:
66 Notifications content can be tweaked with the following configuration entries:
65
67
@@ -67,22 +69,25 b''
67 If "True", print messages to stdout instead of sending them. Default: True.
69 If "True", print messages to stdout instead of sending them. Default: True.
68
70
69 notify.sources
71 notify.sources
70 Space separated list of change sources. Notifications are sent only if it
72 Space-separated list of change sources. Notifications are activated only
71 includes the incoming or outgoing changes source. Incoming sources can be
73 when a changeset's source is in this list. Sources may be:
72 "serve" for changes coming from http or ssh, "pull" for pulled changes,
74
73 "unbundle" for changes added by "hg unbundle" or "push" for changes being
75 "serve" changesets received via http or ssh
74 pushed locally. Outgoing sources are the same except for "unbundle" which is
76 "pull" changesets received via "hg pull"
75 replaced by "bundle". Default: serve.
77 "unbundle" changesets received via "hg unbundle"
78 "push" changesets sent or received via "hg push"
79 "bundle" changesets sent via "hg unbundle"
80
81 Default: serve.
76
82
77 notify.strip
83 notify.strip
78 Number of leading slashes to strip from url paths. By default, notifications
84 Number of leading slashes to strip from url paths. By default, notifications
79 references repositories with their absolute path. "notify.strip" let you
85 reference repositories with their absolute path. "notify.strip" lets you
80 turn them into relative paths. For example, "notify.strip=3" will change
86 turn them into relative paths. For example, "notify.strip=3" will change
81 "/long/path/repository" into "repository". Default: 0.
87 "/long/path/repository" into "repository". Default: 0.
82
88
83 notify.domain
89 notify.domain
84 If subscribers emails or the from email have no domain set, complete them
90 Default email domain for sender or recipients with no explicit domain.
85 with this value.
86
91
87 notify.style
92 notify.style
88 Style file to use when formatting emails.
93 Style file to use when formatting emails.
@@ -91,21 +96,21 b''
91 Template to use when formatting emails.
96 Template to use when formatting emails.
92
97
93 notify.incoming
98 notify.incoming
94 Template to use when run as incoming hook, override "notify.template".
99 Template to use when run as an incoming hook, overriding "notify.template".
95
100
96 notify.outgoing
101 notify.outgoing
97 Template to use when run as outgoing hook, override "notify.template".
102 Template to use when run as an outgoing hook, overriding "notify.template".
98
103
99 notify.changegroup
104 notify.changegroup
100 Template to use when running as changegroup hook, override
105 Template to use when running as a changegroup hook, overriding
101 "notify.template".
106 "notify.template".
102
107
103 notify.maxdiff
108 notify.maxdiff
104 Maximum number of diff lines to include in notification email. Set to 0 to
109 Maximum number of diff lines to include in notification email. Set to 0 to
105 disable the diff, -1 to include all of it. Default: 300.
110 disable the diff, or -1 to include all of it. Default: 300.
106
111
107 notify.maxsubject
112 notify.maxsubject
108 Maximum number of characters in emails subject line. Default: 67.
113 Maximum number of characters in email's subject line. Default: 67.
109
114
110 notify.diffstat
115 notify.diffstat
111 Set to True to include a diffstat before diff content. Default: True.
116 Set to True to include a diffstat before diff content. Default: True.
@@ -117,19 +122,20 b''
117 If set, append mails to this mbox file instead of sending. Default: None.
122 If set, append mails to this mbox file instead of sending. Default: None.
118
123
119 notify.fromauthor
124 notify.fromauthor
120 If set, use the first committer of the changegroup for the "From" field of
125 If set, use the committer of the first changeset in a changegroup for the
121 the notification mail. If not set, take the user from the pushing repo.
126 "From" field of the notification mail. If not set, take the user from the
122 Default: False.
127 pushing repo. Default: False.
123
128
124 If set, the following entries will also be used to customize the
129 If set, the following entries will also be used to customize the
125 notifications:
130 notifications:
126
131
127 email.from
132 email.from
128 Email "From" address to use if none can be found in generated email content.
133 Email "From" address to use if none can be found in the generated email
134 content.
129
135
130 web.baseurl
136 web.baseurl
131 Root repository browsing URL to combine with repository paths when making
137 Root repository URL to combine with repository paths when making references.
132 references. See also "notify.strip".
138 See also "notify.strip".
133
139
134 no commands defined
140 no commands defined
135 $ hg init a
141 $ hg init a
General Comments 0
You need to be logged in to leave comments. Login now