Mercurial > public > mercurial-scm > hg-stable
comparison hgext/graphlog.py @ 6192:cd65a67aff31
Introduce templateopts and logopts to reduce duplicate option definitions.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 29 Feb 2008 02:45:12 +0100 |
parents | 6dcc190ffc36 |
children | e75aab656f46 |
comparison
equal
deleted
inserted
replaced
6191:01594b0c86e2 | 6192:cd65a67aff31 |
---|---|
6 # the GNU General Public License, incorporated herein by reference. | 6 # the GNU General Public License, incorporated herein by reference. |
7 | 7 |
8 import os | 8 import os |
9 import sys | 9 import sys |
10 from mercurial.cmdutil import revrange, show_changeset | 10 from mercurial.cmdutil import revrange, show_changeset |
11 from mercurial.commands import templateopts | |
11 from mercurial.i18n import _ | 12 from mercurial.i18n import _ |
12 from mercurial.node import nullid, nullrev | 13 from mercurial.node import nullid, nullrev |
13 from mercurial.util import Abort, canonpath | 14 from mercurial.util import Abort, canonpath |
14 | 15 |
15 def revision_grapher(repo, start_rev, stop_rev): | 16 def revision_grapher(repo, start_rev, stop_rev): |
318 "glog": | 319 "glog": |
319 (graphlog, | 320 (graphlog, |
320 [('l', 'limit', '', _('limit number of changes displayed')), | 321 [('l', 'limit', '', _('limit number of changes displayed')), |
321 ('p', 'patch', False, _('show patch')), | 322 ('p', 'patch', False, _('show patch')), |
322 ('r', 'rev', [], _('show the specified revision or range')), | 323 ('r', 'rev', [], _('show the specified revision or range')), |
323 ('', 'style', '', _('display using template map file')), | 324 ] + templateopts, |
324 ('', 'template', '', _('display with template'))], | |
325 _('hg glog [OPTION]... [FILE]')), | 325 _('hg glog [OPTION]... [FILE]')), |
326 } | 326 } |