# HG changeset patch # User Dirkjan Ochtman # Date 2009-08-21 07:33:27 # Node ID b34184c046acccfff8c52310541f2813418a9993 # Parent 2484868cffde3893e3fafb8e515d396346b87e17 log: fix traceback for log -k caused by 1ef630452e0b (issue1805) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2052,7 +2052,7 @@ def log(ui, repo, *pats, **opts): for k in [kw.lower() for kw in opts['keyword']]: if not (k in ctx.user().lower() or k in ctx.description().lower() or - k in " ".join(ctx.files()[3]).lower()): + k in " ".join(ctx.files()).lower()): miss = 1 break if miss: diff --git a/tests/test-log b/tests/test-log --- a/tests/test-log +++ b/tests/test-log @@ -104,6 +104,9 @@ hg log -r '' echo '% log -r ' hg log -r 1000000000000000000000000000000000000000 +echo '% log -k r1' +hg log -k r1 + cd .. hg init usertest diff --git a/tests/test-log.out b/tests/test-log.out --- a/tests/test-log.out +++ b/tests/test-log.out @@ -239,6 +239,12 @@ diff --git a/b1 b/b1 abort: 00changelog.i@: ambiguous identifier! % log -r abort: unknown revision '1000000000000000000000000000000000000000'! +% log -k r1 +changeset: 1:3d5bf5654eda +user: test +date: Thu Jan 01 00:00:01 1970 +0000 +summary: r1 + adding a adding b changeset: 0:29a4c94f1924