# HG changeset patch # User Alexis S. L. Carvalho # Date 1164675386 7200 # Node ID 7db88b094b147d6ed9ca9a5d756c6ff037e496a6 # Parent 9e248cfd8b94bfa309e51c8f8d49e5ef0115a1b2 fix hg log -r '' diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -45,7 +45,7 @@ def revrange(repo, revs): """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)) diff --git a/tests/test-log b/tests/test-log --- a/tests/test-log +++ b/tests/test-log @@ -76,3 +76,8 @@ hg log --follow-first echo % log -P 2 hg log -P 2 + +echo '% log -r ""' +hg log -r '' + +exit 0 diff --git a/tests/test-log.out b/tests/test-log.out --- a/tests/test-log.out +++ b/tests/test-log.out @@ -185,3 +185,5 @@ user: test date: Thu Jan 01 00:00:01 1970 +0000 summary: b1 +% log -r "" +abort: Ambiguous identifier!