comparison hgext/notify.py @ 9266:0efb3360bdb3

notify: wrap docstrings at 70 characters
author Martin Geisler <mg@lazybytes.net>
date Sun, 26 Jul 2009 01:55:18 +0200
parents 9261667e9b82
children 23cf7b52785a
comparison
equal deleted inserted replaced
9265:39426716a07e 9266:0efb3360bdb3
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2, incorporated herein by reference. 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 '''hooks for sending email notifications at commit/push time 8 '''hooks for sending email notifications at commit/push time
9 9
10 Subscriptions can be managed through a hgrc file. Default mode is to print 10 Subscriptions can be managed through a hgrc file. Default mode is to
11 messages to stdout, for testing and configuring. 11 print messages to stdout, for testing and configuring.
12 12
13 To use, configure the notify extension and enable it in hgrc like this:: 13 To use, configure the notify extension and enable it in hgrc like
14 this::
14 15
15 [extensions] 16 [extensions]
16 hgext.notify = 17 hgext.notify =
17 18
18 [hooks] 19 [hooks]
45 [email] 46 [email]
46 from = user@host.com # email address to send as if none given 47 from = user@host.com # email address to send as if none given
47 [web] 48 [web]
48 baseurl = http://hgserver/... # root of hg web site for browsing commits 49 baseurl = http://hgserver/... # root of hg web site for browsing commits
49 50
50 The notify config file has same format as a regular hgrc file. It has two 51 The notify config file has same format as a regular hgrc file. It has
51 sections so you can express subscriptions in whatever way is handier for you. 52 two sections so you can express subscriptions in whatever way is
53 handier for you.
52 54
53 :: 55 ::
54 56
55 [usersubs] 57 [usersubs]
56 # key is subscriber email, value is ","-separated list of glob patterns 58 # key is subscriber email, value is ","-separated list of glob patterns
60 # key is glob pattern, value is ","-separated list of subscriber emails 62 # key is glob pattern, value is ","-separated list of subscriber emails
61 pattern = user@host 63 pattern = user@host
62 64
63 Glob patterns are matched against path to repository root. 65 Glob patterns are matched against path to repository root.
64 66
65 If you like, you can put notify config file in repository that users can push 67 If you like, you can put notify config file in repository that users
66 changes to, they can manage their own subscriptions. 68 can push changes to, they can manage their own subscriptions.
67 ''' 69 '''
68 70
69 from mercurial.i18n import _ 71 from mercurial.i18n import _
70 from mercurial import patch, cmdutil, templater, util, mail 72 from mercurial import patch, cmdutil, templater, util, mail
71 import email.Parser, fnmatch, socket, time 73 import email.Parser, fnmatch, socket, time