comparison hgext/graphlog.py @ 9259:19a4b8fd5c48

graphlog: wrap docstrings at 70 characters
author Martin Geisler <mg@lazybytes.net>
date Sun, 26 Jul 2009 01:46:28 +0200
parents 061eeb602354
children 8a4773bcbaec
comparison
equal deleted inserted replaced
9258:1aeb22492b25 9259:19a4b8fd5c48
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 '''command to view revision graphs from a shell 8 '''command to view revision graphs from a shell
9 9
10 This extension adds a --graph option to the incoming, outgoing and log 10 This extension adds a --graph option to the incoming, outgoing and log
11 commands. When this options is given, an ASCII representation of the revision 11 commands. When this options is given, an ASCII representation of the
12 graph is also shown. 12 revision graph is also shown.
13 ''' 13 '''
14 14
15 import os, sys 15 import os, sys
16 from mercurial.cmdutil import revrange, show_changeset 16 from mercurial.cmdutil import revrange, show_changeset
17 from mercurial.commands import templateopts 17 from mercurial.commands import templateopts
236 raise util.Abort(_("--graph option is incompatible with --%s") % op) 236 raise util.Abort(_("--graph option is incompatible with --%s") % op)
237 237
238 def graphlog(ui, repo, path=None, **opts): 238 def graphlog(ui, repo, path=None, **opts):
239 """show revision history alongside an ASCII revision graph 239 """show revision history alongside an ASCII revision graph
240 240
241 Print a revision history alongside a revision graph drawn with ASCII 241 Print a revision history alongside a revision graph drawn with
242 characters. 242 ASCII characters.
243 243
244 Nodes printed as an @ character are parents of the working directory. 244 Nodes printed as an @ character are parents of the working
245 directory.
245 """ 246 """
246 247
247 check_unsupported_flags(opts) 248 check_unsupported_flags(opts)
248 limit = cmdutil.loglimit(opts) 249 limit = cmdutil.loglimit(opts)
249 start, stop = get_revs(repo, opts["rev"]) 250 start, stop = get_revs(repo, opts["rev"])
297 ascii(ui, asciiedges(fmtdag)) 298 ascii(ui, asciiedges(fmtdag))
298 299
299 def gincoming(ui, repo, source="default", **opts): 300 def gincoming(ui, repo, source="default", **opts):
300 """show the incoming changesets alongside an ASCII revision graph 301 """show the incoming changesets alongside an ASCII revision graph
301 302
302 Print the incoming changesets alongside a revision graph drawn with ASCII 303 Print the incoming changesets alongside a revision graph drawn with
303 characters. 304 ASCII characters.
304 305
305 Nodes printed as an @ character are parents of the working directory. 306 Nodes printed as an @ character are parents of the working
307 directory.
306 """ 308 """
307 309
308 check_unsupported_flags(opts) 310 check_unsupported_flags(opts)
309 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev')) 311 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
310 other = hg.repository(cmdutil.remoteui(repo, opts), source) 312 other = hg.repository(cmdutil.remoteui(repo, opts), source)