tests/test-ssh.t
author timeless <timeless@gmail.com>
Thu, 14 Oct 2010 10:56:39 +0300
changeset 12773 98aaf58a1d7c
parent 12642 bb35840e965c
child 12969 6bd9778ae749
permissions -rw-r--r--
test-ssh: handle very slow ssh transfer rate
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
     1
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
     2
  $ cp "$TESTDIR"/printenv.py .
4291
35b2e02367a5 test-ssh: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3853
diff changeset
     3
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
     4
This test tries to exercise the ssh functionality with a dummy script
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
     5
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
     6
  $ cat <<EOF > dummyssh
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
     7
  > import sys
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
     8
  > import os
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
     9
  > 
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    10
  > os.chdir(os.path.dirname(sys.argv[0]))
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    11
  > if sys.argv[1] != "user@dummy":
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    12
  >     sys.exit(-1)
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    13
  > 
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    14
  > if not os.path.exists("dummyssh"):
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    15
  >     sys.exit(-1)
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    16
  > 
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    17
  > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    18
  > 
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    19
  > log = open("dummylog", "ab")
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    20
  > log.write("Got arguments")
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    21
  > for i, arg in enumerate(sys.argv[1:]):
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    22
  >     log.write(" %d:%s" % (i+1, arg))
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    23
  > log.write("\n")
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    24
  > log.close()
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    25
  > r = os.system(sys.argv[2])
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    26
  > sys.exit(bool(r))
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    27
  > EOF
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    28
  $ cat <<EOF > badhook
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    29
  > import sys
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    30
  > sys.stdout.write("KABOOM\n")
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    31
  > EOF
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
    32
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    33
creating 'remote
4298
58517f6eb1ad test-ssh: avoid a shell script
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4291
diff changeset
    34
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    35
  $ hg init remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    36
  $ cd remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    37
  $ echo this > foo
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    38
  $ echo this > fooO
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    39
  $ hg ci -A -m "init" foo fooO
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    40
  $ echo '[server]' > .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    41
  $ echo 'uncompressed = True' >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    42
  $ echo '[hooks]' >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    43
  $ echo 'changegroup = python ../printenv.py changegroup-in-remote 0 ../dummylog' >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    44
  $ cd ..
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
    45
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    46
repo not found error
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    47
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    48
  $ hg clone -e "python ./dummyssh" ssh://user@dummy/nonexistent local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    49
  remote: abort: There is no Mercurial repository here (.hg not found)!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    50
  abort: no suitable response from remote hg!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    51
  [255]
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    52
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    53
non-existent absolute path
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
    54
12642
bb35840e965c tests: remove the last traces of $HGTMP
Mads Kiilerich <mads@kiilerich.com>
parents: 12640
diff changeset
    55
  $ hg clone -e "python ./dummyssh" ssh://user@dummy//`pwd`/nonexistent local
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    56
  remote: abort: There is no Mercurial repository here (.hg not found)!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    57
  abort: no suitable response from remote hg!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    58
  [255]
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    59
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    60
clone remote via stream
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
    61
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    62
  $ hg clone -e "python ./dummyssh" --uncompressed ssh://user@dummy/remote local-stream
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    63
  streaming all changes
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    64
  4 files to transfer, 392 bytes of data
12773
98aaf58a1d7c test-ssh: handle very slow ssh transfer rate
timeless <timeless@gmail.com>
parents: 12642
diff changeset
    65
  transferred 392 bytes in * seconds (*/sec) (glob)
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    66
  updating to branch default
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
    67
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    68
  $ cd local-stream
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    69
  $ hg verify
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    70
  checking changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    71
  checking manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    72
  crosschecking files in changesets and manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    73
  checking files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    74
  2 files, 1 changesets, 2 total revisions
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    75
  $ cd ..
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    76
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    77
clone remote via pull
5978
7939c71f3132 sshrepo: be more careful while reading data
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4298
diff changeset
    78
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    79
  $ hg clone -e "python ./dummyssh" ssh://user@dummy/remote local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    80
  requesting all changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    81
  adding changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    82
  adding manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    83
  adding file changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    84
  added 1 changesets with 2 changes to 2 files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    85
  updating to branch default
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    86
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    87
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    88
verify
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
    89
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    90
  $ cd local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    91
  $ hg verify
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    92
  checking changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    93
  checking manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    94
  crosschecking files in changesets and manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    95
  checking files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    96
  2 files, 1 changesets, 2 total revisions
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    97
  $ echo '[hooks]' >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
    98
  $ echo 'changegroup = python ../printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
    99
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   100
empty default pull
3275
7ae37d99d47e ssh: make the error message more clear, add a testcase
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3095
diff changeset
   101
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   102
  $ hg paths
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   103
  default = ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   104
  $ hg pull -e "python ../dummyssh"
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   105
  pulling from ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   106
  searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   107
  no changes found
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   108
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   109
local change
12409
0eaf7d32a5d8 test-ssh: test absolute paths in SSH URLs
Brodie Rao <brodie@bitheap.org>
parents: 12156
diff changeset
   110
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   111
  $ echo bleah > foo
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   112
  $ hg ci -m "add"
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   113
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   114
updating rc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   115
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   116
  $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   117
  $ echo "[ui]" >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   118
  $ echo "ssh = python ../dummyssh" >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   119
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   120
find outgoing
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2439
diff changeset
   121
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   122
  $ hg out ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   123
  comparing with ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   124
  searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   125
  changeset:   1:a28a9d1a809c
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   126
  tag:         tip
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   127
  user:        test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   128
  date:        Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   129
  summary:     add
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   130
  
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   131
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   132
find incoming on the remote side
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   133
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   134
  $ hg incoming -R ../remote -e "python ../dummyssh" ssh://user@dummy/local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   135
  comparing with ssh://user@dummy/local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   136
  searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   137
  changeset:   1:a28a9d1a809c
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   138
  tag:         tip
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   139
  user:        test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   140
  date:        Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   141
  summary:     add
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   142
  
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   143
12504
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   144
find incoming on the remote side (using absolute path)
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   145
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   146
  $ hg incoming -R ../remote -e "python ../dummyssh" "ssh://user@dummy/`pwd`"
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12587
diff changeset
   147
  comparing with ssh://user@dummy/$TESTTMP/local
12504
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   148
  searching for changes
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   149
  changeset:   1:a28a9d1a809c
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   150
  tag:         tip
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   151
  user:        test
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   152
  date:        Thu Jan 01 00:00:00 1970 +0000
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   153
  summary:     add
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   154
  
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
   155
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   156
push
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   157
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   158
  $ hg push
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   159
  pushing to ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   160
  searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   161
  remote: adding changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   162
  remote: adding manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   163
  remote: adding file changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   164
  remote: added 1 changesets with 1 changes to 1 files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   165
  $ cd ../remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   166
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   167
check remote tip
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   168
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   169
  $ hg tip
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   170
  changeset:   1:a28a9d1a809c
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   171
  tag:         tip
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   172
  user:        test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   173
  date:        Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   174
  summary:     add
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   175
  
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   176
  $ hg verify
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   177
  checking changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   178
  checking manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   179
  crosschecking files in changesets and manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   180
  checking files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   181
  2 files, 2 changesets, 3 total revisions
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   182
  $ hg cat -r tip foo
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   183
  bleah
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   184
  $ echo z > z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   185
  $ hg ci -A -m z z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   186
  created new head
1982
70ba0c86da8b Added test for incoming via ssh.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1933
diff changeset
   187
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   188
a bad, evil hook that prints to stdout
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   189
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   190
  $ echo 'changegroup.stdout = python ../badhook' >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   191
  $ cd ../local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   192
  $ echo r > r
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   193
  $ hg ci -A -m z r
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   194
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   195
push should succeed even though it has an unexpected response
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
   196
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   197
  $ hg push
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   198
  pushing to ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   199
  searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   200
  note: unsynced remote changes!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   201
  remote: adding changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   202
  remote: adding manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   203
  remote: adding file changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   204
  remote: added 1 changesets with 1 changes to 1 files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   205
  remote: KABOOM
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   206
  $ hg -R ../remote heads
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   207
  changeset:   3:1383141674ec
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   208
  tag:         tip
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   209
  parent:      1:a28a9d1a809c
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   210
  user:        test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   211
  date:        Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   212
  summary:     z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   213
  
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   214
  changeset:   2:6c0482d977a3
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   215
  parent:      0:1160648e36ce
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   216
  user:        test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   217
  date:        Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   218
  summary:     z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   219
  
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   220
  $ cd ..
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   221
  $ cat dummylog
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   222
  Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12587
diff changeset
   223
  Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   224
  Got arguments 1:user@dummy 2:hg -R remote serve --stdio
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   225
  Got arguments 1:user@dummy 2:hg -R remote serve --stdio
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   226
  Got arguments 1:user@dummy 2:hg -R remote serve --stdio
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   227
  Got arguments 1:user@dummy 2:hg -R remote serve --stdio
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   228
  Got arguments 1:user@dummy 2:hg -R local serve --stdio
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12587
diff changeset
   229
  Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   230
  Got arguments 1:user@dummy 2:hg -R remote serve --stdio
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   231
  changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   232
  Got arguments 1:user@dummy 2:hg -R remote serve --stdio
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
   233
  changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1