diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -503,7 +503,7 @@ rev = repo.changelog.rev(node) return repo[rev] - return repo[symbol] + raise error.RepoLookupError(_("unknown revision '%s'") % symbol) except error.WdirUnsupported: return repo[None] diff --git a/tests/test-pull.t b/tests/test-pull.t --- a/tests/test-pull.t +++ b/tests/test-pull.t @@ -72,7 +72,7 @@ [255] $ hg pull -r 'xxxxxxxxxxxxxxxxxx y' pulling from http://foo@localhost:$HGPORT/ - abort: unknown revision '7878787878787878787878787878787878782079'! + abort: unknown revision 'xxxxxxxxxxxxxxxxxx y'! [255] Issue622: hg init && hg pull -u URL doesn't checkout default branch