Mercurial > hg
changeset 18340:8802277c40ee
log: make log work even if first parameter doesn't exist
A slowpath optimization kicked in too often because of wrong indentation.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 15 Jan 2013 01:05:12 +0100 |
parents | aadefcee1f5e |
children | ed23d6100dd3 |
files | mercurial/cmdutil.py tests/test-log.t |
diffstat | 2 files changed, 28 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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