[PATCH] test: add a test file that displays ssh behavior in front of various errors

Yuya Nishihara yuya at tcha.org
Sat Sep 1 00:35:46 UTC 2018


On Fri, 31 Aug 2018 16:35:10 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld at octobus.net>
> # Date 1533106375 -7200
> #      Wed Aug 01 08:52:55 2018 +0200
> # Node ID 6af5b6f05e931fbab5baec1bef2a78d1e86acb90
> # Parent  6f38284b23f426b55d9375919f63ab4bd0fa81c0
> # EXP-Topic ssh-error
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6af5b6f05e93
> test: add a test file that displays ssh behavior in front of various errors
> 
> Prior to changeset ac0a87160012, these errors were suboptimal since they claim
> the repository is missing while the actual issue was about permission.
> 
> This extra test file provides additional documented coverage for the various
> corner cases.
> 
> diff --git a/tests/test-ssh-repoerror.t b/tests/test-ssh-repoerror.t
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-ssh-repoerror.t
> @@ -0,0 +1,67 @@
> +
> +initial setup
> +
> +  $ cat << EOF >> $HGRCPATH
> +  > [ui]
> +  > ssh=$PYTHON "$TESTDIR/dummyssh"
> +  > EOF
> +
> +repository itself is non-readable
> +---------------------------------
> +
> +  $ hg init no-read
> +  $ hg id ssh://user@dummy/no-read
> +  000000000000
> +  $ chmod a-rx no-read

Added "#require unix-permissions no-root" and queued, thanks.


More information about the Mercurial-devel mailing list