Mercurial > hg
comparison hgext/graphlog.py @ 16432:365bb0fa73a4
graphlog: add all log options to glog command
glog and log -G should be equivalent.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sat, 14 Apr 2012 10:44:13 +0200 |
parents | c85098cdd7df |
children | e38b29937118 |
comparison
equal
deleted
inserted
replaced
16431:c85098cdd7df | 16432:365bb0fa73a4 |
---|---|
11 commands. When this options is given, an ASCII representation of the | 11 commands. When this options is given, an ASCII representation of the |
12 revision graph is also shown. | 12 revision graph is also shown. |
13 ''' | 13 ''' |
14 | 14 |
15 from mercurial.cmdutil import show_changeset | 15 from mercurial.cmdutil import show_changeset |
16 from mercurial.commands import templateopts | |
17 from mercurial.i18n import _ | 16 from mercurial.i18n import _ |
18 from mercurial.node import nullrev | 17 from mercurial.node import nullrev |
19 from mercurial import cmdutil, commands, extensions, scmutil | 18 from mercurial import cmdutil, commands, extensions, scmutil |
20 from mercurial import hg, util, graphmod, templatekw, revset | 19 from mercurial import hg, util, graphmod, templatekw, revset |
21 | 20 |
455 for type, char, lines, coldata in edges: | 454 for type, char, lines, coldata in edges: |
456 ascii(ui, state, type, char, lines, coldata) | 455 ascii(ui, state, type, char, lines, coldata) |
457 displayer.close() | 456 displayer.close() |
458 | 457 |
459 @command('glog', | 458 @command('glog', |
460 [('l', 'limit', '', | 459 [('f', 'follow', None, |
461 _('limit number of changes displayed'), _('NUM')), | 460 _('follow changeset history, or file history across copies and renames')), |
462 ('p', 'patch', False, _('show patch')), | 461 ('', 'follow-first', None, |
462 _('only follow the first parent of merge changesets (DEPRECATED)')), | |
463 ('d', 'date', '', _('show revisions matching date spec'), _('DATE')), | |
464 ('C', 'copies', None, _('show copied files')), | |
465 ('k', 'keyword', [], | |
466 _('do case-insensitive search for a given text'), _('TEXT')), | |
463 ('r', 'rev', [], _('show the specified revision or range'), _('REV')), | 467 ('r', 'rev', [], _('show the specified revision or range'), _('REV')), |
464 ] + templateopts, | 468 ('', 'removed', None, _('include revisions where files were removed')), |
465 _('hg glog [OPTION]... [FILE]')) | 469 ('m', 'only-merges', None, _('show only merges (DEPRECATED)')), |
470 ('u', 'user', [], _('revisions committed by user'), _('USER')), | |
471 ('', 'only-branch', [], | |
472 _('show only changesets within the given named branch (DEPRECATED)'), | |
473 _('BRANCH')), | |
474 ('b', 'branch', [], | |
475 _('show changesets within the given named branch'), _('BRANCH')), | |
476 ('P', 'prune', [], | |
477 _('do not display revision or any of its ancestors'), _('REV')), | |
478 ('', 'hidden', False, _('show hidden changesets (DEPRECATED)')), | |
479 ] + commands.logopts + commands.walkopts, | |
480 _('[OPTION]... [FILE]')) | |
466 def graphlog(ui, repo, *pats, **opts): | 481 def graphlog(ui, repo, *pats, **opts): |
467 """show revision history alongside an ASCII revision graph | 482 """show revision history alongside an ASCII revision graph |
468 | 483 |
469 Print a revision history alongside a revision graph drawn with | 484 Print a revision history alongside a revision graph drawn with |
470 ASCII characters. | 485 ASCII characters. |
471 | 486 |
472 Nodes printed as an @ character are parents of the working | 487 Nodes printed as an @ character are parents of the working |
473 directory. | 488 directory. |
474 """ | 489 """ |
475 | |
476 check_unsupported_flags(pats, opts) | |
477 | 490 |
478 revs, expr, filematcher = getlogrevs(repo, pats, opts) | 491 revs, expr, filematcher = getlogrevs(repo, pats, opts) |
479 revs = sorted(revs, reverse=1) | 492 revs = sorted(revs, reverse=1) |
480 limit = cmdutil.loglimit(opts) | 493 limit = cmdutil.loglimit(opts) |
481 if limit is not None: | 494 if limit is not None: |