changeset 39806:0ad5f064d829 stable

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.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 25 Sep 2018 23:06:02 +0900
parents 823f34acfd46
children e5724be689b3
files tests/test-ssh.t
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-ssh.t	Tue Sep 25 16:32:38 2018 -0400
+++ b/tests/test-ssh.t	Tue Sep 25 23:06:02 2018 +0900
@@ -317,6 +317,22 @@
   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 @@
   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