Show More
@@ -0,0 +1,20 b'' | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | ||||
|
3 | import sys | |||
|
4 | import os | |||
|
5 | ||||
|
6 | os.chdir(os.getenv('TESTTMP')) | |||
|
7 | ||||
|
8 | if sys.argv[1] != "user@dummy": | |||
|
9 | sys.exit(-1) | |||
|
10 | ||||
|
11 | os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" | |||
|
12 | ||||
|
13 | log = open("dummylog", "ab") | |||
|
14 | log.write("Got arguments") | |||
|
15 | for i, arg in enumerate(sys.argv[1:]): | |||
|
16 | log.write(" %d:%s" % (i+1, arg)) | |||
|
17 | log.write("\n") | |||
|
18 | log.close() | |||
|
19 | r = os.system(sys.argv[2]) | |||
|
20 | sys.exit(bool(r)) |
@@ -1,215 +1,194 b'' | |||||
1 | This test tries to exercise the ssh functionality with a dummy script |
|
1 | This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
2 | |||
3 | $ cat <<EOF > dummyssh |
|
|||
4 | > import sys |
|
|||
5 | > import os |
|
|||
6 | > |
|
|||
7 | > os.chdir(os.path.dirname(sys.argv[0])) |
|
|||
8 | > if sys.argv[1] != "user@dummy": |
|
|||
9 | > sys.exit(-1) |
|
|||
10 | > |
|
|||
11 | > if not os.path.exists("dummyssh"): |
|
|||
12 | > sys.exit(-1) |
|
|||
13 | > |
|
|||
14 | > log = open("dummylog", "ab") |
|
|||
15 | > log.write("Got arguments") |
|
|||
16 | > for i, arg in enumerate(sys.argv[1:]): |
|
|||
17 | > log.write(" %d:%s" % (i+1, arg)) |
|
|||
18 | > log.write("\n") |
|
|||
19 | > log.close() |
|
|||
20 | > r = os.system(sys.argv[2]) |
|
|||
21 | > sys.exit(bool(r)) |
|
|||
22 | > EOF |
|
|||
23 |
|
||||
24 | $ checknewrepo() |
|
3 | $ checknewrepo() | |
25 | > { |
|
4 | > { | |
26 | > name=$1 |
|
5 | > name=$1 | |
27 | > if [ -d "$name"/.hg/store ]; then |
|
6 | > if [ -d "$name"/.hg/store ]; then | |
28 | > echo store created |
|
7 | > echo store created | |
29 | > fi |
|
8 | > fi | |
30 | > if [ -f "$name"/.hg/00changelog.i ]; then |
|
9 | > if [ -f "$name"/.hg/00changelog.i ]; then | |
31 | > echo 00changelog.i created |
|
10 | > echo 00changelog.i created | |
32 | > fi |
|
11 | > fi | |
33 | > cat "$name"/.hg/requires |
|
12 | > cat "$name"/.hg/requires | |
34 | > } |
|
13 | > } | |
35 |
|
14 | |||
36 | creating 'local' |
|
15 | creating 'local' | |
37 |
|
16 | |||
38 | $ hg init local |
|
17 | $ hg init local | |
39 | $ checknewrepo local |
|
18 | $ checknewrepo local | |
40 | store created |
|
19 | store created | |
41 | 00changelog.i created |
|
20 | 00changelog.i created | |
42 | revlogv1 |
|
21 | revlogv1 | |
43 | store |
|
22 | store | |
44 | fncache |
|
23 | fncache | |
45 | dotencode |
|
24 | dotencode | |
46 | $ echo this > local/foo |
|
25 | $ echo this > local/foo | |
47 | $ hg ci --cwd local -A -m "init" |
|
26 | $ hg ci --cwd local -A -m "init" | |
48 | adding foo |
|
27 | adding foo | |
49 |
|
28 | |||
50 | creating repo with format.usestore=false |
|
29 | creating repo with format.usestore=false | |
51 |
|
30 | |||
52 | $ hg --config format.usestore=false init old |
|
31 | $ hg --config format.usestore=false init old | |
53 | $ checknewrepo old |
|
32 | $ checknewrepo old | |
54 | revlogv1 |
|
33 | revlogv1 | |
55 |
|
34 | |||
56 | creating repo with format.usefncache=false |
|
35 | creating repo with format.usefncache=false | |
57 |
|
36 | |||
58 | $ hg --config format.usefncache=false init old2 |
|
37 | $ hg --config format.usefncache=false init old2 | |
59 | $ checknewrepo old2 |
|
38 | $ checknewrepo old2 | |
60 | store created |
|
39 | store created | |
61 | 00changelog.i created |
|
40 | 00changelog.i created | |
62 | revlogv1 |
|
41 | revlogv1 | |
63 | store |
|
42 | store | |
64 |
|
43 | |||
65 | creating repo with format.dotencode=false |
|
44 | creating repo with format.dotencode=false | |
66 |
|
45 | |||
67 | $ hg --config format.dotencode=false init old3 |
|
46 | $ hg --config format.dotencode=false init old3 | |
68 | $ checknewrepo old3 |
|
47 | $ checknewrepo old3 | |
69 | store created |
|
48 | store created | |
70 | 00changelog.i created |
|
49 | 00changelog.i created | |
71 | revlogv1 |
|
50 | revlogv1 | |
72 | store |
|
51 | store | |
73 | fncache |
|
52 | fncache | |
74 |
|
53 | |||
75 | test failure |
|
54 | test failure | |
76 |
|
55 | |||
77 | $ hg init local |
|
56 | $ hg init local | |
78 | abort: repository local already exists! |
|
57 | abort: repository local already exists! | |
79 | [255] |
|
58 | [255] | |
80 |
|
59 | |||
81 | init+push to remote2 |
|
60 | init+push to remote2 | |
82 |
|
61 | |||
83 |
$ hg init -e "python |
|
62 | $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2 | |
84 | $ hg incoming -R remote2 local |
|
63 | $ hg incoming -R remote2 local | |
85 | comparing with local |
|
64 | comparing with local | |
86 | changeset: 0:08b9e9f63b32 |
|
65 | changeset: 0:08b9e9f63b32 | |
87 | tag: tip |
|
66 | tag: tip | |
88 | user: test |
|
67 | user: test | |
89 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
68 | date: Thu Jan 01 00:00:00 1970 +0000 | |
90 | summary: init |
|
69 | summary: init | |
91 |
|
70 | |||
92 |
|
71 | |||
93 |
$ hg push -R local -e "python |
|
72 | $ hg push -R local -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2 | |
94 | pushing to ssh://user@dummy/remote2 |
|
73 | pushing to ssh://user@dummy/remote2 | |
95 | searching for changes |
|
74 | searching for changes | |
96 | remote: adding changesets |
|
75 | remote: adding changesets | |
97 | remote: adding manifests |
|
76 | remote: adding manifests | |
98 | remote: adding file changes |
|
77 | remote: adding file changes | |
99 | remote: added 1 changesets with 1 changes to 1 files |
|
78 | remote: added 1 changesets with 1 changes to 1 files | |
100 |
|
79 | |||
101 | clone to remote1 |
|
80 | clone to remote1 | |
102 |
|
81 | |||
103 |
$ hg clone -e "python |
|
82 | $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1 | |
104 | searching for changes |
|
83 | searching for changes | |
105 | remote: adding changesets |
|
84 | remote: adding changesets | |
106 | remote: adding manifests |
|
85 | remote: adding manifests | |
107 | remote: adding file changes |
|
86 | remote: adding file changes | |
108 | remote: added 1 changesets with 1 changes to 1 files |
|
87 | remote: added 1 changesets with 1 changes to 1 files | |
109 |
|
88 | |||
110 | init to existing repo |
|
89 | init to existing repo | |
111 |
|
90 | |||
112 |
$ hg init -e "python |
|
91 | $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote1 | |
113 | abort: repository remote1 already exists! |
|
92 | abort: repository remote1 already exists! | |
114 | abort: could not create remote repo! |
|
93 | abort: could not create remote repo! | |
115 | [255] |
|
94 | [255] | |
116 |
|
95 | |||
117 | clone to existing repo |
|
96 | clone to existing repo | |
118 |
|
97 | |||
119 |
$ hg clone -e "python |
|
98 | $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1 | |
120 | abort: repository remote1 already exists! |
|
99 | abort: repository remote1 already exists! | |
121 | abort: could not create remote repo! |
|
100 | abort: could not create remote repo! | |
122 | [255] |
|
101 | [255] | |
123 |
|
102 | |||
124 | output of dummyssh |
|
103 | output of dummyssh | |
125 |
|
104 | |||
126 | $ cat dummylog |
|
105 | $ cat dummylog | |
127 | Got arguments 1:user@dummy 2:hg init remote2 |
|
106 | Got arguments 1:user@dummy 2:hg init remote2 | |
128 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
107 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
129 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
108 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio | |
130 | Got arguments 1:user@dummy 2:hg init remote1 |
|
109 | Got arguments 1:user@dummy 2:hg init remote1 | |
131 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
110 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio | |
132 | Got arguments 1:user@dummy 2:hg init remote1 |
|
111 | Got arguments 1:user@dummy 2:hg init remote1 | |
133 | Got arguments 1:user@dummy 2:hg init remote1 |
|
112 | Got arguments 1:user@dummy 2:hg init remote1 | |
134 |
|
113 | |||
135 | comparing repositories |
|
114 | comparing repositories | |
136 |
|
115 | |||
137 | $ hg tip -q -R local |
|
116 | $ hg tip -q -R local | |
138 | 0:08b9e9f63b32 |
|
117 | 0:08b9e9f63b32 | |
139 | $ hg tip -q -R remote1 |
|
118 | $ hg tip -q -R remote1 | |
140 | 0:08b9e9f63b32 |
|
119 | 0:08b9e9f63b32 | |
141 | $ hg tip -q -R remote2 |
|
120 | $ hg tip -q -R remote2 | |
142 | 0:08b9e9f63b32 |
|
121 | 0:08b9e9f63b32 | |
143 |
|
122 | |||
144 | check names for repositories (clashes with URL schemes, special chars) |
|
123 | check names for repositories (clashes with URL schemes, special chars) | |
145 |
|
124 | |||
146 | $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do |
|
125 | $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do | |
147 | > printf "hg init \"$i\"... " |
|
126 | > printf "hg init \"$i\"... " | |
148 | > hg init "$i" |
|
127 | > hg init "$i" | |
149 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" |
|
128 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" | |
150 | > done |
|
129 | > done | |
151 | hg init "bundle"... ok |
|
130 | hg init "bundle"... ok | |
152 | hg init "file"... ok |
|
131 | hg init "file"... ok | |
153 | hg init "hg"... ok |
|
132 | hg init "hg"... ok | |
154 | hg init "http"... ok |
|
133 | hg init "http"... ok | |
155 | hg init "https"... ok |
|
134 | hg init "https"... ok | |
156 | hg init "old-http"... ok |
|
135 | hg init "old-http"... ok | |
157 | hg init "ssh"... ok |
|
136 | hg init "ssh"... ok | |
158 | hg init "static-http"... ok |
|
137 | hg init "static-http"... ok | |
159 | hg init " "... ok |
|
138 | hg init " "... ok | |
160 | hg init "with space"... ok |
|
139 | hg init "with space"... ok | |
161 |
|
140 | |||
162 | creating 'local/sub/repo' |
|
141 | creating 'local/sub/repo' | |
163 |
|
142 | |||
164 | $ hg init local/sub/repo |
|
143 | $ hg init local/sub/repo | |
165 | $ checknewrepo local/sub/repo |
|
144 | $ checknewrepo local/sub/repo | |
166 | store created |
|
145 | store created | |
167 | 00changelog.i created |
|
146 | 00changelog.i created | |
168 | revlogv1 |
|
147 | revlogv1 | |
169 | store |
|
148 | store | |
170 | fncache |
|
149 | fncache | |
171 | dotencode |
|
150 | dotencode | |
172 |
|
151 | |||
173 | prepare test of init of url configured from paths |
|
152 | prepare test of init of url configured from paths | |
174 |
|
153 | |||
175 | $ echo '[paths]' >> $HGRCPATH |
|
154 | $ echo '[paths]' >> $HGRCPATH | |
176 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH |
|
155 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH | |
177 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH |
|
156 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH | |
178 |
|
157 | |||
179 | init should (for consistency with clone) expand the url |
|
158 | init should (for consistency with clone) expand the url | |
180 |
|
159 | |||
181 | $ hg init somewhere |
|
160 | $ hg init somewhere | |
182 | $ checknewrepo "url from paths" |
|
161 | $ checknewrepo "url from paths" | |
183 | store created |
|
162 | store created | |
184 | 00changelog.i created |
|
163 | 00changelog.i created | |
185 | revlogv1 |
|
164 | revlogv1 | |
186 | store |
|
165 | store | |
187 | fncache |
|
166 | fncache | |
188 | dotencode |
|
167 | dotencode | |
189 |
|
168 | |||
190 | verify that clone also expand urls |
|
169 | verify that clone also expand urls | |
191 |
|
170 | |||
192 | $ hg clone somewhere elsewhere |
|
171 | $ hg clone somewhere elsewhere | |
193 | updating to branch default |
|
172 | updating to branch default | |
194 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
173 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
195 | $ checknewrepo "another paths url" |
|
174 | $ checknewrepo "another paths url" | |
196 | store created |
|
175 | store created | |
197 | 00changelog.i created |
|
176 | 00changelog.i created | |
198 | revlogv1 |
|
177 | revlogv1 | |
199 | store |
|
178 | store | |
200 | fncache |
|
179 | fncache | |
201 | dotencode |
|
180 | dotencode | |
202 |
|
181 | |||
203 | clone bookmarks |
|
182 | clone bookmarks | |
204 |
|
183 | |||
205 | $ hg -R local bookmark test |
|
184 | $ hg -R local bookmark test | |
206 | $ hg -R local bookmarks |
|
185 | $ hg -R local bookmarks | |
207 | * test 0:08b9e9f63b32 |
|
186 | * test 0:08b9e9f63b32 | |
208 |
$ hg clone -e "python |
|
187 | $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote-bookmarks | |
209 | searching for changes |
|
188 | searching for changes | |
210 | remote: adding changesets |
|
189 | remote: adding changesets | |
211 | remote: adding manifests |
|
190 | remote: adding manifests | |
212 | remote: adding file changes |
|
191 | remote: adding file changes | |
213 | remote: added 1 changesets with 1 changes to 1 files |
|
192 | remote: added 1 changesets with 1 changes to 1 files | |
214 | $ hg -R remote-bookmarks bookmarks |
|
193 | $ hg -R remote-bookmarks bookmarks | |
215 | test 0:08b9e9f63b32 |
|
194 | test 0:08b9e9f63b32 |
@@ -1,216 +1,193 b'' | |||||
1 | This test tries to exercise the ssh functionality with a dummy script |
|
1 | This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
2 | |||
3 | $ cat <<EOF > dummyssh |
|
3 | creating 'remote' repo | |
4 | > import sys |
|
|||
5 | > import os |
|
|||
6 | > |
|
|||
7 | > os.chdir(os.path.dirname(sys.argv[0])) |
|
|||
8 | > if sys.argv[1] != "user@dummy": |
|
|||
9 | > sys.exit(-1) |
|
|||
10 | > |
|
|||
11 | > if not os.path.exists("dummyssh"): |
|
|||
12 | > sys.exit(-1) |
|
|||
13 | > |
|
|||
14 | > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" |
|
|||
15 | > |
|
|||
16 | > log = open("dummylog", "ab") |
|
|||
17 | > log.write("Got arguments") |
|
|||
18 | > for i, arg in enumerate(sys.argv[1:]): |
|
|||
19 | > log.write(" %d:%s" % (i+1, arg)) |
|
|||
20 | > log.write("\n") |
|
|||
21 | > log.close() |
|
|||
22 | > r = os.system(sys.argv[2]) |
|
|||
23 | > sys.exit(bool(r)) |
|
|||
24 | > EOF |
|
|||
25 |
|
||||
26 | creating 'remote |
|
|||
27 |
|
4 | |||
28 | $ hg init remote |
|
5 | $ hg init remote | |
29 | $ cd remote |
|
6 | $ cd remote | |
30 | $ hg unbundle $TESTDIR/bundles/remote.hg |
|
7 | $ hg unbundle $TESTDIR/bundles/remote.hg | |
31 | adding changesets |
|
8 | adding changesets | |
32 | adding manifests |
|
9 | adding manifests | |
33 | adding file changes |
|
10 | adding file changes | |
34 | added 9 changesets with 7 changes to 4 files (+1 heads) |
|
11 | added 9 changesets with 7 changes to 4 files (+1 heads) | |
35 |
(run 'hg heads' |
|
12 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
36 | $ hg up tip |
|
13 | $ hg up tip | |
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
14 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | $ cd .. |
|
15 | $ cd .. | |
39 |
|
16 | |||
40 | clone remote via stream |
|
17 | clone remote via stream | |
41 |
|
18 | |||
42 | $ for i in 0 1 2 3 4 5 6 7 8; do |
|
19 | $ for i in 0 1 2 3 4 5 6 7 8; do | |
43 |
> hg clone -e "python |
|
20 | > hg clone -e "python $TESTDIR/dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" | |
44 | > if cd test-"$i"; then |
|
21 | > if cd test-"$i"; then | |
45 | > hg verify |
|
22 | > hg verify | |
46 | > cd .. |
|
23 | > cd .. | |
47 | > fi |
|
24 | > fi | |
48 | > done |
|
25 | > done | |
49 | adding changesets |
|
26 | adding changesets | |
50 | adding manifests |
|
27 | adding manifests | |
51 | adding file changes |
|
28 | adding file changes | |
52 | added 1 changesets with 1 changes to 1 files |
|
29 | added 1 changesets with 1 changes to 1 files | |
53 | updating to branch default |
|
30 | updating to branch default | |
54 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
31 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
55 | checking changesets |
|
32 | checking changesets | |
56 | checking manifests |
|
33 | checking manifests | |
57 | crosschecking files in changesets and manifests |
|
34 | crosschecking files in changesets and manifests | |
58 | checking files |
|
35 | checking files | |
59 | 1 files, 1 changesets, 1 total revisions |
|
36 | 1 files, 1 changesets, 1 total revisions | |
60 | adding changesets |
|
37 | adding changesets | |
61 | adding manifests |
|
38 | adding manifests | |
62 | adding file changes |
|
39 | adding file changes | |
63 | added 2 changesets with 2 changes to 1 files |
|
40 | added 2 changesets with 2 changes to 1 files | |
64 | updating to branch default |
|
41 | updating to branch default | |
65 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
66 | checking changesets |
|
43 | checking changesets | |
67 | checking manifests |
|
44 | checking manifests | |
68 | crosschecking files in changesets and manifests |
|
45 | crosschecking files in changesets and manifests | |
69 | checking files |
|
46 | checking files | |
70 | 1 files, 2 changesets, 2 total revisions |
|
47 | 1 files, 2 changesets, 2 total revisions | |
71 | adding changesets |
|
48 | adding changesets | |
72 | adding manifests |
|
49 | adding manifests | |
73 | adding file changes |
|
50 | adding file changes | |
74 | added 3 changesets with 3 changes to 1 files |
|
51 | added 3 changesets with 3 changes to 1 files | |
75 | updating to branch default |
|
52 | updating to branch default | |
76 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
53 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
77 | checking changesets |
|
54 | checking changesets | |
78 | checking manifests |
|
55 | checking manifests | |
79 | crosschecking files in changesets and manifests |
|
56 | crosschecking files in changesets and manifests | |
80 | checking files |
|
57 | checking files | |
81 | 1 files, 3 changesets, 3 total revisions |
|
58 | 1 files, 3 changesets, 3 total revisions | |
82 | adding changesets |
|
59 | adding changesets | |
83 | adding manifests |
|
60 | adding manifests | |
84 | adding file changes |
|
61 | adding file changes | |
85 | added 4 changesets with 4 changes to 1 files |
|
62 | added 4 changesets with 4 changes to 1 files | |
86 | updating to branch default |
|
63 | updating to branch default | |
87 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
88 | checking changesets |
|
65 | checking changesets | |
89 | checking manifests |
|
66 | checking manifests | |
90 | crosschecking files in changesets and manifests |
|
67 | crosschecking files in changesets and manifests | |
91 | checking files |
|
68 | checking files | |
92 | 1 files, 4 changesets, 4 total revisions |
|
69 | 1 files, 4 changesets, 4 total revisions | |
93 | adding changesets |
|
70 | adding changesets | |
94 | adding manifests |
|
71 | adding manifests | |
95 | adding file changes |
|
72 | adding file changes | |
96 | added 2 changesets with 2 changes to 1 files |
|
73 | added 2 changesets with 2 changes to 1 files | |
97 | updating to branch default |
|
74 | updating to branch default | |
98 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
99 | checking changesets |
|
76 | checking changesets | |
100 | checking manifests |
|
77 | checking manifests | |
101 | crosschecking files in changesets and manifests |
|
78 | crosschecking files in changesets and manifests | |
102 | checking files |
|
79 | checking files | |
103 | 1 files, 2 changesets, 2 total revisions |
|
80 | 1 files, 2 changesets, 2 total revisions | |
104 | adding changesets |
|
81 | adding changesets | |
105 | adding manifests |
|
82 | adding manifests | |
106 | adding file changes |
|
83 | adding file changes | |
107 | added 3 changesets with 3 changes to 1 files |
|
84 | added 3 changesets with 3 changes to 1 files | |
108 | updating to branch default |
|
85 | updating to branch default | |
109 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
110 | checking changesets |
|
87 | checking changesets | |
111 | checking manifests |
|
88 | checking manifests | |
112 | crosschecking files in changesets and manifests |
|
89 | crosschecking files in changesets and manifests | |
113 | checking files |
|
90 | checking files | |
114 | 1 files, 3 changesets, 3 total revisions |
|
91 | 1 files, 3 changesets, 3 total revisions | |
115 | adding changesets |
|
92 | adding changesets | |
116 | adding manifests |
|
93 | adding manifests | |
117 | adding file changes |
|
94 | adding file changes | |
118 | added 4 changesets with 5 changes to 2 files |
|
95 | added 4 changesets with 5 changes to 2 files | |
119 | updating to branch default |
|
96 | updating to branch default | |
120 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
121 | checking changesets |
|
98 | checking changesets | |
122 | checking manifests |
|
99 | checking manifests | |
123 | crosschecking files in changesets and manifests |
|
100 | crosschecking files in changesets and manifests | |
124 | checking files |
|
101 | checking files | |
125 | 2 files, 4 changesets, 5 total revisions |
|
102 | 2 files, 4 changesets, 5 total revisions | |
126 | adding changesets |
|
103 | adding changesets | |
127 | adding manifests |
|
104 | adding manifests | |
128 | adding file changes |
|
105 | adding file changes | |
129 | added 5 changesets with 6 changes to 3 files |
|
106 | added 5 changesets with 6 changes to 3 files | |
130 | updating to branch default |
|
107 | updating to branch default | |
131 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
132 | checking changesets |
|
109 | checking changesets | |
133 | checking manifests |
|
110 | checking manifests | |
134 | crosschecking files in changesets and manifests |
|
111 | crosschecking files in changesets and manifests | |
135 | checking files |
|
112 | checking files | |
136 | 3 files, 5 changesets, 6 total revisions |
|
113 | 3 files, 5 changesets, 6 total revisions | |
137 | adding changesets |
|
114 | adding changesets | |
138 | adding manifests |
|
115 | adding manifests | |
139 | adding file changes |
|
116 | adding file changes | |
140 | added 5 changesets with 5 changes to 2 files |
|
117 | added 5 changesets with 5 changes to 2 files | |
141 | updating to branch default |
|
118 | updating to branch default | |
142 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
143 | checking changesets |
|
120 | checking changesets | |
144 | checking manifests |
|
121 | checking manifests | |
145 | crosschecking files in changesets and manifests |
|
122 | crosschecking files in changesets and manifests | |
146 | checking files |
|
123 | checking files | |
147 | 2 files, 5 changesets, 5 total revisions |
|
124 | 2 files, 5 changesets, 5 total revisions | |
148 | $ cd test-8 |
|
125 | $ cd test-8 | |
149 | $ hg pull ../test-7 |
|
126 | $ hg pull ../test-7 | |
150 | pulling from ../test-7 |
|
127 | pulling from ../test-7 | |
151 | searching for changes |
|
128 | searching for changes | |
152 | adding changesets |
|
129 | adding changesets | |
153 | adding manifests |
|
130 | adding manifests | |
154 | adding file changes |
|
131 | adding file changes | |
155 | added 4 changesets with 2 changes to 3 files (+1 heads) |
|
132 | added 4 changesets with 2 changes to 3 files (+1 heads) | |
156 |
(run 'hg heads' |
|
133 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
157 | $ hg verify |
|
134 | $ hg verify | |
158 | checking changesets |
|
135 | checking changesets | |
159 | checking manifests |
|
136 | checking manifests | |
160 | crosschecking files in changesets and manifests |
|
137 | crosschecking files in changesets and manifests | |
161 | checking files |
|
138 | checking files | |
162 | 4 files, 9 changesets, 7 total revisions |
|
139 | 4 files, 9 changesets, 7 total revisions | |
163 | $ cd .. |
|
140 | $ cd .. | |
164 | $ cd test-1 |
|
141 | $ cd test-1 | |
165 |
$ hg pull -e "python |
|
142 | $ hg pull -e "python $TESTDIR/dummyssh" -r 4 ssh://user@dummy/remote | |
166 | pulling from ssh://user@dummy/remote |
|
143 | pulling from ssh://user@dummy/remote | |
167 | searching for changes |
|
144 | searching for changes | |
168 | adding changesets |
|
145 | adding changesets | |
169 | adding manifests |
|
146 | adding manifests | |
170 | adding file changes |
|
147 | adding file changes | |
171 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
148 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
172 |
(run 'hg heads' |
|
149 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
173 | $ hg verify |
|
150 | $ hg verify | |
174 | checking changesets |
|
151 | checking changesets | |
175 | checking manifests |
|
152 | checking manifests | |
176 | crosschecking files in changesets and manifests |
|
153 | crosschecking files in changesets and manifests | |
177 | checking files |
|
154 | checking files | |
178 | 1 files, 3 changesets, 2 total revisions |
|
155 | 1 files, 3 changesets, 2 total revisions | |
179 |
$ hg pull -e "python |
|
156 | $ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote | |
180 | pulling from ssh://user@dummy/remote |
|
157 | pulling from ssh://user@dummy/remote | |
181 | searching for changes |
|
158 | searching for changes | |
182 | adding changesets |
|
159 | adding changesets | |
183 | adding manifests |
|
160 | adding manifests | |
184 | adding file changes |
|
161 | adding file changes | |
185 | added 6 changesets with 5 changes to 4 files |
|
162 | added 6 changesets with 5 changes to 4 files | |
186 |
(run 'hg |
|
163 | (run 'hg update' to get a working copy) | |
187 | $ cd .. |
|
164 | $ cd .. | |
188 | $ cd test-2 |
|
165 | $ cd test-2 | |
189 |
$ hg pull -e "python |
|
166 | $ hg pull -e "python $TESTDIR/dummyssh" -r 5 ssh://user@dummy/remote | |
190 | pulling from ssh://user@dummy/remote |
|
167 | pulling from ssh://user@dummy/remote | |
191 | searching for changes |
|
168 | searching for changes | |
192 | adding changesets |
|
169 | adding changesets | |
193 | adding manifests |
|
170 | adding manifests | |
194 | adding file changes |
|
171 | adding file changes | |
195 | added 2 changesets with 0 changes to 0 files (+1 heads) |
|
172 | added 2 changesets with 0 changes to 0 files (+1 heads) | |
196 |
(run 'hg heads' |
|
173 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
197 | $ hg verify |
|
174 | $ hg verify | |
198 | checking changesets |
|
175 | checking changesets | |
199 | checking manifests |
|
176 | checking manifests | |
200 | crosschecking files in changesets and manifests |
|
177 | crosschecking files in changesets and manifests | |
201 | checking files |
|
178 | checking files | |
202 | 1 files, 5 changesets, 3 total revisions |
|
179 | 1 files, 5 changesets, 3 total revisions | |
203 |
$ hg pull -e "python |
|
180 | $ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote | |
204 | pulling from ssh://user@dummy/remote |
|
181 | pulling from ssh://user@dummy/remote | |
205 | searching for changes |
|
182 | searching for changes | |
206 | adding changesets |
|
183 | adding changesets | |
207 | adding manifests |
|
184 | adding manifests | |
208 | adding file changes |
|
185 | adding file changes | |
209 | added 4 changesets with 4 changes to 4 files |
|
186 | added 4 changesets with 4 changes to 4 files | |
210 |
(run 'hg |
|
187 | (run 'hg update' to get a working copy) | |
211 | $ hg verify |
|
188 | $ hg verify | |
212 | checking changesets |
|
189 | checking changesets | |
213 | checking manifests |
|
190 | checking manifests | |
214 | crosschecking files in changesets and manifests |
|
191 | crosschecking files in changesets and manifests | |
215 | checking files |
|
192 | checking files | |
216 | 4 files, 9 changesets, 7 total revisions |
|
193 | 4 files, 9 changesets, 7 total revisions |
@@ -1,312 +1,290 b'' | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | This test tries to exercise the ssh functionality with a dummy script |
|
3 | This test tries to exercise the ssh functionality with a dummy script | |
4 |
|
4 | |||
5 | $ cat <<EOF > dummyssh |
|
|||
6 | > import sys |
|
|||
7 | > import os |
|
|||
8 | > |
|
|||
9 | > os.chdir(os.path.dirname(sys.argv[0])) |
|
|||
10 | > if sys.argv[1] != "user@dummy": |
|
|||
11 | > sys.exit(-1) |
|
|||
12 | > |
|
|||
13 | > if not os.path.exists("dummyssh"): |
|
|||
14 | > sys.exit(-1) |
|
|||
15 | > |
|
|||
16 | > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" |
|
|||
17 | > |
|
|||
18 | > log = open("dummylog", "ab") |
|
|||
19 | > log.write("Got arguments") |
|
|||
20 | > for i, arg in enumerate(sys.argv[1:]): |
|
|||
21 | > log.write(" %d:%s" % (i+1, arg)) |
|
|||
22 | > log.write("\n") |
|
|||
23 | > log.close() |
|
|||
24 | > r = os.system(sys.argv[2]) |
|
|||
25 | > sys.exit(bool(r)) |
|
|||
26 | > EOF |
|
|||
27 | $ cat <<EOF > badhook |
|
|||
28 | > import sys |
|
|||
29 | > sys.stdout.write("KABOOM\n") |
|
|||
30 | > EOF |
|
|||
31 |
|
||||
32 | creating 'remote' repo |
|
5 | creating 'remote' repo | |
33 |
|
6 | |||
34 | $ hg init remote |
|
7 | $ hg init remote | |
35 | $ cd remote |
|
8 | $ cd remote | |
36 | $ echo this > foo |
|
9 | $ echo this > foo | |
37 | $ echo this > fooO |
|
10 | $ echo this > fooO | |
38 | $ hg ci -A -m "init" foo fooO |
|
11 | $ hg ci -A -m "init" foo fooO | |
39 | $ cat <<EOF > .hg/hgrc |
|
12 | $ cat <<EOF > .hg/hgrc | |
40 | > [server] |
|
13 | > [server] | |
41 | > uncompressed = True |
|
14 | > uncompressed = True | |
42 | > |
|
15 | > | |
43 | > [hooks] |
|
16 | > [hooks] | |
44 | > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog |
|
17 | > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog | |
45 | > EOF |
|
18 | > EOF | |
46 | $ cd .. |
|
19 | $ cd .. | |
47 |
|
20 | |||
48 | repo not found error |
|
21 | repo not found error | |
49 |
|
22 | |||
50 |
$ hg clone -e "python |
|
23 | $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/nonexistent local | |
51 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
24 | remote: abort: There is no Mercurial repository here (.hg not found)! | |
52 | abort: no suitable response from remote hg! |
|
25 | abort: no suitable response from remote hg! | |
53 | [255] |
|
26 | [255] | |
54 |
|
27 | |||
55 | non-existent absolute path |
|
28 | non-existent absolute path | |
56 |
|
29 | |||
57 |
$ hg clone -e "python |
|
30 | $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy//`pwd`/nonexistent local | |
58 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
31 | remote: abort: There is no Mercurial repository here (.hg not found)! | |
59 | abort: no suitable response from remote hg! |
|
32 | abort: no suitable response from remote hg! | |
60 | [255] |
|
33 | [255] | |
61 |
|
34 | |||
62 | clone remote via stream |
|
35 | clone remote via stream | |
63 |
|
36 | |||
64 |
$ hg clone -e "python |
|
37 | $ hg clone -e "python $TESTDIR/dummyssh" --uncompressed ssh://user@dummy/remote local-stream | |
65 | streaming all changes |
|
38 | streaming all changes | |
66 | 4 files to transfer, 392 bytes of data |
|
39 | 4 files to transfer, 392 bytes of data | |
67 | transferred 392 bytes in * seconds (*/sec) (glob) |
|
40 | transferred 392 bytes in * seconds (*/sec) (glob) | |
68 | updating to branch default |
|
41 | updating to branch default | |
69 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
70 | $ cd local-stream |
|
43 | $ cd local-stream | |
71 | $ hg verify |
|
44 | $ hg verify | |
72 | checking changesets |
|
45 | checking changesets | |
73 | checking manifests |
|
46 | checking manifests | |
74 | crosschecking files in changesets and manifests |
|
47 | crosschecking files in changesets and manifests | |
75 | checking files |
|
48 | checking files | |
76 | 2 files, 1 changesets, 2 total revisions |
|
49 | 2 files, 1 changesets, 2 total revisions | |
77 | $ cd .. |
|
50 | $ cd .. | |
78 |
|
51 | |||
79 | clone remote via pull |
|
52 | clone remote via pull | |
80 |
|
53 | |||
81 |
$ hg clone -e "python |
|
54 | $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote local | |
82 | requesting all changes |
|
55 | requesting all changes | |
83 | adding changesets |
|
56 | adding changesets | |
84 | adding manifests |
|
57 | adding manifests | |
85 | adding file changes |
|
58 | adding file changes | |
86 | added 1 changesets with 2 changes to 2 files |
|
59 | added 1 changesets with 2 changes to 2 files | |
87 | updating to branch default |
|
60 | updating to branch default | |
88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
89 |
|
62 | |||
90 | verify |
|
63 | verify | |
91 |
|
64 | |||
92 | $ cd local |
|
65 | $ cd local | |
93 | $ hg verify |
|
66 | $ hg verify | |
94 | checking changesets |
|
67 | checking changesets | |
95 | checking manifests |
|
68 | checking manifests | |
96 | crosschecking files in changesets and manifests |
|
69 | crosschecking files in changesets and manifests | |
97 | checking files |
|
70 | checking files | |
98 | 2 files, 1 changesets, 2 total revisions |
|
71 | 2 files, 1 changesets, 2 total revisions | |
99 | $ echo '[hooks]' >> .hg/hgrc |
|
72 | $ echo '[hooks]' >> .hg/hgrc | |
100 | $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc |
|
73 | $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc | |
101 |
|
74 | |||
102 | empty default pull |
|
75 | empty default pull | |
103 |
|
76 | |||
104 | $ hg paths |
|
77 | $ hg paths | |
105 | default = ssh://user@dummy/remote |
|
78 | default = ssh://user@dummy/remote | |
106 |
$ hg pull -e "python |
|
79 | $ hg pull -e "python $TESTDIR/dummyssh" | |
107 | pulling from ssh://user@dummy/remote |
|
80 | pulling from ssh://user@dummy/remote | |
108 | searching for changes |
|
81 | searching for changes | |
109 | no changes found |
|
82 | no changes found | |
110 |
|
83 | |||
111 | local change |
|
84 | local change | |
112 |
|
85 | |||
113 | $ echo bleah > foo |
|
86 | $ echo bleah > foo | |
114 | $ hg ci -m "add" |
|
87 | $ hg ci -m "add" | |
115 |
|
88 | |||
116 | updating rc |
|
89 | updating rc | |
117 |
|
90 | |||
118 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc |
|
91 | $ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc | |
119 | $ echo "[ui]" >> .hg/hgrc |
|
92 | $ echo "[ui]" >> .hg/hgrc | |
120 |
$ echo "ssh = python |
|
93 | $ echo "ssh = python $TESTDIR/dummyssh" >> .hg/hgrc | |
121 |
|
94 | |||
122 | find outgoing |
|
95 | find outgoing | |
123 |
|
96 | |||
124 | $ hg out ssh://user@dummy/remote |
|
97 | $ hg out ssh://user@dummy/remote | |
125 | comparing with ssh://user@dummy/remote |
|
98 | comparing with ssh://user@dummy/remote | |
126 | searching for changes |
|
99 | searching for changes | |
127 | changeset: 1:a28a9d1a809c |
|
100 | changeset: 1:a28a9d1a809c | |
128 | tag: tip |
|
101 | tag: tip | |
129 | user: test |
|
102 | user: test | |
130 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
103 | date: Thu Jan 01 00:00:00 1970 +0000 | |
131 | summary: add |
|
104 | summary: add | |
132 |
|
105 | |||
133 |
|
106 | |||
134 | find incoming on the remote side |
|
107 | find incoming on the remote side | |
135 |
|
108 | |||
136 |
$ hg incoming -R ../remote -e "python |
|
109 | $ hg incoming -R ../remote -e "python $TESTDIR/dummyssh" ssh://user@dummy/local | |
137 | comparing with ssh://user@dummy/local |
|
110 | comparing with ssh://user@dummy/local | |
138 | searching for changes |
|
111 | searching for changes | |
139 | changeset: 1:a28a9d1a809c |
|
112 | changeset: 1:a28a9d1a809c | |
140 | tag: tip |
|
113 | tag: tip | |
141 | user: test |
|
114 | user: test | |
142 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
115 | date: Thu Jan 01 00:00:00 1970 +0000 | |
143 | summary: add |
|
116 | summary: add | |
144 |
|
117 | |||
145 |
|
118 | |||
146 | find incoming on the remote side (using absolute path) |
|
119 | find incoming on the remote side (using absolute path) | |
147 |
|
120 | |||
148 |
$ hg incoming -R ../remote -e "python |
|
121 | $ hg incoming -R ../remote -e "python $TESTDIR/dummyssh" "ssh://user@dummy/`pwd`" | |
149 | comparing with ssh://user@dummy/$TESTTMP/local |
|
122 | comparing with ssh://user@dummy/$TESTTMP/local | |
150 | searching for changes |
|
123 | searching for changes | |
151 | changeset: 1:a28a9d1a809c |
|
124 | changeset: 1:a28a9d1a809c | |
152 | tag: tip |
|
125 | tag: tip | |
153 | user: test |
|
126 | user: test | |
154 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
127 | date: Thu Jan 01 00:00:00 1970 +0000 | |
155 | summary: add |
|
128 | summary: add | |
156 |
|
129 | |||
157 |
|
130 | |||
158 | push |
|
131 | push | |
159 |
|
132 | |||
160 | $ hg push |
|
133 | $ hg push | |
161 | pushing to ssh://user@dummy/remote |
|
134 | pushing to ssh://user@dummy/remote | |
162 | searching for changes |
|
135 | searching for changes | |
163 | remote: adding changesets |
|
136 | remote: adding changesets | |
164 | remote: adding manifests |
|
137 | remote: adding manifests | |
165 | remote: adding file changes |
|
138 | remote: adding file changes | |
166 | remote: added 1 changesets with 1 changes to 1 files |
|
139 | remote: added 1 changesets with 1 changes to 1 files | |
167 | $ cd ../remote |
|
140 | $ cd ../remote | |
168 |
|
141 | |||
169 | check remote tip |
|
142 | check remote tip | |
170 |
|
143 | |||
171 | $ hg tip |
|
144 | $ hg tip | |
172 | changeset: 1:a28a9d1a809c |
|
145 | changeset: 1:a28a9d1a809c | |
173 | tag: tip |
|
146 | tag: tip | |
174 | user: test |
|
147 | user: test | |
175 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
148 | date: Thu Jan 01 00:00:00 1970 +0000 | |
176 | summary: add |
|
149 | summary: add | |
177 |
|
150 | |||
178 | $ hg verify |
|
151 | $ hg verify | |
179 | checking changesets |
|
152 | checking changesets | |
180 | checking manifests |
|
153 | checking manifests | |
181 | crosschecking files in changesets and manifests |
|
154 | crosschecking files in changesets and manifests | |
182 | checking files |
|
155 | checking files | |
183 | 2 files, 2 changesets, 3 total revisions |
|
156 | 2 files, 2 changesets, 3 total revisions | |
184 | $ hg cat -r tip foo |
|
157 | $ hg cat -r tip foo | |
185 | bleah |
|
158 | bleah | |
186 | $ echo z > z |
|
159 | $ echo z > z | |
187 | $ hg ci -A -m z z |
|
160 | $ hg ci -A -m z z | |
188 | created new head |
|
161 | created new head | |
189 |
|
162 | |||
190 | test pushkeys and bookmarks |
|
163 | test pushkeys and bookmarks | |
191 |
|
164 | |||
192 | $ cd ../local |
|
165 | $ cd ../local | |
193 |
$ hg debugpushkey --config ui.ssh="python |
|
166 | $ hg debugpushkey --config ui.ssh="python $TESTDIR/dummyssh" ssh://user@dummy/remote namespaces | |
194 | bookmarks |
|
167 | bookmarks | |
195 | namespaces |
|
168 | namespaces | |
196 | $ hg book foo -r 0 |
|
169 | $ hg book foo -r 0 | |
197 | $ hg out -B |
|
170 | $ hg out -B | |
198 | comparing with ssh://user@dummy/remote |
|
171 | comparing with ssh://user@dummy/remote | |
199 | searching for changed bookmarks |
|
172 | searching for changed bookmarks | |
200 | foo 1160648e36ce |
|
173 | foo 1160648e36ce | |
201 | $ hg push -B foo |
|
174 | $ hg push -B foo | |
202 | pushing to ssh://user@dummy/remote |
|
175 | pushing to ssh://user@dummy/remote | |
203 | searching for changes |
|
176 | searching for changes | |
204 | no changes found |
|
177 | no changes found | |
205 | exporting bookmark foo |
|
178 | exporting bookmark foo | |
206 |
$ hg debugpushkey --config ui.ssh="python |
|
179 | $ hg debugpushkey --config ui.ssh="python $TESTDIR/dummyssh" ssh://user@dummy/remote bookmarks | |
207 | foo 1160648e36cec0054048a7edc4110c6f84fde594 |
|
180 | foo 1160648e36cec0054048a7edc4110c6f84fde594 | |
208 | $ hg book -f foo |
|
181 | $ hg book -f foo | |
209 | $ hg push --traceback |
|
182 | $ hg push --traceback | |
210 | pushing to ssh://user@dummy/remote |
|
183 | pushing to ssh://user@dummy/remote | |
211 | searching for changes |
|
184 | searching for changes | |
212 | no changes found |
|
185 | no changes found | |
213 | updating bookmark foo |
|
186 | updating bookmark foo | |
214 | $ hg book -d foo |
|
187 | $ hg book -d foo | |
215 | $ hg in -B |
|
188 | $ hg in -B | |
216 | comparing with ssh://user@dummy/remote |
|
189 | comparing with ssh://user@dummy/remote | |
217 | searching for changed bookmarks |
|
190 | searching for changed bookmarks | |
218 | foo a28a9d1a809c |
|
191 | foo a28a9d1a809c | |
219 | $ hg book -f -r 0 foo |
|
192 | $ hg book -f -r 0 foo | |
220 | $ hg pull -B foo |
|
193 | $ hg pull -B foo | |
221 | pulling from ssh://user@dummy/remote |
|
194 | pulling from ssh://user@dummy/remote | |
222 | no changes found |
|
195 | no changes found | |
223 | updating bookmark foo |
|
196 | updating bookmark foo | |
224 | importing bookmark foo |
|
197 | importing bookmark foo | |
225 | $ hg book -d foo |
|
198 | $ hg book -d foo | |
226 | $ hg push -B foo |
|
199 | $ hg push -B foo | |
227 | pushing to ssh://user@dummy/remote |
|
200 | pushing to ssh://user@dummy/remote | |
228 | searching for changes |
|
201 | searching for changes | |
229 | no changes found |
|
202 | no changes found | |
230 | deleting remote bookmark foo |
|
203 | deleting remote bookmark foo | |
231 |
|
204 | |||
232 | a bad, evil hook that prints to stdout |
|
205 | a bad, evil hook that prints to stdout | |
233 |
|
206 | |||
|
207 | $ cat <<EOF > $TESTTMP/badhook | |||
|
208 | > import sys | |||
|
209 | > sys.stdout.write("KABOOM\n") | |||
|
210 | > EOF | |||
|
211 | ||||
234 | $ echo '[hooks]' >> ../remote/.hg/hgrc |
|
212 | $ echo '[hooks]' >> ../remote/.hg/hgrc | |
235 |
$ echo |
|
213 | $ echo "changegroup.stdout = python $TESTTMP/badhook" >> ../remote/.hg/hgrc | |
236 | $ echo r > r |
|
214 | $ echo r > r | |
237 | $ hg ci -A -m z r |
|
215 | $ hg ci -A -m z r | |
238 |
|
216 | |||
239 | push should succeed even though it has an unexpected response |
|
217 | push should succeed even though it has an unexpected response | |
240 |
|
218 | |||
241 | $ hg push |
|
219 | $ hg push | |
242 | pushing to ssh://user@dummy/remote |
|
220 | pushing to ssh://user@dummy/remote | |
243 | searching for changes |
|
221 | searching for changes | |
244 | note: unsynced remote changes! |
|
222 | note: unsynced remote changes! | |
245 | remote: adding changesets |
|
223 | remote: adding changesets | |
246 | remote: adding manifests |
|
224 | remote: adding manifests | |
247 | remote: adding file changes |
|
225 | remote: adding file changes | |
248 | remote: added 1 changesets with 1 changes to 1 files |
|
226 | remote: added 1 changesets with 1 changes to 1 files | |
249 | remote: KABOOM |
|
227 | remote: KABOOM | |
250 | $ hg -R ../remote heads |
|
228 | $ hg -R ../remote heads | |
251 | changeset: 3:1383141674ec |
|
229 | changeset: 3:1383141674ec | |
252 | tag: tip |
|
230 | tag: tip | |
253 | parent: 1:a28a9d1a809c |
|
231 | parent: 1:a28a9d1a809c | |
254 | user: test |
|
232 | user: test | |
255 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
233 | date: Thu Jan 01 00:00:00 1970 +0000 | |
256 | summary: z |
|
234 | summary: z | |
257 |
|
235 | |||
258 | changeset: 2:6c0482d977a3 |
|
236 | changeset: 2:6c0482d977a3 | |
259 | parent: 0:1160648e36ce |
|
237 | parent: 0:1160648e36ce | |
260 | user: test |
|
238 | user: test | |
261 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
239 | date: Thu Jan 01 00:00:00 1970 +0000 | |
262 | summary: z |
|
240 | summary: z | |
263 |
|
241 | |||
264 |
|
242 | |||
265 | clone bookmarks |
|
243 | clone bookmarks | |
266 |
|
244 | |||
267 | $ hg -R ../remote bookmark test |
|
245 | $ hg -R ../remote bookmark test | |
268 | $ hg -R ../remote bookmarks |
|
246 | $ hg -R ../remote bookmarks | |
269 | * test 2:6c0482d977a3 |
|
247 | * test 2:6c0482d977a3 | |
270 |
$ hg clone -e "python |
|
248 | $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote local-bookmarks | |
271 | requesting all changes |
|
249 | requesting all changes | |
272 | adding changesets |
|
250 | adding changesets | |
273 | adding manifests |
|
251 | adding manifests | |
274 | adding file changes |
|
252 | adding file changes | |
275 | added 4 changesets with 5 changes to 4 files (+1 heads) |
|
253 | added 4 changesets with 5 changes to 4 files (+1 heads) | |
276 | updating to branch default |
|
254 | updating to branch default | |
277 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
255 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
278 | $ hg -R local-bookmarks bookmarks |
|
256 | $ hg -R local-bookmarks bookmarks | |
279 | test 2:6c0482d977a3 |
|
257 | test 2:6c0482d977a3 | |
280 |
|
258 | |||
281 | passwords in ssh urls are not supported |
|
259 | passwords in ssh urls are not supported | |
282 | (we use a glob here because different Python versions give different |
|
260 | (we use a glob here because different Python versions give different | |
283 | results here) |
|
261 | results here) | |
284 |
|
262 | |||
285 | $ hg push ssh://user:erroneouspwd@dummy/remote |
|
263 | $ hg push ssh://user:erroneouspwd@dummy/remote | |
286 | pushing to ssh://user:*@dummy/remote (glob) |
|
264 | pushing to ssh://user:*@dummy/remote (glob) | |
287 | abort: password in URL not supported! |
|
265 | abort: password in URL not supported! | |
288 | [255] |
|
266 | [255] | |
289 |
|
267 | |||
290 | $ cd .. |
|
268 | $ cd .. | |
291 | $ cat dummylog |
|
269 | $ cat dummylog | |
292 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio |
|
270 | Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio | |
293 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio |
|
271 | Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio | |
294 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
272 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
295 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
273 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
296 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
274 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
297 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
275 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
298 | Got arguments 1:user@dummy 2:hg -R local serve --stdio |
|
276 | Got arguments 1:user@dummy 2:hg -R local serve --stdio | |
299 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio |
|
277 | Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio | |
300 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
278 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
301 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
|
279 | changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 | |
302 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
280 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
303 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
281 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
304 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
282 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
305 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
283 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
306 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
284 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
307 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
285 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
308 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
286 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
309 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
287 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
310 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
288 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio | |
311 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 |
|
289 | changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1 | |
312 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
|
290 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio |
General Comments 0
You need to be logged in to leave comments.
Login now