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