Mercurial > hg
diff hgext/graphlog.py @ 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 | 40c06bbf58be |
children | 13921a1af02b |
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)