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