Show More
@@ -1,235 +1,260 b'' | |||
|
1 | 1 | This test tries to exercise the ssh functionality with a dummy script |
|
2 | 2 | |
|
3 | (enable general delta early) | |
|
4 | ||
|
5 | $ cat << EOF >> $HGRCPATH | |
|
6 | > [format] | |
|
7 | > usegeneraldelta=yes | |
|
8 | > EOF | |
|
9 | ||
|
3 | 10 | $ checknewrepo() |
|
4 | 11 | > { |
|
5 | 12 | > name=$1 |
|
6 | 13 | > if [ -d "$name"/.hg/store ]; then |
|
7 | 14 | > echo store created |
|
8 | 15 | > fi |
|
9 | 16 | > if [ -f "$name"/.hg/00changelog.i ]; then |
|
10 | 17 | > echo 00changelog.i created |
|
11 | 18 | > fi |
|
12 | 19 | > cat "$name"/.hg/requires |
|
13 | 20 | > } |
|
14 | 21 | |
|
15 | 22 | creating 'local' |
|
16 | 23 | |
|
17 | 24 | $ hg init local |
|
18 | 25 | $ checknewrepo local |
|
19 | 26 | store created |
|
20 | 27 | 00changelog.i created |
|
21 | 28 | dotencode |
|
22 | 29 | fncache |
|
30 | generaldelta | |
|
23 | 31 | revlogv1 |
|
24 | 32 | store |
|
25 | 33 | $ echo this > local/foo |
|
26 | 34 | $ hg ci --cwd local -A -m "init" |
|
27 | 35 | adding foo |
|
28 | 36 | |
|
29 | 37 | test custom revlog chunk cache sizes |
|
30 | 38 | |
|
31 | 39 | $ hg --config format.chunkcachesize=0 log -R local -pv |
|
32 | 40 | abort: revlog chunk cache size 0 is not greater than 0! |
|
33 | 41 | [255] |
|
34 | 42 | $ hg --config format.chunkcachesize=1023 log -R local -pv |
|
35 | 43 | abort: revlog chunk cache size 1023 is not a power of 2! |
|
36 | 44 | [255] |
|
37 | 45 | $ hg --config format.chunkcachesize=1024 log -R local -pv |
|
38 | 46 | changeset: 0:08b9e9f63b32 |
|
39 | 47 | tag: tip |
|
40 | 48 | user: test |
|
41 | 49 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
42 | 50 | files: foo |
|
43 | 51 | description: |
|
44 | 52 | init |
|
45 | 53 | |
|
46 | 54 | |
|
47 | 55 | diff -r 000000000000 -r 08b9e9f63b32 foo |
|
48 | 56 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
49 | 57 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
50 | 58 | @@ -0,0 +1,1 @@ |
|
51 | 59 | +this |
|
52 | 60 | |
|
53 | 61 | |
|
54 | 62 | creating repo with format.usestore=false |
|
55 | 63 | |
|
56 | 64 | $ hg --config format.usestore=false init old |
|
57 | 65 | $ checknewrepo old |
|
66 | generaldelta | |
|
58 | 67 | revlogv1 |
|
59 | 68 | |
|
60 | 69 | creating repo with format.usefncache=false |
|
61 | 70 | |
|
62 | 71 | $ hg --config format.usefncache=false init old2 |
|
63 | 72 | $ checknewrepo old2 |
|
64 | 73 | store created |
|
65 | 74 | 00changelog.i created |
|
75 | generaldelta | |
|
66 | 76 | revlogv1 |
|
67 | 77 | store |
|
68 | 78 | |
|
69 | 79 | creating repo with format.dotencode=false |
|
70 | 80 | |
|
71 | 81 | $ hg --config format.dotencode=false init old3 |
|
72 | 82 | $ checknewrepo old3 |
|
73 | 83 | store created |
|
74 | 84 | 00changelog.i created |
|
75 | 85 | fncache |
|
86 | generaldelta | |
|
87 | revlogv1 | |
|
88 | store | |
|
89 | ||
|
90 | creating repo with format.dotencode=false | |
|
91 | ||
|
92 | $ hg --config format.generaldelta=false --config format.usegeneraldelta=false init old4 | |
|
93 | $ checknewrepo old4 | |
|
94 | store created | |
|
95 | 00changelog.i created | |
|
96 | dotencode | |
|
97 | fncache | |
|
76 | 98 | revlogv1 |
|
77 | 99 | store |
|
78 | 100 | |
|
79 | 101 | test failure |
|
80 | 102 | |
|
81 | 103 | $ hg init local |
|
82 | 104 | abort: repository local already exists! |
|
83 | 105 | [255] |
|
84 | 106 | |
|
85 | 107 | init+push to remote2 |
|
86 | 108 | |
|
87 | 109 | $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2 |
|
88 | 110 | $ hg incoming -R remote2 local |
|
89 | 111 | comparing with local |
|
90 | 112 | changeset: 0:08b9e9f63b32 |
|
91 | 113 | tag: tip |
|
92 | 114 | user: test |
|
93 | 115 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
94 | 116 | summary: init |
|
95 | 117 | |
|
96 | 118 | |
|
97 | 119 | $ hg push -R local -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2 |
|
98 | 120 | pushing to ssh://user@dummy/remote2 |
|
99 | 121 | searching for changes |
|
100 | 122 | remote: adding changesets |
|
101 | 123 | remote: adding manifests |
|
102 | 124 | remote: adding file changes |
|
103 | 125 | remote: added 1 changesets with 1 changes to 1 files |
|
104 | 126 | |
|
105 | 127 | clone to remote1 |
|
106 | 128 | |
|
107 | 129 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1 |
|
108 | 130 | searching for changes |
|
109 | 131 | remote: adding changesets |
|
110 | 132 | remote: adding manifests |
|
111 | 133 | remote: adding file changes |
|
112 | 134 | remote: added 1 changesets with 1 changes to 1 files |
|
113 | 135 | |
|
114 | 136 | The largefiles extension doesn't crash |
|
115 | 137 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remotelf --config extensions.largefiles= |
|
116 | 138 | searching for changes |
|
117 | 139 | remote: adding changesets |
|
118 | 140 | remote: adding manifests |
|
119 | 141 | remote: adding file changes |
|
120 | 142 | remote: added 1 changesets with 1 changes to 1 files |
|
121 | 143 | |
|
122 | 144 | init to existing repo |
|
123 | 145 | |
|
124 | 146 | $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1 |
|
125 | 147 | abort: repository remote1 already exists! |
|
126 | 148 | abort: could not create remote repo! |
|
127 | 149 | [255] |
|
128 | 150 | |
|
129 | 151 | clone to existing repo |
|
130 | 152 | |
|
131 | 153 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1 |
|
132 | 154 | abort: repository remote1 already exists! |
|
133 | 155 | abort: could not create remote repo! |
|
134 | 156 | [255] |
|
135 | 157 | |
|
136 | 158 | output of dummyssh |
|
137 | 159 | |
|
138 | 160 | $ cat dummylog |
|
139 | 161 | Got arguments 1:user@dummy 2:hg init remote2 |
|
140 | 162 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
141 | 163 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
142 | 164 | Got arguments 1:user@dummy 2:hg init remote1 |
|
143 | 165 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
144 | 166 | Got arguments 1:user@dummy 2:hg init remotelf |
|
145 | 167 | Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio |
|
146 | 168 | Got arguments 1:user@dummy 2:hg init remote1 |
|
147 | 169 | Got arguments 1:user@dummy 2:hg init remote1 |
|
148 | 170 | |
|
149 | 171 | comparing repositories |
|
150 | 172 | |
|
151 | 173 | $ hg tip -q -R local |
|
152 | 174 | 0:08b9e9f63b32 |
|
153 | 175 | $ hg tip -q -R remote1 |
|
154 | 176 | 0:08b9e9f63b32 |
|
155 | 177 | $ hg tip -q -R remote2 |
|
156 | 178 | 0:08b9e9f63b32 |
|
157 | 179 | |
|
158 | 180 | check names for repositories (clashes with URL schemes, special chars) |
|
159 | 181 | |
|
160 | 182 | $ for i in bundle file hg http https old-http ssh static-http "with space"; do |
|
161 | 183 | > printf "hg init \"$i\"... " |
|
162 | 184 | > hg init "$i" |
|
163 | 185 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" |
|
164 | 186 | > done |
|
165 | 187 | hg init "bundle"... ok |
|
166 | 188 | hg init "file"... ok |
|
167 | 189 | hg init "hg"... ok |
|
168 | 190 | hg init "http"... ok |
|
169 | 191 | hg init "https"... ok |
|
170 | 192 | hg init "old-http"... ok |
|
171 | 193 | hg init "ssh"... ok |
|
172 | 194 | hg init "static-http"... ok |
|
173 | 195 | hg init "with space"... ok |
|
174 | 196 | #if eol-in-paths |
|
175 | 197 | /* " " is not a valid name for a directory on Windows */ |
|
176 | 198 | $ hg init " " |
|
177 | 199 | $ test -d " " |
|
178 | 200 | $ test -d " /.hg" |
|
179 | 201 | #endif |
|
180 | 202 | |
|
181 | 203 | creating 'local/sub/repo' |
|
182 | 204 | |
|
183 | 205 | $ hg init local/sub/repo |
|
184 | 206 | $ checknewrepo local/sub/repo |
|
185 | 207 | store created |
|
186 | 208 | 00changelog.i created |
|
187 | 209 | dotencode |
|
188 | 210 | fncache |
|
211 | generaldelta | |
|
189 | 212 | revlogv1 |
|
190 | 213 | store |
|
191 | 214 | |
|
192 | 215 | prepare test of init of url configured from paths |
|
193 | 216 | |
|
194 | 217 | $ echo '[paths]' >> $HGRCPATH |
|
195 | 218 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH |
|
196 | 219 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH |
|
197 | 220 | |
|
198 | 221 | init should (for consistency with clone) expand the url |
|
199 | 222 | |
|
200 | 223 | $ hg init somewhere |
|
201 | 224 | $ checknewrepo "url from paths" |
|
202 | 225 | store created |
|
203 | 226 | 00changelog.i created |
|
204 | 227 | dotencode |
|
205 | 228 | fncache |
|
229 | generaldelta | |
|
206 | 230 | revlogv1 |
|
207 | 231 | store |
|
208 | 232 | |
|
209 | 233 | verify that clone also expand urls |
|
210 | 234 | |
|
211 | 235 | $ hg clone somewhere elsewhere |
|
212 | 236 | updating to branch default |
|
213 | 237 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
214 | 238 | $ checknewrepo "another paths url" |
|
215 | 239 | store created |
|
216 | 240 | 00changelog.i created |
|
217 | 241 | dotencode |
|
218 | 242 | fncache |
|
243 | generaldelta | |
|
219 | 244 | revlogv1 |
|
220 | 245 | store |
|
221 | 246 | |
|
222 | 247 | clone bookmarks |
|
223 | 248 | |
|
224 | 249 | $ hg -R local bookmark test |
|
225 | 250 | $ hg -R local bookmarks |
|
226 | 251 | * test 0:08b9e9f63b32 |
|
227 | 252 | $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks |
|
228 | 253 | searching for changes |
|
229 | 254 | remote: adding changesets |
|
230 | 255 | remote: adding manifests |
|
231 | 256 | remote: adding file changes |
|
232 | 257 | remote: added 1 changesets with 1 changes to 1 files |
|
233 | 258 | exporting bookmark test |
|
234 | 259 | $ hg -R remote-bookmarks bookmarks |
|
235 | 260 | test 0:08b9e9f63b32 |
General Comments 0
You need to be logged in to leave comments.
Login now