--- 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)
--- a/tests/test-glog Fri Jun 25 19:59:22 2010 +0200
+++ b/tests/test-glog Thu Jun 24 21:35:52 2010 -0700
@@ -146,6 +146,9 @@
echo % unused arguments
hg glog -q foo bar || echo failed
+echo % empty revision range - display nothing
+hg glog -r 1..0
+
echo % from outer space
cd ..
hg glog -l1 repo
--- a/tests/test-glog.out Fri Jun 25 19:59:22 2010 +0200
+++ b/tests/test-glog.out Thu Jun 24 21:35:52 2010 -0700
@@ -548,6 +548,7 @@
show revision history alongside an ASCII revision graph
failed
+% empty revision range - display nothing
% from outer space
@ changeset: 34:fea3ac5810e0
| tag: tip