[PATCH 2 of 4] graphlog: add all log options to glog command

Patrick Mezard patrick at mezard.eu
Sat Apr 14 04:42:25 CDT 2012


# HG changeset patch
# User Patrick Mezard <patrick at mezard.eu>
# Date 1334393053 -7200
# Node ID 53457ed872d1098e97a8e763fb9a319e1e64270e
# Parent  902144c1c42f1664fd99b7c5829d310b8e8f24b7
graphlog: add all log options to glog command

glog and log -G should be equivalent.

diff --git a/hgext/graphlog.py b/hgext/graphlog.py
--- a/hgext/graphlog.py
+++ b/hgext/graphlog.py
@@ -13,7 +13,6 @@
 '''
 
 from mercurial.cmdutil import show_changeset
-from mercurial.commands import templateopts
 from mercurial.i18n import _
 from mercurial.node import nullrev
 from mercurial import cmdutil, commands, extensions, scmutil
@@ -457,12 +456,28 @@
     displayer.close()
 
 @command('glog',
-    [('l', 'limit', '',
-     _('limit number of changes displayed'), _('NUM')),
-    ('p', 'patch', False, _('show patch')),
+    [('f', 'follow', None,
+     _('follow changeset history, or file history across copies and renames')),
+    ('', 'follow-first', None,
+     _('only follow the first parent of merge changesets (DEPRECATED)')),
+    ('d', 'date', '', _('show revisions matching date spec'), _('DATE')),
+    ('C', 'copies', None, _('show copied files')),
+    ('k', 'keyword', [],
+     _('do case-insensitive search for a given text'), _('TEXT')),
     ('r', 'rev', [], _('show the specified revision or range'), _('REV')),
-    ] + templateopts,
-    _('hg glog [OPTION]... [FILE]'))
+    ('', 'removed', None, _('include revisions where files were removed')),
+    ('m', 'only-merges', None, _('show only merges (DEPRECATED)')),
+    ('u', 'user', [], _('revisions committed by user'), _('USER')),
+    ('', 'only-branch', [],
+     _('show only changesets within the given named branch (DEPRECATED)'),
+     _('BRANCH')),
+    ('b', 'branch', [],
+     _('show changesets within the given named branch'), _('BRANCH')),
+    ('P', 'prune', [],
+     _('do not display revision or any of its ancestors'), _('REV')),
+    ('', 'hidden', False, _('show hidden changesets (DEPRECATED)')),
+    ] + commands.logopts + commands.walkopts,
+    _('[OPTION]... [FILE]'))
 def graphlog(ui, repo, *pats, **opts):
     """show revision history alongside an ASCII revision graph
 
@@ -473,8 +488,6 @@
     directory.
     """
 
-    check_unsupported_flags(pats, opts)
-
     revs, expr, filematcher = getlogrevs(repo, pats, opts)
     revs = sorted(revs, reverse=1)
     limit = cmdutil.loglimit(opts)


More information about the Mercurial-devel mailing list