# HG changeset patch # User Mads Kiilerich # Date 1358208312 -3600 # Node ID 8802277c40ee4f67c6d2cc4cb1fc44628392d38e # Parent aadefcee1f5eb4e617a7909cec50e00353cd6b5c log: make log work even if first parameter doesn't exist A slowpath optimization kicked in too often because of wrong indentation. diff -r aadefcee1f5e -r 8802277c40ee mercurial/cmdutil.py --- a/mercurial/cmdutil.py Tue Jan 15 01:05:12 2013 +0100 +++ b/mercurial/cmdutil.py Tue Jan 15 01:05:12 2013 +0100 @@ -1137,8 +1137,8 @@ for path in match.files(): if path == '.' or path in repo.store: break - else: - return [] + else: + return [] if slowpath: # We have to read the changelog to match filenames against diff -r aadefcee1f5e -r 8802277c40ee tests/test-log.t --- a/tests/test-log.t Tue Jan 15 01:05:12 2013 +0100 +++ b/tests/test-log.t Tue Jan 15 01:05:12 2013 +0100 @@ -34,6 +34,32 @@ date: Thu Jan 01 00:00:01 1970 +0000 summary: a +log on directory + + $ hg log dir + changeset: 4:7e4639b4691b + tag: tip + user: test + date: Thu Jan 01 00:00:05 1970 +0000 + summary: e + + changeset: 2:f8954cd4dc1f + user: test + date: Thu Jan 01 00:00:03 1970 +0000 + summary: c + + $ hg log somethingthatdoesntexist dir + changeset: 4:7e4639b4691b + tag: tip + user: test + date: Thu Jan 01 00:00:05 1970 +0000 + summary: e + + changeset: 2:f8954cd4dc1f + user: test + date: Thu Jan 01 00:00:03 1970 +0000 + summary: c + -f, directory