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