Mercurial > public > mercurial-scm > hg
diff tests/test-pull.t @ 26604:a3fcc8e3136b
context: don't hex encode all unknown 20 char revision specs (issue4890)
d3908c911d5e introduced nice hexified display of missing nodes. It did however
also make missing 20 character revision specifications be shown as hex - very
confusing.
Users are often wrong and somehow specify revisions that don't exist. Nodes
will however rarely be missing ... and they will only look like a user provided
revision specification and be all ascii in 1 of 4*10**9.
With this change, missing revisions will only be hexified if they really look
like binary nodes. This change will thus improve the error reporting UI in the
common case and only very rarely make it confusing in the opposite direction of
how it was before.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 09 Oct 2015 01:19:37 +0200 |
parents | abcb1ee3b20a |
children | 5e92ba77793c |
line wrap: on
line diff
--- a/tests/test-pull.t Mon Oct 12 00:45:24 2015 -0700 +++ b/tests/test-pull.t Fri Oct 09 01:19:37 2015 +0200 @@ -52,6 +52,18 @@ $ hg rollback --dry-run --verbose repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/) +Test pull of non-existing 20 character revision specification, making sure plain ascii identifiers +not are encoded like a node: + + $ hg pull -r 'xxxxxxxxxxxxxxxxxxxy' + pulling from http://foo@localhost:$HGPORT/ + abort: unknown revision 'xxxxxxxxxxxxxxxxxxxy'! + [255] + $ hg pull -r 'xxxxxxxxxxxxxxxxxx y' + pulling from http://foo@localhost:$HGPORT/ + abort: unknown revision '7878787878787878787878787878787878782079'! + [255] + Issue622: hg init && hg pull -u URL doesn't checkout default branch $ cd ..