Show More
@@ -1,62 +1,62 | |||||
1 | # ASCII graph log extension for Mercurial |
|
1 | # ASCII graph log extension for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2007 Joel Rosdahl <joel@rosdahl.net> |
|
3 | # Copyright 2007 Joel Rosdahl <joel@rosdahl.net> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | '''command to view revision graphs from a shell (DEPRECATED) |
|
8 | '''command to view revision graphs from a shell (DEPRECATED) | |
9 |
|
9 | |||
10 | The functionality of this extension has been include in core Mercurial |
|
10 | The functionality of this extension has been include in core Mercurial | |
11 | since version 2.3. |
|
11 | since version 2.3. | |
12 |
|
12 | |||
13 | This extension adds a --graph option to the incoming, outgoing and log |
|
13 | This extension adds a --graph option to the incoming, outgoing and log | |
14 | commands. When this options is given, an ASCII representation of the |
|
14 | commands. When this options is given, an ASCII representation of the | |
15 | revision graph is also shown. |
|
15 | revision graph is also shown. | |
16 | ''' |
|
16 | ''' | |
17 |
|
17 | |||
18 | from mercurial.i18n import _ |
|
18 | from mercurial.i18n import _ | |
19 | from mercurial import cmdutil, commands |
|
19 | from mercurial import cmdutil, commands | |
20 |
|
20 | |||
21 | cmdtable = {} |
|
21 | cmdtable = {} | |
22 | command = cmdutil.command(cmdtable) |
|
22 | command = cmdutil.command(cmdtable) | |
23 | # Note for extension authors: ONLY specify testedwith = 'internal' for |
|
23 | # Note for extension authors: ONLY specify testedwith = 'internal' for | |
24 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
24 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | |
25 | # be specifying the version(s) of Mercurial they are tested with, or |
|
25 | # be specifying the version(s) of Mercurial they are tested with, or | |
26 | # leave the attribute unspecified. |
|
26 | # leave the attribute unspecified. | |
27 | testedwith = 'internal' |
|
27 | testedwith = 'internal' | |
28 |
|
28 | |||
29 | @command('glog', |
|
29 | @command('glog', | |
30 | [('f', 'follow', None, |
|
30 | [('f', 'follow', None, | |
31 | _('follow changeset history, or file history across copies and renames')), |
|
31 | _('follow changeset history, or file history across copies and renames')), | |
32 | ('', 'follow-first', None, |
|
32 | ('', 'follow-first', None, | |
33 | _('only follow the first parent of merge changesets (DEPRECATED)')), |
|
33 | _('only follow the first parent of merge changesets (DEPRECATED)')), | |
34 | ('d', 'date', '', _('show revisions matching date spec'), _('DATE')), |
|
34 | ('d', 'date', '', _('show revisions matching date spec'), _('DATE')), | |
35 | ('C', 'copies', None, _('show copied files')), |
|
35 | ('C', 'copies', None, _('show copied files')), | |
36 | ('k', 'keyword', [], |
|
36 | ('k', 'keyword', [], | |
37 | _('do case-insensitive search for a given text'), _('TEXT')), |
|
37 | _('do case-insensitive search for a given text'), _('TEXT')), | |
38 | ('r', 'rev', [], _('show the specified revision or revset'), _('REV')), |
|
38 | ('r', 'rev', [], _('show the specified revision or revset'), _('REV')), | |
39 | ('', 'removed', None, _('include revisions where files were removed')), |
|
39 | ('', 'removed', None, _('include revisions where files were removed')), | |
40 | ('m', 'only-merges', None, _('show only merges (DEPRECATED)')), |
|
40 | ('m', 'only-merges', None, _('show only merges (DEPRECATED)')), | |
41 | ('u', 'user', [], _('revisions committed by user'), _('USER')), |
|
41 | ('u', 'user', [], _('revisions committed by user'), _('USER')), | |
42 | ('', 'only-branch', [], |
|
42 | ('', 'only-branch', [], | |
43 | _('show only changesets within the given named branch (DEPRECATED)'), |
|
43 | _('show only changesets within the given named branch (DEPRECATED)'), | |
44 | _('BRANCH')), |
|
44 | _('BRANCH')), | |
45 | ('b', 'branch', [], |
|
45 | ('b', 'branch', [], | |
46 | _('show changesets within the given named branch'), _('BRANCH')), |
|
46 | _('show changesets within the given named branch'), _('BRANCH')), | |
47 | ('P', 'prune', [], |
|
47 | ('P', 'prune', [], | |
48 | _('do not display revision or any of its ancestors'), _('REV')), |
|
48 | _('do not display revision or any of its ancestors'), _('REV')), | |
49 | ] + commands.logopts + commands.walkopts, |
|
49 | ] + commands.logopts + commands.walkopts, | |
50 | _('[OPTION]... [FILE]'), |
|
50 | _('[OPTION]... [FILE]'), | |
51 | inferrepo=True) |
|
51 | inferrepo=True) | |
52 |
def g |
|
52 | def glog(ui, repo, *pats, **opts): | |
53 | """show revision history alongside an ASCII revision graph |
|
53 | """show revision history alongside an ASCII revision graph | |
54 |
|
54 | |||
55 | Print a revision history alongside a revision graph drawn with |
|
55 | Print a revision history alongside a revision graph drawn with | |
56 | ASCII characters. |
|
56 | ASCII characters. | |
57 |
|
57 | |||
58 | Nodes printed as an @ character are parents of the working |
|
58 | Nodes printed as an @ character are parents of the working | |
59 | directory. |
|
59 | directory. | |
60 | """ |
|
60 | """ | |
61 | opts['graph'] = True |
|
61 | opts['graph'] = True | |
62 | return commands.log(ui, repo, *pats, **opts) |
|
62 | return commands.log(ui, repo, *pats, **opts) |
General Comments 0
You need to be logged in to leave comments.
Login now