fix hg log -r ''
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 27 Nov 2006 22:56:26 -0200
changeset 3718 7db88b094b14
parent 3717 9e248cfd8b94
child 3719 199dcb97a5b6
fix hg log -r ''
mercurial/cmdutil.py
tests/test-log
tests/test-log.out
--- a/mercurial/cmdutil.py	Mon Nov 27 22:03:36 2006 -0200
+++ b/mercurial/cmdutil.py	Mon Nov 27 22:56:26 2006 -0200
@@ -45,7 +45,7 @@
     """Yield revision as strings from a list of revision specifications."""
 
     def revfix(repo, val, defval):
-        if not val and val != 0:
+        if not val and val != 0 and defval is not None:
             return defval
         return repo.changelog.rev(repo.lookup(val))
 
--- a/tests/test-log	Mon Nov 27 22:03:36 2006 -0200
+++ b/tests/test-log	Mon Nov 27 22:56:26 2006 -0200
@@ -76,3 +76,8 @@
 
 echo % log -P 2
 hg log -P 2
+
+echo '% log -r ""'
+hg log -r ''
+
+exit 0
--- a/tests/test-log.out	Mon Nov 27 22:03:36 2006 -0200
+++ b/tests/test-log.out	Mon Nov 27 22:56:26 2006 -0200
@@ -185,3 +185,5 @@
 date:        Thu Jan 01 00:00:01 1970 +0000
 summary:     b1
 
+% log -r ""
+abort: Ambiguous identifier!