sapling/tests/test-bad-configs.t
Durham Goode d56fa342f0 Improve error message when fallback server isn't configured
Summary:
If the remotefilelog server was not specified in the hgrc, or if the project
hgrc wasn't trusted, it would throw an obtuse error about a NoneType string.
This fixes it to give a more informative error explaining the problem.

Test Plan: Added a test

Reviewers: sid0, pyd, mitrandir, ericsumner, rmcelroy

Reviewed By: rmcelroy

Differential Revision: https://phabricator.fb.com/D1774743

Signature: t1:1774743:1420830544:5122a8e11f668ee8c35996e0f4395883a31ce8b0
2015-01-09 09:43:14 -08:00

29 lines
628 B
Perl

$ . "$TESTDIR/library.sh"
$ hginit master
$ cd master
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> server=True
> EOF
$ echo x > x
$ echo y > y
$ echo z > z
$ hg commit -qAm xy
$ cd ..
$ hgcloneshallow ssh://user@dummy/master shallow -q
3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
$ cd shallow
Verify error message when no fallback specified
$ hg up -q null
$ rm .hg/hgrc
$ clearcache
$ hg up tip
3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
abort: no remotefilelog server configured - is your .hg/hgrc trusted?
[255]