Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 18991:c1af1fb314bc
log: fix behavior with empty repositories (issue3497)
Make output in this special case consistent with general case one.
author | Alexander Plavin <me@aplavin.ru> |
---|---|
date | Wed, 17 Apr 2013 00:29:54 +0400 |
parents | 3a72c89a83ec |
children | ab04e87a5f3b |
comparison
equal
deleted
inserted
replaced
18990:7373be706f02 | 18991:c1af1fb314bc |
---|---|
1020 yielding each context, the iterator will first call the prepare | 1020 yielding each context, the iterator will first call the prepare |
1021 function on each context in the window in forward order.''' | 1021 function on each context in the window in forward order.''' |
1022 | 1022 |
1023 follow = opts.get('follow') or opts.get('follow_first') | 1023 follow = opts.get('follow') or opts.get('follow_first') |
1024 | 1024 |
1025 if not len(repo): | |
1026 return [] | |
1027 if opts.get('rev'): | 1025 if opts.get('rev'): |
1028 revs = scmutil.revrange(repo, opts.get('rev')) | 1026 revs = scmutil.revrange(repo, opts.get('rev')) |
1029 elif follow: | 1027 elif follow: |
1030 revs = repo.revs('reverse(:.)') | 1028 revs = repo.revs('reverse(:.)') |
1031 else: | 1029 else: |