tests/test-ssh.t
changeset 41655 9a8d41fa919e
parent 40937 a0886a4d6dce
child 41901 94faa2e84094
equal deleted inserted replaced
41654:616ef3db5a90 41655:9a8d41fa919e
    34   $ cat <<EOF > .hg/hgrc
    34   $ cat <<EOF > .hg/hgrc
    35   > [server]
    35   > [server]
    36   > uncompressed = True
    36   > uncompressed = True
    37   > 
    37   > 
    38   > [hooks]
    38   > [hooks]
    39   > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
    39   > changegroup = sh -c "printenv.py --line changegroup-in-remote 0 ../dummylog"
    40   > EOF
    40   > EOF
    41   $ cd $TESTTMP
    41   $ cd $TESTTMP
    42 
    42 
    43 repo not found error
    43 repo not found error
    44 
    44 
   561   Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
   561   Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
   562   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   562   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   563   Got arguments 1:user@dummy 2:hg -R local serve --stdio
   563   Got arguments 1:user@dummy 2:hg -R local serve --stdio
   564   Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
   564   Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
   565   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   565   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   566   changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
   566   changegroup-in-remote hook: HG_BUNDLE2=1
   567   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   567   HG_HOOKNAME=changegroup
   568   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   568   HG_HOOKTYPE=changegroup
   569   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   569   HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60
   570   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   570   HG_NODE_LAST=a28a9d1a809cab7d4e2fde4bee738a9ede948b60
   571   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   571   HG_SOURCE=serve
   572   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   572   HG_TXNID=TXN:$ID$
   573   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   573   HG_URL=remote:ssh:$LOCALIP
   574   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   574   
   575   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   575   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   576   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
   576   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   577   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   578   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   579   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   580   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   581   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   582   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   583   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   584   changegroup-in-remote hook: HG_BUNDLE2=1
       
   585   HG_HOOKNAME=changegroup
       
   586   HG_HOOKTYPE=changegroup
       
   587   HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6
       
   588   HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6
       
   589   HG_SOURCE=serve
       
   590   HG_TXNID=TXN:$ID$
       
   591   HG_URL=remote:ssh:$LOCALIP
       
   592   
   577   Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !)
   593   Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !)
   578   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 !)
   594   changegroup-in-remote hook: HG_BUNDLE2=1 (chg !)
       
   595   HG_HOOKNAME=changegroup (chg !)
       
   596   HG_HOOKTYPE=changegroup (chg !)
       
   597   HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !)
       
   598   HG_NODE_LAST=1383141674ec756a6056f6a9097618482fe0f4a6 (chg !)
       
   599   HG_SOURCE=serve (chg !)
       
   600   HG_TXNID=TXN:$ID$ (chg !)
       
   601   HG_URL=remote:ssh:$LOCALIP (chg !)
       
   602    (chg !)
   579   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   603   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   580   Got arguments 1:user@dummy 2:hg init 'a repo'
   604   Got arguments 1:user@dummy 2:hg init 'a repo'
   581   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   605   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   582   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   606   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   583   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   607   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   584   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   608   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   585   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   609   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   586   changegroup-in-remote hook: HG_BUNDLE2=1 HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:ssh:$LOCALIP
   610   changegroup-in-remote hook: HG_BUNDLE2=1
   587   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   611   HG_HOOKNAME=changegroup
       
   612   HG_HOOKTYPE=changegroup
       
   613   HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8
       
   614   HG_NODE_LAST=65c38f4125f9602c8db4af56530cc221d93b8ef8
       
   615   HG_SOURCE=serve
       
   616   HG_TXNID=TXN:$ID$
       
   617   HG_URL=remote:ssh:$LOCALIP
       
   618   
       
   619   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
       
   620 
   588 
   621 
   589 remote hook failure is attributed to remote
   622 remote hook failure is attributed to remote
   590 
   623 
   591   $ cat > $TESTTMP/failhook << EOF
   624   $ cat > $TESTTMP/failhook << EOF
   592   > def hook(ui, repo, **kwargs):
   625   > def hook(ui, repo, **kwargs):