tests/test-ssh.t
changeset 25376 2c14ab597353
parent 25367 d0f1d8b4de57
child 25401 d29201352af7
equal deleted inserted replaced
25375:b08887e723a9 25376:2c14ab597353
       
     1   $ cat << EOF >> $HGRCPATH
       
     2   > [experimental]
       
     3   > # drop me once bundle2 is the default,
       
     4   > # added to get test change early.
       
     5   > bundle2-exp = True
       
     6   > EOF
     1 
     7 
     2 
     8 
     3 This test tries to exercise the ssh functionality with a dummy script
     9 This test tries to exercise the ssh functionality with a dummy script
     4 
    10 
     5 creating 'remote' repo
    11 creating 'remote' repo
   395   $ echo "baz" > bar
   401   $ echo "baz" > bar
   396   $ hg ci -A -m "unpushable commit" bar
   402   $ hg ci -A -m "unpushable commit" bar
   397   $ hg push --ssh "sh ../ssh.sh"
   403   $ hg push --ssh "sh ../ssh.sh"
   398   pushing to ssh://user@dummy/*/remote (glob)
   404   pushing to ssh://user@dummy/*/remote (glob)
   399   searching for changes
   405   searching for changes
       
   406   abort: pretxnopen.hg-ssh hook failed
   400   remote: Permission denied
   407   remote: Permission denied
   401   remote: abort: pretxnopen.hg-ssh hook failed
   408   [255]
   402   remote: Permission denied
       
   403   remote: pushkey-abort: prepushkey.hg-ssh hook failed
       
   404   updating 6c0482d977a3 to public failed!
       
   405   [1]
       
   406 
   409 
   407   $ cd ..
   410   $ cd ..
   408 
   411 
   409 stderr from remote commands should be printed before stdout from local code (issue4336)
   412 stderr from remote commands should be printed before stdout from local code (issue4336)
   410 
   413 
   453   sending hello command
   456   sending hello command
   454   sending between command
   457   sending between command
   455   remote: 271
   458   remote: 271
   456   remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
   459   remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
   457   remote: 1
   460   remote: 1
   458   preparing listkeys for "bookmarks"
       
   459   sending listkeys command
       
   460   received listkey for "bookmarks": 45 bytes
       
   461   query 1; heads
   461   query 1; heads
   462   sending batch command
   462   sending batch command
   463   searching for changes
   463   searching for changes
   464   all remote heads known locally
   464   all remote heads known locally
   465   no changes found
   465   no changes found
       
   466   sending getbundle command
       
   467   bundle2-input-bundle: with-transaction
       
   468   bundle2-input-part: "listkeys" (params: 1 mandatory) supported
       
   469   bundle2-input-part: total payload size 45
       
   470   bundle2-input-part: "listkeys" (params: 1 mandatory) supported
       
   471   bundle2-input-bundle: 1 parts total
       
   472   checking for updated bookmarks
   466   preparing listkeys for "phases"
   473   preparing listkeys for "phases"
   467   sending listkeys command
   474   sending listkeys command
   468   received listkey for "phases": 15 bytes
   475   received listkey for "phases": 15 bytes
   469   checking for updated bookmarks
       
   470 
   476 
   471   $ cd ..
   477   $ cd ..
   472 
   478 
   473   $ cat dummylog
   479   $ cat dummylog
   474   Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
   480   Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
   480   Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
   486   Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
   481   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   487   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   482   Got arguments 1:user@dummy 2:hg -R local serve --stdio
   488   Got arguments 1:user@dummy 2:hg -R local serve --stdio
   483   Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
   489   Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
   484   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   490   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   485   changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob)
   491   changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob)
   486   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   492   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   487   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   493   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   488   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   494   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   489   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   495   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   490   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   496   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   491   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   497   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   492   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   498   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   493   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   499   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   494   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   500   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   495   changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob)
   501   changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob)
   496   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   502   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   497   Got arguments 1:user@dummy 2:hg init 'a repo'
   503   Got arguments 1:user@dummy 2:hg init 'a repo'
   498   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   504   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   499   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   505   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   500   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   506   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   501   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   507   Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
   502   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   508   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   503   changegroup-in-remote hook: HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob)
   509   changegroup-in-remote hook: HG_BUNDLE2=1 HG_NODE=65c38f4125f9602c8db4af56530cc221d93b8ef8 HG_SOURCE=serve HG_TXNID=TXN:* HG_URL=remote:ssh:127.0.0.1 (glob)
   504   Got arguments 1:user@dummy 2:hg -R remote serve --stdio
   510   Got arguments 1:user@dummy 2:hg -R remote serve --stdio