# HG changeset patch # User Sune Foldager # Date 2008-10-04 08:14:39 # Node ID efc579fdaf6947d2356a5232d5d902a8b1e47fde # Parent 8b874f8cd29f46f9412cf97352cc5ba5528f10f3 provide nicer feedback when an unknown node id is passed to a command Previously, an unknown node id would lead to the following error: abort: 00changelog.i@343445453433: no node! All other unknown revision would instead display as: abort: unknown revision '343445453'! The former error message has been suppressed in favor of the latter. diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -852,7 +852,7 @@ class revlog(object): node = bin(id) r = self.rev(node) return node - except TypeError: + except (TypeError, LookupError): pass def _partialmatch(self, id): diff --git a/tests/test-log b/tests/test-log --- a/tests/test-log +++ b/tests/test-log @@ -98,4 +98,7 @@ hg log -P 2 echo '% log -r ""' hg log -r '' +echo '% log -r ' +hg log -r 1000000000000000000000000000000000000000 + exit 0 diff --git a/tests/test-log.out b/tests/test-log.out --- a/tests/test-log.out +++ b/tests/test-log.out @@ -223,3 +223,5 @@ summary: b1 % log -r "" abort: 00changelog.i@: ambiguous identifier! +% log -r +abort: unknown revision '1000000000000000000000000000000000000000'!