Patchwork [1,of,4,STABLE] test-ssh: show that stdio redirection doesn't work with chg

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 26, 2018, 1:59 p.m.
Message ID <96ba53b29353d32ce6e2.1537970353@mimosa>
Download mbox | patch
Permalink /patch/35052/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 26, 2018, 1:59 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1537884362 -32400
#      Tue Sep 25 23:06:02 2018 +0900
# Branch stable
# Node ID 96ba53b29353d32ce6e23ba3ccf4a2c72b84e116
# Parent  823f34acfd46eb74d362e819d1cc3475bf05bf2f
test-ssh: show that stdio redirection doesn't work with chg

Running tests with --chg doesn't mean all hg invocations are replaced by
chg. This patch explicitly adds the test for "chg serve --stdio", which does
weird stdio dance.
Gregory Szorc - Sept. 26, 2018, 3:47 p.m.
On Wed, Sep 26, 2018 at 7:01 AM Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1537884362 -32400
> #      Tue Sep 25 23:06:02 2018 +0900
> # Branch stable
> # Node ID 96ba53b29353d32ce6e23ba3ccf4a2c72b84e116
> # Parent  823f34acfd46eb74d362e819d1cc3475bf05bf2f
> test-ssh: show that stdio redirection doesn't work with chg
>

Queued for stable.


>
> Running tests with --chg doesn't mean all hg invocations are replaced by
> chg. This patch explicitly adds the test for "chg serve --stdio", which
> does
> weird stdio dance.
>
> diff --git a/tests/test-ssh.t b/tests/test-ssh.t
> --- a/tests/test-ssh.t
> +++ b/tests/test-ssh.t
> @@ -317,6 +317,22 @@ push should succeed even though it has a
>    summary:     z
>
>
> +#if chg
> +
> +try again with remote chg, which should succeed as well
> +
> +  $ hg rollback -R ../remote
> +  repository tip rolled back to revision 4 (undo serve)
> +
> +  $ hg push --config ui.remotecmd=chg
> +  pushing to ssh://user@dummy/remote
> +  searching for changes
> +  remote has heads on branch 'default' that are not known locally:
> 6c0482d977a3
> +  abort: not a Mercurial bundle
> +  [255]
> +
> +#endif
> +
>  clone bookmarks
>
>    $ hg -R ../remote bookmark test
> @@ -558,6 +574,8 @@ debug output
>    Got arguments 1:user@dummy 2:hg -R remote serve --stdio
>    Got arguments 1:user@dummy 2:hg -R remote serve --stdio
>    changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup
> HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6
> HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve
> HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
> +  Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !)
> +  changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup
> HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6
> HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve
> HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP (chg !)
>    Got arguments 1:user@dummy 2:hg -R remote serve --stdio
>    Got arguments 1:user@dummy 2:hg init 'a repo'
>    Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
> _______________________________________________
> 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
@@ -317,6 +317,22 @@  push should succeed even though it has a
   summary:     z
   
 
+#if chg
+
+try again with remote chg, which should succeed as well
+
+  $ hg rollback -R ../remote
+  repository tip rolled back to revision 4 (undo serve)
+
+  $ hg push --config ui.remotecmd=chg
+  pushing to ssh://user@dummy/remote
+  searching for changes
+  remote has heads on branch 'default' that are not known locally: 6c0482d977a3
+  abort: not a Mercurial bundle
+  [255]
+
+#endif
+
 clone bookmarks
 
   $ hg -R ../remote bookmark test
@@ -558,6 +574,8 @@  debug output
   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
+  Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !)
+  changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP (chg !)
   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   Got arguments 1:user@dummy 2:hg init 'a repo'
   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio