# HG changeset patch # User Benoit Boissinot # Date 1160144654 -7200 # Node ID 7ae37d99d47e7379812feb52c8607a663b0c355c # Parent e0cd1b98bf8dc6067d0a6db60c3688e08ec15e6b ssh: make the error message more clear, add a testcase diff -r e0cd1b98bf8d -r 7ae37d99d47e mercurial/sshrepo.py --- a/mercurial/sshrepo.py Thu Oct 05 15:36:53 2006 -0700 +++ b/mercurial/sshrepo.py Fri Oct 06 16:24:14 2006 +0200 @@ -70,7 +70,7 @@ lines.append(l) max_noise -= 1 else: - raise hg.RepoError(_("no response from remote hg")) + raise hg.RepoError(_("no suitable response from remote hg")) self.capabilities = () lines.reverse() diff -r e0cd1b98bf8d -r 7ae37d99d47e tests/test-ssh --- a/tests/test-ssh Thu Oct 05 15:36:53 2006 -0700 +++ b/tests/test-ssh Fri Oct 06 16:24:14 2006 +0200 @@ -36,6 +36,9 @@ cd .. +echo "# repo not found error" +hg clone -e ./dummyssh ssh://user@dummy/nonexistent local + echo "# clone remote via stream" hg clone -e ./dummyssh --uncompressed ssh://user@dummy/remote local-stream 2>&1 | \ sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/' diff -r e0cd1b98bf8d -r 7ae37d99d47e tests/test-ssh.out --- a/tests/test-ssh.out Thu Oct 05 15:36:53 2006 -0700 +++ b/tests/test-ssh.out Fri Oct 06 16:24:14 2006 +0200 @@ -1,4 +1,7 @@ # creating 'remote' +# repo not found error +abort: no suitable response from remote hg! +remote: abort: repository nonexistent not found! # clone remote via stream streaming all changes XXX files to transfer, XXX bytes of data @@ -77,6 +80,7 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files +Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio 3: 4: 5: Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: