Patchwork test-ssh: stabilize for Windows

login
register
mail settings
Submitter Matt Harbison
Date Dec. 22, 2017, 5:53 p.m.
Message ID <f67a73a92906327b6c0a.1513965219@Envy>
Download mbox | patch
Permalink /patch/26404/
State Accepted
Headers show

Comments

Matt Harbison - Dec. 22, 2017, 5:53 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1513468682 18000
#      Sat Dec 16 18:58:02 2017 -0500
# Node ID f67a73a92906327b6c0a85e477e4fad48b3869b8
# Parent  01b084914a60ec8d1e0f85c8bb4ee96fc38d8404
test-ssh: stabilize for Windows

Previously, this complained:

    remote: '.' is not recognized as an internal or external command,
    remote: operable program or batch file.

Making this a python script apparently revealed some races[1].  Thanks to Yuya
for suggesting this.

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-December/109094.html
Augie Fackler - Dec. 22, 2017, 6:24 p.m.
> On Dec 22, 2017, at 12:53 PM, Matt Harbison <mharbison72@gmail.com> wrote:
> 
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1513468682 18000
> #      Sat Dec 16 18:58:02 2017 -0500
> # Node ID f67a73a92906327b6c0a85e477e4fad48b3869b8
> # Parent  01b084914a60ec8d1e0f85c8bb4ee96fc38d8404
> test-ssh: stabilize for Windows

Outstanding! Queued, thanks.

> 
> Previously, this complained:
> 
>    remote: '.' is not recognized as an internal or external command,
>    remote: operable program or batch file.
> 
> Making this a python script apparently revealed some races[1].  Thanks to Yuya
> for suggesting this.
> 
> [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-December/109094.html
> 
> diff --git a/tests/test-ssh.t b/tests/test-ssh.t
> --- a/tests/test-ssh.t
> +++ b/tests/test-ssh.t
> @@ -603,12 +603,12 @@
>> echo \$VAR >&2
>> EOF
>   $ chmod +x dumpenv
> -  $ hg pull ssh://something --config ui.ssh="./dumpenv"
> +  $ hg pull ssh://something --config ui.ssh="sh dumpenv"
>   pulling from ssh://something/
>   remote: 
>   abort: no suitable response from remote hg!
>   [255]
> -  $ hg pull ssh://something --config ui.ssh="./dumpenv" --config sshenv.VAR=17
> +  $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17
>   pulling from ssh://something/
>   remote: 17
>   abort: no suitable response from remote hg!
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -603,12 +603,12 @@ 
   > echo \$VAR >&2
   > EOF
   $ chmod +x dumpenv
-  $ hg pull ssh://something --config ui.ssh="./dumpenv"
+  $ hg pull ssh://something --config ui.ssh="sh dumpenv"
   pulling from ssh://something/
   remote: 
   abort: no suitable response from remote hg!
   [255]
-  $ hg pull ssh://something --config ui.ssh="./dumpenv" --config sshenv.VAR=17
+  $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17
   pulling from ssh://something/
   remote: 17
   abort: no suitable response from remote hg!