##// END OF EJS Templates
convert comments to docstrings in a bunch of extensions
Dirkjan Ochtman -
r6666:53465a74 default
parent child Browse files
Show More
@@ -4,12 +4,7 b''
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7 #
7 '''allow graphing the number of lines changed per contributor'''
8 #
9 # Aliases map file format is simple one alias per line in the following
10 # format:
11 #
12 # <alias email> <actual email>
13
8
14 from mercurial.i18n import gettext as _
9 from mercurial.i18n import gettext as _
15 from mercurial import mdiff, cmdutil, util, node
10 from mercurial import mdiff, cmdutil, util, node
@@ -137,7 +132,11 b' def gather_stats(ui, repo, amap, revs=No'
137 return stats
132 return stats
138
133
139 def churn(ui, repo, **opts):
134 def churn(ui, repo, **opts):
140 "Graphs the number of lines changed"
135 '''graphs the number of lines changed
136
137 The map file format used to specify aliases is fairly simple:
138
139 <alias email> <actual email>'''
141
140
142 def pad(s, l):
141 def pad(s, l):
143 if len(s) < l:
142 if len(s) < l:
@@ -4,6 +4,7 b''
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7 '''converting foreign VCS repositories to Mercurial'''
7
8
8 import convcmd
9 import convcmd
9 from mercurial import commands
10 from mercurial import commands
@@ -4,6 +4,7 b''
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7 '''pulling, updating and merging in one command'''
7
8
8 from mercurial.i18n import _
9 from mercurial.i18n import _
9 from mercurial.node import nullid, short
10 from mercurial.node import nullid, short
@@ -4,6 +4,7 b''
4 #
4 #
5 # This software may be used and distributed according to the terms of
5 # This software may be used and distributed according to the terms of
6 # the GNU General Public License, incorporated herein by reference.
6 # the GNU General Public License, incorporated herein by reference.
7 '''show revision graphs in terminal windows'''
7
8
8 import os
9 import os
9 import sys
10 import sys
@@ -4,46 +4,45 b''
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7 #
7 '''browsing the repository in a graphical way
8 # The hgk extension allows browsing the history of a repository in a
8
9 # graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is
9 The hgk extension allows browsing the history of a repository in a
10 # not distributed with Mercurial.)
10 graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is
11 #
11 not distributed with Mercurial.)
12 # hgk consists of two parts: a Tcl script that does the displaying and
12
13 # querying of information, and an extension to mercurial named hgk.py,
13 hgk consists of two parts: a Tcl script that does the displaying and
14 # which provides hooks for hgk to get information. hgk can be found in
14 querying of information, and an extension to mercurial named hgk.py,
15 # the contrib directory, and hgk.py can be found in the hgext
15 which provides hooks for hgk to get information. hgk can be found in
16 # directory.
16 the contrib directory, and hgk.py can be found in the hgext directory.
17 #
17
18 # To load the hgext.py extension, add it to your .hgrc file (you have
18 To load the hgext.py extension, add it to your .hgrc file (you have
19 # to use your global $HOME/.hgrc file, not one in a repository). You
19 to use your global $HOME/.hgrc file, not one in a repository). You
20 # can specify an absolute path:
20 can specify an absolute path:
21 #
21
22 # [extensions]
22 [extensions]
23 # hgk=/usr/local/lib/hgk.py
23 hgk=/usr/local/lib/hgk.py
24 #
24
25 # Mercurial can also scan the default python library path for a file
25 Mercurial can also scan the default python library path for a file
26 # named 'hgk.py' if you set hgk empty:
26 named 'hgk.py' if you set hgk empty:
27 #
27
28 # [extensions]
28 [extensions]
29 # hgk=
29 hgk=
30 #
30
31 # The hg view command will launch the hgk Tcl script. For this command
31 The hg view command will launch the hgk Tcl script. For this command
32 # to work, hgk must be in your search path. Alternately, you can
32 to work, hgk must be in your search path. Alternately, you can
33 # specify the path to hgk in your .hgrc file:
33 specify the path to hgk in your .hgrc file:
34 #
34
35 # [hgk]
35 [hgk]
36 # path=/location/of/hgk
36 path=/location/of/hgk
37 #
37
38 # hgk can make use of the extdiff extension to visualize
38 hgk can make use of the extdiff extension to visualize revisions.
39 # revisions. Assuming you had already configured extdiff vdiff
39 Assuming you had already configured extdiff vdiff command, just add:
40 # command, just add:
40
41 #
41 [hgk]
42 # [hgk]
42 vdiff=vdiff
43 # vdiff=vdiff
43
44 #
44 Revisions context menu will now display additional entries to fire
45 # Revisions context menu will now display additional entries to fire
45 vdiff on hovered and selected revisions.'''
46 # vdiff on hovered and selected revisions.
47
46
48 import os
47 import os
49 from mercurial import commands, util, patch, revlog, cmdutil
48 from mercurial import commands, util, patch, revlog, cmdutil
@@ -1,6 +1,4 b''
1 """
1 """a mercurial extension for syntax highlighting in hgweb
2 This is Mercurial extension for syntax highlighting in the file
3 revision view of hgweb.
4
2
5 It depends on the pygments syntax highlighting library:
3 It depends on the pygments syntax highlighting library:
6 http://pygments.org/
4 http://pygments.org/
@@ -1,68 +1,65 b''
1 # Command for sending a collection of Mercurial changesets as a series
1 '''sending Mercurial changesets as a series of patch emails
2 # of patch emails.
2
3 #
3 The series is started off with a "[PATCH 0 of N]" introduction,
4 # The series is started off with a "[PATCH 0 of N]" introduction,
4 which describes the series as a whole.
5 # which describes the series as a whole.
5
6 #
6 Each patch email has a Subject line of "[PATCH M of N] ...", using
7 # Each patch email has a Subject line of "[PATCH M of N] ...", using
7 the first line of the changeset description as the subject text.
8 # the first line of the changeset description as the subject text.
8 The message contains two or three body parts:
9 # The message contains two or three body parts:
9
10 #
10 The remainder of the changeset description.
11 # The remainder of the changeset description.
11
12 #
12 [Optional] If the diffstat program is installed, the result of
13 # [Optional] If the diffstat program is installed, the result of
13 running diffstat on the patch.
14 # running diffstat on the patch.
14
15 #
15 The patch itself, as generated by "hg export".
16 # The patch itself, as generated by "hg export".
16
17 #
17 Each message refers to all of its predecessors using the In-Reply-To
18 # Each message refers to all of its predecessors using the In-Reply-To
18 and References headers, so they will show up as a sequence in
19 # and References headers, so they will show up as a sequence in
19 threaded mail and news readers, and in mail archives.
20 # threaded mail and news readers, and in mail archives.
20
21 #
21 For each changeset, you will be prompted with a diffstat summary and
22 # For each changeset, you will be prompted with a diffstat summary and
22 the changeset summary, so you can be sure you are sending the right changes.
23 # the changeset summary, so you can be sure you are sending the right
23
24 # changes.
24 To enable this extension:
25 #
25
26 # To enable this extension:
26 [extensions]
27 #
27 hgext.patchbomb =
28 # [extensions]
28
29 # hgext.patchbomb =
29 To configure other defaults, add a section like this to your hgrc file:
30 #
30
31 # To configure other defaults, add a section like this to your hgrc
31 [email]
32 # file:
32 from = My Name <my@email>
33 #
33 to = recipient1, recipient2, ...
34 # [email]
34 cc = cc1, cc2, ...
35 # from = My Name <my@email>
35 bcc = bcc1, bcc2, ...
36 # to = recipient1, recipient2, ...
36
37 # cc = cc1, cc2, ...
37 Then you can use the "hg email" command to mail a series of changesets
38 # bcc = bcc1, bcc2, ...
38 as a patchbomb.
39 #
39
40 # Then you can use the "hg email" command to mail a series of changesets
40 To avoid sending patches prematurely, it is a good idea to first run
41 # as a patchbomb.
41 the "email" command with the "-n" option (test only). You will be
42 #
42 prompted for an email recipient address, a subject an an introductory
43 # To avoid sending patches prematurely, it is a good idea to first run
43 message describing the patches of your patchbomb. Then when all is
44 # the "email" command with the "-n" option (test only). You will be
44 done, patchbomb messages are displayed. If PAGER environment variable
45 # prompted for an email recipient address, a subject an an introductory
45 is set, your pager will be fired up once for each patchbomb message, so
46 # message describing the patches of your patchbomb. Then when all is
46 you can verify everything is alright.
47 # done, patchbomb messages are displayed. If PAGER environment variable
47
48 # is set, your pager will be fired up once for each patchbomb message, so
48 The "-m" (mbox) option is also very useful. Instead of previewing
49 # you can verify everything is alright.
49 each patchbomb message in a pager or sending the messages directly,
50 #
50 it will create a UNIX mailbox file with the patch emails. This
51 # The "-m" (mbox) option is also very useful. Instead of previewing
51 mailbox file can be previewed with any mail user agent which supports
52 # each patchbomb message in a pager or sending the messages directly,
52 UNIX mbox files, i.e. with mutt:
53 # it will create a UNIX mailbox file with the patch emails. This
53
54 # mailbox file can be previewed with any mail user agent which supports
54 % mutt -R -f mbox
55 # UNIX mbox files, i.e. with mutt:
55
56 #
56 When you are previewing the patchbomb messages, you can use `formail'
57 # % mutt -R -f mbox
57 (a utility that is commonly installed as part of the procmail package),
58 #
58 to send each message out:
59 # When you are previewing the patchbomb messages, you can use `formail'
59
60 # (a utility that is commonly installed as part of the procmail package),
60 % formail -s sendmail -bm -t < mbox
61 # to send each message out:
61
62 #
62 That should be all. Now your patchbomb is on its way out.'''
63 # % formail -s sendmail -bm -t < mbox
64 #
65 # That should be all. Now your patchbomb is on its way out.
66
63
67 import os, errno, socket, tempfile, cStringIO
64 import os, errno, socket, tempfile, cStringIO
68 import email.MIMEMultipart, email.MIMEText, email.MIMEBase
65 import email.MIMEMultipart, email.MIMEText, email.MIMEBase
General Comments 0
You need to be logged in to leave comments. Login now