mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
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.
This commit is contained in:
parent
1fde4bfba1
commit
9b5eac039b
@ -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):
|
||||
|
@ -98,4 +98,7 @@ hg log -P 2
|
||||
echo '% log -r ""'
|
||||
hg log -r ''
|
||||
|
||||
echo '% log -r <some unknown node id>'
|
||||
hg log -r 1000000000000000000000000000000000000000
|
||||
|
||||
exit 0
|
||||
|
@ -223,3 +223,5 @@ summary: b1
|
||||
|
||||
% log -r ""
|
||||
abort: 00changelog.i@: ambiguous identifier!
|
||||
% log -r <some unknown node id>
|
||||
abort: unknown revision '1000000000000000000000000000000000000000'!
|
||||
|
Loading…
Reference in New Issue
Block a user