# HG changeset patch # User Alexis S. L. Carvalho # Date 1165508111 7200 # Node ID 000d122071b5188617709f2450a9007b8049f19c # Parent 2631b506e93d8b1b0abff0529cc70866a9efb9c6 fix hg diff -r '' diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -18,7 +18,7 @@ def revpair(repo, revs): be None, meaning use working dir.''' def revfix(repo, val, defval): - if not val and val != 0: + if not val and val != 0 and defval is not None: val = defval return repo.lookup(val) diff --git a/tests/test-diffdir b/tests/test-diffdir --- a/tests/test-diffdir +++ b/tests/test-diffdir @@ -13,3 +13,8 @@ hg diff --nodates -r tip echo foo > a hg diff --nodates + +hg diff -r "" +hg diff -r tip -r "" + +true diff --git a/tests/test-diffdir.out b/tests/test-diffdir.out --- a/tests/test-diffdir.out +++ b/tests/test-diffdir.out @@ -18,3 +18,5 @@ diff -r acd8075edac9 b +++ b/b @@ -0,0 +1,1 @@ +123 +abort: Ambiguous identifier! +abort: Ambiguous identifier!