annotate tests/test-ssh.t @ 40593:e5724be689b3 stable

procutil: compare fd number to see if stdio protection is needed (issue5992) When I wrote this function for commandserver at 69f86b937035, testing object identity was suffice, and I was sloppy enough not to compare fileno() values. However, it doesn't work in chg session because chgserver reopens stdio to apply new buffering mode. This patch partially fixes the issue 5992. Still we have another problem in chgui._runsystem().
author Yuya Nishihara <yuya@tcha.org>
date Wed, 26 Sep 2018 20:53:59 +0900
parents 0ad5f064d829
children 23a00bc90a3c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37003
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
1 #testcases sshv1 sshv2
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
2
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
3 #if sshv2
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
4 $ cat >> $HGRCPATH << EOF
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
5 > [experimental]
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
6 > sshpeer.advertise-v2 = true
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
7 > sshserver.support-v2 = true
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
8 > EOF
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
9 #endif
4291
35b2e02367a5 test-ssh: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3853
diff changeset
10
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
11 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
12
14185
eb297845f90b tests: fix test-ssh.t after 6bd9778ae749
Mads Kiilerich <mads@kiilerich.com>
parents: 14166
diff changeset
13 creating 'remote' repo
4298
58517f6eb1ad test-ssh: avoid a shell script
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4291
diff changeset
14
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
15 $ hg init remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
16 $ cd remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
17 $ echo this > foo
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
18 $ echo this > fooO
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
19 $ hg ci -A -m "init" foo fooO
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
20
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
21 insert a closed branch (issue4428)
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
22
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
23 $ hg up null
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
24 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
25 $ hg branch closed
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
26 marked working directory as branch closed
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
27 (branches are permanent and global, did you want a bookmark?)
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
28 $ hg ci -mc0
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
29 $ hg ci --close-branch -mc1
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
30 $ hg up -q default
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
31
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
32 configure for serving
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
33
14185
eb297845f90b tests: fix test-ssh.t after 6bd9778ae749
Mads Kiilerich <mads@kiilerich.com>
parents: 14166
diff changeset
34 $ cat <<EOF > .hg/hgrc
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
35 > [server]
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
36 > uncompressed = True
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
37 >
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
38 > [hooks]
31013
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30934
diff changeset
39 > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog"
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
40 > EOF
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
41 $ cd ..
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
42
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
43 repo not found error
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
44
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
45 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
26738
7332bf4ae959 dispatch: error out on invalid -R path even if optionalrepo (issue4805) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 26737
diff changeset
46 remote: abort: repository nonexistent not found!
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
47 abort: no suitable response from remote hg!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
48 [255]
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
49
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
50 non-existent absolute path
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
51
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
52 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/nonexistent local
26738
7332bf4ae959 dispatch: error out on invalid -R path even if optionalrepo (issue4805) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 26737
diff changeset
53 remote: abort: repository $TESTTMP/nonexistent not found!
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
54 abort: no suitable response from remote hg!
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
55 [255]
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
56
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
57 clone remote via stream
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
58
38135
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
59 #if no-reposimplestore
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
60
35176
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35105
diff changeset
61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
62 streaming all changes
30934
b7a966ce89ed changelog: disable delta chains
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29814
diff changeset
63 4 files to transfer, 602 bytes of data
b7a966ce89ed changelog: disable delta chains
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29814
diff changeset
64 transferred 602 bytes in * seconds (*) (glob)
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
65 searching for changes
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
66 no changes found
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
67 updating to branch default
12489
d039c4285092 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12414
diff changeset
68 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
69 $ cd local-stream
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
70 $ hg verify
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
71 checking changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
72 checking manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
73 crosschecking files in changesets and manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
74 checking files
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
75 2 files, 3 changesets, 2 total revisions
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
76 $ hg branches
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
77 default 0:1160648e36ce
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
78 $ cd ..
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
79
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
80 clone bookmarks via stream
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
81
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
82 $ hg -R local-stream book mybook
35176
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35105
diff changeset
83 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
84 streaming all changes
30934
b7a966ce89ed changelog: disable delta chains
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29814
diff changeset
85 4 files to transfer, 602 bytes of data
b7a966ce89ed changelog: disable delta chains
Gregory Szorc <gregory.szorc@gmail.com>
parents: 29814
diff changeset
86 transferred 602 bytes in * seconds (*) (glob)
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
87 searching for changes
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
88 no changes found
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
89 updating to branch default
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
90 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
91 $ cd stream2
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
92 $ hg book
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
93 mybook 0:1160648e36ce
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
94 $ cd ..
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
95 $ rm -rf local-stream stream2
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
96
38135
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
97 #endif
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
98
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
99 clone remote via pull
5990
7939c71f3132 sshrepo: be more careful while reading data
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4298
diff changeset
100
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
101 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
102 requesting all changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
103 adding changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
104 adding manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
105 adding file changes
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
106 added 3 changesets with 2 changes to 2 files
35444
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 35176
diff changeset
107 new changesets 1160648e36ce:ad076bfb429d
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
108 updating to branch default
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
109 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
110
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
111 verify
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
112
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
113 $ cd local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
114 $ hg verify
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
115 checking changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
116 checking manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
117 crosschecking files in changesets and manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
118 checking files
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
119 2 files, 3 changesets, 2 total revisions
31013
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30934
diff changeset
120 $ cat >> .hg/hgrc <<EOF
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30934
diff changeset
121 > [hooks]
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30934
diff changeset
122 > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog"
34a5f6c66bc5 tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 30934
diff changeset
123 > EOF
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
124
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
125 empty default pull
3274
7ae37d99d47e ssh: make the error message more clear, add a testcase
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 3092
diff changeset
126
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
127 $ hg paths
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
128 default = ssh://user@dummy/remote
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
129 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
130 pulling from ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
131 searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
132 no changes found
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
133
24193
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
134 pull from wrong ssh URL
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
135
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
136 $ hg pull -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
24193
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
137 pulling from ssh://user@dummy/doesnotexist
26738
7332bf4ae959 dispatch: error out on invalid -R path even if optionalrepo (issue4805) (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 26737
diff changeset
138 remote: abort: repository doesnotexist not found!
24193
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
139 abort: no suitable response from remote hg!
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
140 [255]
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
141
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
142 local change
12409
0eaf7d32a5d8 test-ssh: test absolute paths in SSH URLs
Brodie Rao <brodie@bitheap.org>
parents: 12156
diff changeset
143
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
144 $ echo bleah > foo
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
145 $ hg ci -m "add"
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
146
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
147 updating rc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
148
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
149 $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
150 $ echo "[ui]" >> .hg/hgrc
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
151 $ echo "ssh = \"$PYTHON\" \"$TESTDIR/dummyssh\"" >> .hg/hgrc
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
152
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
153 find outgoing
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2439
diff changeset
154
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
155 $ hg out ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
156 comparing with ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
157 searching for changes
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
158 changeset: 3:a28a9d1a809c
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
159 tag: tip
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
160 parent: 0:1160648e36ce
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
161 user: test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
162 date: Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
163 summary: add
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
164
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
165
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
166 find incoming on the remote side
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
167
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
168 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
169 comparing with ssh://user@dummy/local
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
170 searching for changes
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
171 changeset: 3:a28a9d1a809c
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
172 tag: tip
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
173 parent: 0:1160648e36ce
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
174 user: test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
175 date: Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
176 summary: add
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
177
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
178
12504
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
179 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
180
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
181 $ hg incoming -R ../remote -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12587
diff changeset
182 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
183 searching for changes
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
184 changeset: 3:a28a9d1a809c
12504
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
185 tag: tip
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
186 parent: 0:1160648e36ce
12504
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
187 user: test
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
188 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
189 summary: add
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
190
f7dd8bffe18c test-ssh: test absolute path that exists
Brodie Rao <brodie@bitheap.org>
parents: 12489
diff changeset
191
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
192 push
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
193
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
194 $ hg push
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
195 pushing to ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
196 searching for changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
197 remote: adding changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
198 remote: adding manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
199 remote: adding file changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
200 remote: added 1 changesets with 1 changes to 1 files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
201 $ cd ../remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
202
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
203 check remote tip
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
204
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
205 $ hg tip
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
206 changeset: 3:a28a9d1a809c
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
207 tag: tip
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
208 parent: 0:1160648e36ce
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
209 user: test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
210 date: Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
211 summary: add
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
212
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
213 $ hg verify
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
214 checking changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
215 checking manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
216 crosschecking files in changesets and manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
217 checking files
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
218 2 files, 4 changesets, 3 total revisions
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
219 $ hg cat -r tip foo
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
220 bleah
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
221 $ echo z > z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
222 $ hg ci -A -m z z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
223 created new head
1982
70ba0c86da8b Added test for incoming via ssh.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1933
diff changeset
224
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
225 test pushkeys and bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
226
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
227 $ cd ../local
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
228 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
229 bookmarks
18255
7ca534f31a83 debugpushkey: list keys sorted
Mads Kiilerich <mads at kiilerich.com>
parents: 17844
diff changeset
230 namespaces
15648
79cc89de5be1 phases: add basic pushkey support
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 15622
diff changeset
231 phases
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
232 $ hg book foo -r 0
38956
dfb888aae17a outgoing: pay attention to `default:pushurl` for bookmarks and subrepos
Matt Harbison <matt_harbison@yahoo.com>
parents: 38894
diff changeset
233 $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default`
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
234 comparing with ssh://user@dummy/remote
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
235 searching for changed bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
236 foo 1160648e36ce
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
237 $ hg push -B foo
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
238 pushing to ssh://user@dummy/remote
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
239 searching for changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
240 no changes found
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
241 exporting bookmark foo
16038
dad96e752079 push: don't treat bookmark as a found change
Matt Mackall <mpm@selenic.com>
parents: 16023
diff changeset
242 [1]
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
243 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
244 foo 1160648e36cec0054048a7edc4110c6f84fde594
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
245 $ hg book -f foo
13050
3790452d499b pushkey: use UTF-8
Matt Mackall <mpm@selenic.com>
parents: 12969
diff changeset
246 $ hg push --traceback
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
247 pushing to ssh://user@dummy/remote
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
248 searching for changes
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
249 no changes found
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
250 updating bookmark foo
16023
90f8b8dd0326 push: return 1 if no changes found (issue3228)
Matt Mackall <mpm@selenic.com>
parents: 15897
diff changeset
251 [1]
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
252 $ hg book -d foo
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
253 $ hg in -B
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
254 comparing with ssh://user@dummy/remote
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
255 searching for changed bookmarks
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
256 foo a28a9d1a809c
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
257 $ hg book -f -r 0 foo
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
258 $ hg pull -B foo
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
259 pulling from ssh://user@dummy/remote
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
260 no changes found
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
261 updating bookmark foo
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
262 $ hg book -d foo
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
263 $ hg push -B foo
13368
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 13050
diff changeset
264 pushing to ssh://user@dummy/remote
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 13050
diff changeset
265 searching for changes
d4ab9486e514 bookmarks: move push/pull command features to core
Matt Mackall <mpm@selenic.com>
parents: 13050
diff changeset
266 no changes found
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
267 deleting remote bookmark foo
16038
dad96e752079 push: don't treat bookmark as a found change
Matt Mackall <mpm@selenic.com>
parents: 16023
diff changeset
268 [1]
12969
6bd9778ae749 pushkey: force HTTP POST on push and add tests (issue2489)
Matt Mackall <mpm@selenic.com>
parents: 12773
diff changeset
269
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
270 a bad, evil hook that prints to stdout
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
271
14186
8513bd2e7259 tests: share dummyssh
Mads Kiilerich <mads@kiilerich.com>
parents: 14185
diff changeset
272 $ cat <<EOF > $TESTTMP/badhook
8513bd2e7259 tests: share dummyssh
Mads Kiilerich <mads@kiilerich.com>
parents: 14185
diff changeset
273 > import sys
8513bd2e7259 tests: share dummyssh
Mads Kiilerich <mads@kiilerich.com>
parents: 14185
diff changeset
274 > sys.stdout.write("KABOOM\n")
38729
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 38599
diff changeset
275 > sys.stdout.flush()
14186
8513bd2e7259 tests: share dummyssh
Mads Kiilerich <mads@kiilerich.com>
parents: 14185
diff changeset
276 > EOF
8513bd2e7259 tests: share dummyssh
Mads Kiilerich <mads@kiilerich.com>
parents: 14185
diff changeset
277
31143
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
278 $ cat <<EOF > $TESTTMP/badpyhook.py
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
279 > import sys
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
280 > def hook(ui, repo, hooktype, **kwargs):
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
281 > sys.stdout.write("KABOOM IN PROCESS\n")
38729
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 38599
diff changeset
282 > sys.stdout.flush()
31143
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
283 > EOF
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
284
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
285 $ cat <<EOF >> ../remote/.hg/hgrc
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
286 > [hooks]
34045
8e6f4939a69a tests: replace yet more calls to `python` with $PYTHON
Augie Fackler <augie@google.com>
parents: 32833
diff changeset
287 > changegroup.stdout = $PYTHON $TESTTMP/badhook
31143
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
288 > changegroup.pystdout = python:$TESTTMP/badpyhook.py:hook
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
289 > EOF
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
290 $ echo r > r
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
291 $ hg ci -A -m z r
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
292
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
293 push should succeed even though it has an unexpected response
1110
1032a505488c Add a simple dummy ssh test
mpm@selenic.com
parents:
diff changeset
294
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
295 $ hg push
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
296 pushing to ssh://user@dummy/remote
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
297 searching for changes
20501
8a9e0b523d2d discovery: improve "note: unsynced remote changes!" warning
Mads Kiilerich <madski@unity3d.com>
parents: 20403
diff changeset
298 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
299 remote: adding changesets
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
300 remote: adding manifests
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
301 remote: adding file changes
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
302 remote: added 1 changesets with 1 changes to 1 files
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
303 remote: KABOOM
31143
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
304 remote: KABOOM IN PROCESS
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
305 $ hg -R ../remote heads
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
306 changeset: 5:1383141674ec
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
307 tag: tip
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
308 parent: 3:a28a9d1a809c
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
309 user: test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
310 date: Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
311 summary: z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
312
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
313 changeset: 4:6c0482d977a3
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
314 parent: 0:1160648e36ce
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
315 user: test
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
316 date: Thu Jan 01 00:00:00 1970 +0000
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
317 summary: z
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
318
13464
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
319
40592
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
320 #if chg
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
321
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
322 try again with remote chg, which should succeed as well
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
323
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
324 $ hg rollback -R ../remote
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
325 repository tip rolled back to revision 4 (undo serve)
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
326
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
327 $ hg push --config ui.remotecmd=chg
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
328 pushing to ssh://user@dummy/remote
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
329 searching for changes
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
330 remote has heads on branch 'default' that are not known locally: 6c0482d977a3
40593
e5724be689b3 procutil: compare fd number to see if stdio protection is needed (issue5992)
Yuya Nishihara <yuya@tcha.org>
parents: 40592
diff changeset
331 remote: adding changesets
e5724be689b3 procutil: compare fd number to see if stdio protection is needed (issue5992)
Yuya Nishihara <yuya@tcha.org>
parents: 40592
diff changeset
332 remote: adding manifests
e5724be689b3 procutil: compare fd number to see if stdio protection is needed (issue5992)
Yuya Nishihara <yuya@tcha.org>
parents: 40592
diff changeset
333 remote: adding file changes
e5724be689b3 procutil: compare fd number to see if stdio protection is needed (issue5992)
Yuya Nishihara <yuya@tcha.org>
parents: 40592
diff changeset
334 remote: added 1 changesets with 1 changes to 1 files
40592
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
335 abort: not a Mercurial bundle
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
336 [255]
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
337
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
338 #endif
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
339
13604
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
340 clone bookmarks
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
341
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
342 $ hg -R ../remote bookmark test
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
343 $ hg -R ../remote bookmarks
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
344 * test 4:6c0482d977a3
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
345 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
13604
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
346 requesting all changes
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
347 adding changesets
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
348 adding manifests
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
349 adding file changes
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
350 added 6 changesets with 5 changes to 4 files (+1 heads)
35444
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 35176
diff changeset
351 new changesets 1160648e36ce:1383141674ec
13604
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
352 updating to branch default
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
353 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
354 $ hg -R local-bookmarks bookmarks
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
355 test 4:6c0482d977a3
13604
3f6a4579f803 hg: add support for cloning bookmarks
David Soria Parra <dsp@php.net>
parents: 13469
diff changeset
356
13464
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
357 passwords in ssh urls are not supported
13755
e45780ac8292 ssh: fix password test
Matt Mackall <mpm@selenic.com>
parents: 13752
diff changeset
358 (we use a glob here because different Python versions give different
e45780ac8292 ssh: fix password test
Matt Mackall <mpm@selenic.com>
parents: 13752
diff changeset
359 results here)
13464
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
360
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
361 $ hg push ssh://user:erroneouspwd@dummy/remote
13755
e45780ac8292 ssh: fix password test
Matt Mackall <mpm@selenic.com>
parents: 13752
diff changeset
362 pushing to ssh://user:*@dummy/remote (glob)
13464
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
363 abort: password in URL not supported!
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
364 [255]
da0ddd62b9d8 sshrepo: catch passwords in ssh urls
Adrian Buehlmann <adrian@cadifra.com>
parents: 13405
diff changeset
365
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
366 $ cd ..
15581
d8fa35c28335 ssh: quote remote paths (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 14186
diff changeset
367
17003
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16982
diff changeset
368 hide outer repo
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16982
diff changeset
369 $ hg init
73d20de5f30b tests: add missing no-outer-repo requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16982
diff changeset
370
15581
d8fa35c28335 ssh: quote remote paths (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 14186
diff changeset
371 Test remote paths with spaces (issue2983):
d8fa35c28335 ssh: quote remote paths (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 14186
diff changeset
372
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
373 $ hg init --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
17261
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17081
diff changeset
374 $ touch "$TESTTMP/a repo/test"
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17081
diff changeset
375 $ hg -R 'a repo' commit -A -m "test"
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17081
diff changeset
376 adding test
15581
d8fa35c28335 ssh: quote remote paths (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 14186
diff changeset
377 $ hg -R 'a repo' tag tag
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
378 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
17261
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17081
diff changeset
379 73649e48688a
15581
d8fa35c28335 ssh: quote remote paths (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 14186
diff changeset
380
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
381 $ hg id --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo#noNoNO"
21188
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20501
diff changeset
382 abort: unknown revision 'noNoNO'!
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20501
diff changeset
383 [255]
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20501
diff changeset
384
17844
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
385 Test (non-)escaping of remote paths with spaces when cloning (issue3145):
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
386
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
387 $ hg clone --ssh "\"$PYTHON\" \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
17844
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
388 destination directory: a repo
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
389 abort: destination 'a repo' is not empty
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
390 [255]
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
391
32829
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
392 Make sure hg is really paranoid in serve --stdio mode. It used to be
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
393 possible to get a debugger REPL by specifying a repo named --debugger.
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
394 $ hg -R --debugger serve --stdio
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
395 abort: potentially unsafe serve --stdio invocation: ['-R', '--debugger', 'serve', '--stdio']
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
396 [255]
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
397 $ hg -R --config=ui.debugger=yes serve --stdio
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
398 abort: potentially unsafe serve --stdio invocation: ['-R', '--config=ui.debugger=yes', 'serve', '--stdio']
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
399 [255]
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
400 Abbreviations of 'serve' also don't work, to avoid shenanigans.
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
401 $ hg -R narf serv --stdio
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
402 abort: potentially unsafe serve --stdio invocation: ['-R', 'narf', 'serv', '--stdio']
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
403 [255]
77eaf9539499 dispatch: protect against malicious 'hg serve --stdio' invocations (sec)
Augie Fackler <augie@google.com>
parents: 31693
diff changeset
404
16613
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
405 Test hg-ssh using a helper script that will restore PYTHONPATH (which might
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
406 have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
407 parameters:
15897
cc021114fc98 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
Mads Kiilerich <mads@kiilerich.com>
parents: 15648
diff changeset
408
16613
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
409 $ cat > ssh.sh << EOF
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
410 > userhost="\$1"
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
411 > SSH_ORIGINAL_COMMAND="\$2"
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
412 > export SSH_ORIGINAL_COMMAND
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
413 > PYTHONPATH="$PYTHONPATH"
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
414 > export PYTHONPATH
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
415 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
16613
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
416 > EOF
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
417
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
418 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
17261
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17081
diff changeset
419 73649e48688a
16611
19379226dc67 hg-ssh: use %s for printing paths in error messages
Mads Kiilerich <mads@kiilerich.com>
parents: 16541
diff changeset
420
16613
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
421 $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
36176
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 36051
diff changeset
422 remote: Illegal repository "$TESTTMP/a'repo"
15897
cc021114fc98 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
Mads Kiilerich <mads@kiilerich.com>
parents: 15648
diff changeset
423 abort: no suitable response from remote hg!
cc021114fc98 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
Mads Kiilerich <mads@kiilerich.com>
parents: 15648
diff changeset
424 [255]
16611
19379226dc67 hg-ssh: use %s for printing paths in error messages
Mads Kiilerich <mads@kiilerich.com>
parents: 16541
diff changeset
425
16613
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
426 $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
427 remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
15897
cc021114fc98 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
Mads Kiilerich <mads@kiilerich.com>
parents: 15648
diff changeset
428 abort: no suitable response from remote hg!
cc021114fc98 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
Mads Kiilerich <mads@kiilerich.com>
parents: 15648
diff changeset
429 [255]
cc021114fc98 hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
Mads Kiilerich <mads@kiilerich.com>
parents: 15648
diff changeset
430
34045
8e6f4939a69a tests: replace yet more calls to `python` with $PYTHON
Augie Fackler <augie@google.com>
parents: 32833
diff changeset
431 $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" $PYTHON "$TESTDIR/../contrib/hg-ssh"
16613
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
432 Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
433 [255]
289fdcd4cb47 tests: improve test of hg-ssh and make the test pass on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16611
diff changeset
434
16836
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
435 Test hg-ssh in read-only mode:
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
436
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
437 $ cat > ssh.sh << EOF
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
438 > userhost="\$1"
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
439 > SSH_ORIGINAL_COMMAND="\$2"
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
440 > export SSH_ORIGINAL_COMMAND
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
441 > PYTHONPATH="$PYTHONPATH"
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
442 > export PYTHONPATH
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
443 > "$PYTHON" "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
16836
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
444 > EOF
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
445
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
446 $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
447 requesting all changes
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
448 adding changesets
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
449 adding manifests
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
450 adding file changes
23126
8b4a8a9176e2 clone: properly mark branches closed with --uncompressed (issue4428)
Matt Mackall <mpm@selenic.com>
parents: 23116
diff changeset
451 added 6 changesets with 5 changes to 4 files (+1 heads)
35444
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 35176
diff changeset
452 new changesets 1160648e36ce:1383141674ec
16836
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
453 updating to branch default
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
454 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
455
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
456 $ cd read-only-local
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
457 $ echo "baz" > bar
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
458 $ hg ci -A -m "unpushable commit" bar
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
459 $ hg push --ssh "sh ../ssh.sh"
16896
2774576dee4d tests/run-tests: avoid C:/ in arguments
Adrian Buehlmann <adrian@cadifra.com>
parents: 16836
diff changeset
460 pushing to ssh://user@dummy/*/remote (glob)
16836
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
461 searching for changes
25956
8dc5ee5b7b09 sshpeer: use the doublepipe object for the server to client channel
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25939
diff changeset
462 remote: Permission denied
27469
58f1645f72c3 bundle2: attribute remote failures to remote (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27468
diff changeset
463 remote: pretxnopen.hg-ssh hook failed
58f1645f72c3 bundle2: attribute remote failures to remote (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27468
diff changeset
464 abort: push failed on remote
25897
2c14ab597353 test: use bundle2 in test-ssh
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25888
diff changeset
465 [255]
16836
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
466
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
467 $ cd ..
1ba3e17186c8 hg-ssh: read-only flag
David Schleimer <dschleimer@fb.com>
parents: 16613
diff changeset
468
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
469 stderr from remote commands should be printed before stdout from local code (issue4336)
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
470
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
471 $ hg clone remote stderr-ordering
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
472 updating to branch default
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
473 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
474 $ cd stderr-ordering
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
475 $ cat >> localwrite.py << EOF
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
476 > from mercurial import exchange, extensions
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
477 >
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
478 > def wrappedpush(orig, repo, *args, **kwargs):
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
479 > res = orig(repo, *args, **kwargs)
38894
e69628f36196 py3: add b'' prefixes in tests/test-ssh.t and tests/test-ssh-bundle1.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38729
diff changeset
480 > repo.ui.write(b'local stdout\n')
38729
45a669bad421 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org>
parents: 38599
diff changeset
481 > repo.ui.flush()
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
482 > return res
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
483 >
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
484 > def extsetup(ui):
38894
e69628f36196 py3: add b'' prefixes in tests/test-ssh.t and tests/test-ssh-bundle1.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38729
diff changeset
485 > extensions.wrapfunction(exchange, b'push', wrappedpush)
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
486 > EOF
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
487
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
488 $ cat >> .hg/hgrc << EOF
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
489 > [paths]
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
490 > default-push = ssh://user@dummy/remote
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
491 > [ui]
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
492 > ssh = "$PYTHON" "$TESTDIR/dummyssh"
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
493 > [extensions]
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
494 > localwrite = localwrite.py
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
495 > EOF
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
496
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
497 $ echo localwrite > foo
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
498 $ hg commit -m 'testing localwrite'
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
499 $ hg push
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
500 pushing to ssh://user@dummy/remote
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
501 searching for changes
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
502 remote: adding changesets
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
503 remote: adding manifests
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
504 remote: adding file changes
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
505 remote: added 1 changesets with 1 changes to 1 files
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
506 remote: KABOOM
31143
ad56204f733e hook: flush stdout before restoring stderr redirection
Yuya Nishihara <yuya@tcha.org>
parents: 31013
diff changeset
507 remote: KABOOM IN PROCESS
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
508 local stdout
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
509
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
510 debug output
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
511
36485
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
512 $ hg pull --debug ssh://user@dummy/remote --config devel.debug.peer-request=yes
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
513 pulling from ssh://user@dummy/remote
34442
8cb9e921ef8c ssh: quote parameters using shellquote (SEC)
Jun Wu <quark@fb.com>
parents: 34118
diff changeset
514 running .* ".*/dummyssh" ['"]user@dummy['"] ('|")hg -R remote serve --stdio('|") (re)
37003
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
515 sending upgrade request: * proto=exp-ssh-v2-0001 (glob) (sshv2 !)
38599
58bbd14b0c62 sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents: 38199
diff changeset
516 devel-peer-request: hello+between
58bbd14b0c62 sshpeer: reflect actual command activity one handshake
Boris Feld <boris.feld@octobus.net>
parents: 38199
diff changeset
517 devel-peer-request: pairs: 81 bytes
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
518 sending hello command
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
519 sending between command
38179
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 38135
diff changeset
520 remote: 413 (sshv1 !)
37003
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
521 protocol upgraded to exp-ssh-v2-0001 (sshv2 !)
38199
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 38179
diff changeset
522 remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS_SERVER$ changegroupsubset getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
37003
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 36578
diff changeset
523 remote: 1 (sshv1 !)
38179
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 38135
diff changeset
524 devel-peer-request: protocaps
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 38135
diff changeset
525 devel-peer-request: caps: * bytes (glob)
afcfdf53e4b5 wireproto: provide accessors for client capabilities
Joerg Sonnenberger <joerg@bec.de>
parents: 38135
diff changeset
526 sending protocaps command
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
527 query 1; heads
37731
4901d1e22b27 peer-request: include more details about batch commands
Boris Feld <boris.feld@octobus.net>
parents: 37398
diff changeset
528 devel-peer-request: batched-content
4901d1e22b27 peer-request: include more details about batch commands
Boris Feld <boris.feld@octobus.net>
parents: 37398
diff changeset
529 devel-peer-request: - heads (0 arguments)
4901d1e22b27 peer-request: include more details about batch commands
Boris Feld <boris.feld@octobus.net>
parents: 37398
diff changeset
530 devel-peer-request: - known (1 arguments)
36485
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
531 devel-peer-request: batch
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
532 devel-peer-request: cmds: 141 bytes
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
533 sending batch command
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
534 searching for changes
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
535 all remote heads known locally
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
536 no changes found
36485
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
537 devel-peer-request: getbundle
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
538 devel-peer-request: bookmarks: 1 bytes
37754
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 37731
diff changeset
539 devel-peer-request: bundlecaps: 266 bytes
36485
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
540 devel-peer-request: cg: 1 bytes
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
541 devel-peer-request: common: 122 bytes
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
542 devel-peer-request: heads: 122 bytes
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
543 devel-peer-request: listkeys: 9 bytes
f7ef49e44d7c sshpeer: add support for request tracing
Boris Feld <boris.feld@octobus.net>
parents: 36267
diff changeset
544 devel-peer-request: phases: 1 bytes
25897
2c14ab597353 test: use bundle2 in test-ssh
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25888
diff changeset
545 sending getbundle command
2c14ab597353 test: use bundle2 in test-ssh
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25888
diff changeset
546 bundle2-input-bundle: with-transaction
36051
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 36042
diff changeset
547 bundle2-input-part: "bookmarks" supported
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 36042
diff changeset
548 bundle2-input-part: total payload size 26
25897
2c14ab597353 test: use bundle2 in test-ssh
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25888
diff changeset
549 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
2c14ab597353 test: use bundle2 in test-ssh
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25888
diff changeset
550 bundle2-input-part: total payload size 45
35105
10e162bb9bf5 pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents: 34442
diff changeset
551 bundle2-input-part: "phase-heads" supported
10e162bb9bf5 pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents: 34442
diff changeset
552 bundle2-input-part: total payload size 72
36051
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 36042
diff changeset
553 bundle2-input-bundle: 2 parts total
25897
2c14ab597353 test: use bundle2 in test-ssh
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25888
diff changeset
554 checking for updated bookmarks
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
555
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
556 $ cd ..
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
557
12414
858fe1e74785 tests: unify test-ssh
Matt Mackall <mpm@selenic.com>
parents: 12409
diff changeset
558 $ cat dummylog
15622
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
559 Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
26737
fa6ba7c9600b test-ssh: remove superfluous triple slashes from absolute path test
Yuya Nishihara <yuya@tcha.org>
parents: 26031
diff changeset
560 Got arguments 1:user@dummy 2:hg -R $TESTTMP/nonexistent serve --stdio
15622
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
561 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
38135
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
562 Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio (no-reposimplestore !)
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
563 Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !)
36b2a304216c tests: disable tests for advanced clone features with simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38116
diff changeset
564 Got arguments 1:user@dummy 2:hg -R remote serve --stdio (no-reposimplestore !)
24193
eabe44ec5af5 pull: print "pulling from foo" before accessing the other repo
Thomas Arendsen Hein <thomas@intevation.de>
parents: 23416
diff changeset
565 Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
15622
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
566 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
567 Got arguments 1:user@dummy 2:hg -R local serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
568 Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
569 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
32526
aff7b32b3c05 hook: add hook name information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 32525
diff changeset
570 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
15622
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
571 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
572 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
573 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
574 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
575 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
576 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
577 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
578 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
579 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
32526
aff7b32b3c05 hook: add hook name information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 32525
diff changeset
580 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
40592
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
581 Got arguments 1:user@dummy 2:chg -R remote serve --stdio (chg !)
0ad5f064d829 test-ssh: show that stdio redirection doesn't work with chg
Yuya Nishihara <yuya@tcha.org>
parents: 38956
diff changeset
582 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 !)
15622
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
583 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
584 Got arguments 1:user@dummy 2:hg init 'a repo'
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
585 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
86fc364ca5f8 sshrepo: don't quote obviously safe strings (issue2983)
Mads Kiilerich <mads@kiilerich.com>
parents: 15581
diff changeset
586 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
17844
b32e55e6c3c7 clone: don't %-escape the default destination (issue3145)
Matt Mackall <mpm@selenic.com>
parents: 17298
diff changeset
587 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
21188
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20501
diff changeset
588 Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
22247
8341c677c204 test-ssh: verify that stderr from remote is printed (issue4336)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 21188
diff changeset
589 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
32526
aff7b32b3c05 hook: add hook name information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 32525
diff changeset
590 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
25822
405303df6a2a ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25562
diff changeset
591 Got arguments 1:user@dummy 2:hg -R remote serve --stdio
27468
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
592
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
593 remote hook failure is attributed to remote
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
594
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
595 $ cat > $TESTTMP/failhook << EOF
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
596 > def hook(ui, repo, **kwargs):
38894
e69628f36196 py3: add b'' prefixes in tests/test-ssh.t and tests/test-ssh-bundle1.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 38729
diff changeset
597 > ui.write(b'hook failure!\n')
27468
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
598 > ui.flush()
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
599 > return 1
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
600 > EOF
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
601
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
602 $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
603
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
604 $ hg -q --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" clone ssh://user@dummy/remote hookout
27468
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
605 $ cd hookout
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
606 $ touch hookfailure
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
607 $ hg -q commit -A -m 'remote hook failure'
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
608 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" push
27468
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
609 pushing to ssh://user@dummy/remote
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
610 searching for changes
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
611 remote: adding changesets
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
612 remote: adding manifests
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
613 remote: adding file changes
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
614 remote: added 1 changesets with 1 changes to 1 files
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
615 remote: hook failure!
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
616 remote: transaction abort!
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
617 remote: rollback completed
27469
58f1645f72c3 bundle2: attribute remote failures to remote (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27468
diff changeset
618 remote: pretxnchangegroup.fail hook failed
58f1645f72c3 bundle2: attribute remote failures to remote (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27468
diff changeset
619 abort: push failed on remote
27468
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
620 [255]
00e75baa810f tests: add tests for remote hook output (issue4788)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26738
diff changeset
621
31693
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
622 abort during pull is properly reported as such
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
623
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
624 $ echo morefoo >> ../remote/foo
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
625 $ hg -R ../remote commit --message "more foo to be pulled"
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
626 $ cat >> ../remote/.hg/hgrc << EOF
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
627 > [extensions]
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
628 > crash = ${TESTDIR}/crashgetbundler.py
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
629 > EOF
34118
72f051f9a7d8 tests: quote $PYTHON for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 34069
diff changeset
630 $ hg --config ui.ssh="\"$PYTHON\" $TESTDIR/dummyssh" pull
31693
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
631 pulling from ssh://user@dummy/remote
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
632 searching for changes
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
633 remote: abort: this is an exercise
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
634 abort: pull failed on remote
f3807a135e43 wireproto: properly report server Abort during 'getbundle'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 31342
diff changeset
635 [255]
35891
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
636
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
637 abort with no error hint when there is a ssh problem when pulling
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
638
35963
3180ff7f6025 test-ssh: do not actually look up "brokenrepository" by DNS
Yuya Nishihara <yuya@tcha.org>
parents: 35891
diff changeset
639 $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
35891
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
640 pulling from ssh://brokenrepository/
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
641 abort: no suitable response from remote hg!
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
642 [255]
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
643
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
644 abort with configured error hint when there is a ssh problem when pulling
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
645
35963
3180ff7f6025 test-ssh: do not actually look up "brokenrepository" by DNS
Yuya Nishihara <yuya@tcha.org>
parents: 35891
diff changeset
646 $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \
3180ff7f6025 test-ssh: do not actually look up "brokenrepository" by DNS
Yuya Nishihara <yuya@tcha.org>
parents: 35891
diff changeset
647 > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
35891
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
648 pulling from ssh://brokenrepository/
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
649 abort: no suitable response from remote hg!
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
650 (Please see http://company/internalwiki/ssh.html)
8b1c887d52e7 sshpeer: add a configurable hint for the ssh error message
Zuzanna Mroczek <zuza@fb.com>
parents: 35857
diff changeset
651 [255]
36219
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
652
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
653 test that custom environment is passed down to ssh executable
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
654 $ cat >>dumpenv <<EOF
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
655 > #! /bin/sh
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
656 > echo \$VAR >&2
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
657 > EOF
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
658 $ chmod +x dumpenv
36267
1853c8677160 test-ssh: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 36219
diff changeset
659 $ hg pull ssh://something --config ui.ssh="sh dumpenv"
36219
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
660 pulling from ssh://something/
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
661 remote:
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
662 abort: no suitable response from remote hg!
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
663 [255]
36267
1853c8677160 test-ssh: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 36219
diff changeset
664 $ hg pull ssh://something --config ui.ssh="sh dumpenv" --config sshenv.VAR=17
36219
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
665 pulling from ssh://something/
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
666 remote: 17
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
667 abort: no suitable response from remote hg!
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
668 [255]
31d21309635b sshpeer: allow for additional environment passing to ssh exe
Kostia Balytskyi <ikostia@fb.com>
parents: 36176
diff changeset
669