Mercurial > hg
comparison hgext/churn.py @ 6666:53465a7464e2
convert comments to docstrings in a bunch of extensions
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Thu, 12 Jun 2008 11:33:47 +0200 |
parents | 7fc87fa485e5 |
children | fb42030d79d6 |
comparison
equal
deleted
inserted
replaced
6665:73f49bef13ad | 6666:53465a7464e2 |
---|---|
2 # | 2 # |
3 # Copyright 2006 Josef "Jeff" Sipek <jeffpc@josefsipek.net> | 3 # Copyright 2006 Josef "Jeff" Sipek <jeffpc@josefsipek.net> |
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 |
16 import os, sys | 11 import os, sys |
17 | 12 |
135 sys.stdout.flush() | 130 sys.stdout.flush() |
136 | 131 |
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: |
144 return s + " " * (l-len(s)) | 143 return s + " " * (l-len(s)) |
145 return s[0:l] | 144 return s[0:l] |