--- a/mercurial/commands.py Mon Oct 03 12:52:45 2005 -0700
+++ b/mercurial/commands.py Mon Oct 03 13:45:59 2005 -0700
@@ -1256,6 +1256,19 @@
br = None
if opts['branch']:
br = repo.branchlookup([repo.changelog.node(rev)])
+
+ if opts['keyword']:
+ changes = repo.changelog.read(repo.changelog.node(rev))
+ miss = 0
+ for k in opts['keyword']:
+ if not (k in changes[1].lower() or
+ k in changes[4].lower() or
+ k in " ".join(changes[3][:20]).lower()):
+ miss = 1
+ break
+ if miss:
+ continue
+
show_changeset(du, repo, rev, brinfo=br)
if opts['patch']:
changenode = repo.changelog.node(rev)
@@ -1868,6 +1881,7 @@
[('I', 'include', [], 'include path in search'),
('X', 'exclude', [], 'exclude path from search'),
('b', 'branch', None, 'show branches'),
+ ('k', 'keyword', [], 'search for a keyword'),
('r', 'rev', [], 'revision'),
('p', 'patch', None, 'show patch')],
'hg log [-I] [-X] [-r REV]... [-p] [FILE]'),