Mercurial > hg
changeset 11448:25430ff23cfa stable
glog: fix crash on empty revision range
author | Eric Eisner <ede@mit.edu> |
---|---|
date | Thu, 24 Jun 2010 21:35:52 -0700 |
parents | ac256cd2cb36 |
children | 05af334bac05 |
files | hgext/graphlog.py tests/test-glog tests/test-glog.out |
diffstat | 3 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/graphlog.py Fri Jun 25 19:59:22 2010 +0200 +++ b/hgext/graphlog.py Thu Jun 24 21:35:52 2010 -0700 @@ -209,6 +209,8 @@ def get_revs(repo, rev_opt): if rev_opt: revs = revrange(repo, rev_opt) + if len(revs) == 0: + return (nullrev, nullrev) return (max(revs), min(revs)) else: return (len(repo) - 1, 0)