log: fix traceback for log -k caused by
1ef630452e0b (
issue1805)
--- a/mercurial/commands.py Thu Aug 20 10:41:56 2009 +0200
+++ b/mercurial/commands.py Fri Aug 21 09:33:27 2009 +0200
@@ -2052,7 +2052,7 @@
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:
--- a/tests/test-log Thu Aug 20 10:41:56 2009 +0200
+++ b/tests/test-log Fri Aug 21 09:33:27 2009 +0200
@@ -104,6 +104,9 @@
echo '% log -r <some unknown node id>'
hg log -r 1000000000000000000000000000000000000000
+echo '% log -k r1'
+hg log -k r1
+
cd ..
hg init usertest
--- a/tests/test-log.out Thu Aug 20 10:41:56 2009 +0200
+++ b/tests/test-log.out Fri Aug 21 09:33:27 2009 +0200
@@ -239,6 +239,12 @@
abort: 00changelog.i@: ambiguous identifier!
% log -r <some unknown node id>
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