comparison tests/test-init.t @ 37415:c2c8962a9465

simplestore: use a custom store for the simple store repo Before, we used the default store, which was based on fncache and dotencode. After attempting to port tests to work with the simple store, I realized that fncache was more trouble than it is worth. This commit implements a proper store type for the simple repo - one that isn't based off fncache. This causes a number of new test failures because of tests expecting the full fncache store filename encoding. I may extend the store format in a subsequent commit to take the filename encoding parts of fncache that we can take (basically everything except hash encoding, since that isn't reversible). But for now, let's use encoded store. As part of this, we implement proper requirements support for repos created with the simple store. This should have been done from the beginning, as a requirement is needed to lock out clients that don't understand a storage format. A new hghave feature advertising the presence of fncache in repos has been added. Most tests touching the fncache are now conditional on that feature. Other tests have added the optional repo requirement to output. Differential Revision: https://phab.mercurial-scm.org/D3095
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 04 Apr 2018 14:09:02 -0700
parents db06c4bb2158
children 57e4150fb15b
comparison
equal deleted inserted replaced
37414:2d965bfeb8f6 37415:c2c8962a9465
21 dotencode 21 dotencode
22 fncache 22 fncache
23 generaldelta 23 generaldelta
24 revlogv1 24 revlogv1
25 store 25 store
26 testonly-simplestore (reposimplestore !)
26 $ echo this > local/foo 27 $ echo this > local/foo
27 $ hg ci --cwd local -A -m "init" 28 $ hg ci --cwd local -A -m "init"
28 adding foo 29 adding foo
29 30
30 test custom revlog chunk cache sizes 31 test custom revlog chunk cache sizes
56 57
57 $ hg --config format.usestore=false init old 58 $ hg --config format.usestore=false init old
58 $ checknewrepo old 59 $ checknewrepo old
59 generaldelta 60 generaldelta
60 revlogv1 61 revlogv1
62 testonly-simplestore (reposimplestore !)
61 63
62 creating repo with format.usefncache=false 64 creating repo with format.usefncache=false
63 65
64 $ hg --config format.usefncache=false init old2 66 $ hg --config format.usefncache=false init old2
65 $ checknewrepo old2 67 $ checknewrepo old2
66 store created 68 store created
67 00changelog.i created 69 00changelog.i created
68 generaldelta 70 generaldelta
69 revlogv1 71 revlogv1
70 store 72 store
73 testonly-simplestore (reposimplestore !)
71 74
72 creating repo with format.dotencode=false 75 creating repo with format.dotencode=false
73 76
74 $ hg --config format.dotencode=false init old3 77 $ hg --config format.dotencode=false init old3
75 $ checknewrepo old3 78 $ checknewrepo old3
77 00changelog.i created 80 00changelog.i created
78 fncache 81 fncache
79 generaldelta 82 generaldelta
80 revlogv1 83 revlogv1
81 store 84 store
85 testonly-simplestore (reposimplestore !)
82 86
83 creating repo with format.dotencode=false 87 creating repo with format.dotencode=false
84 88
85 $ hg --config format.generaldelta=false --config format.usegeneraldelta=false init old4 89 $ hg --config format.generaldelta=false --config format.usegeneraldelta=false init old4
86 $ checknewrepo old4 90 $ checknewrepo old4
88 00changelog.i created 92 00changelog.i created
89 dotencode 93 dotencode
90 fncache 94 fncache
91 revlogv1 95 revlogv1
92 store 96 store
97 testonly-simplestore (reposimplestore !)
93 98
94 test failure 99 test failure
95 100
96 $ hg init local 101 $ hg init local
97 abort: repository local already exists! 102 abort: repository local already exists!
204 dotencode 209 dotencode
205 fncache 210 fncache
206 generaldelta 211 generaldelta
207 revlogv1 212 revlogv1
208 store 213 store
214 testonly-simplestore (reposimplestore !)
209 215
210 prepare test of init of url configured from paths 216 prepare test of init of url configured from paths
211 217
212 $ echo '[paths]' >> $HGRCPATH 218 $ echo '[paths]' >> $HGRCPATH
213 $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH 219 $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH
222 dotencode 228 dotencode
223 fncache 229 fncache
224 generaldelta 230 generaldelta
225 revlogv1 231 revlogv1
226 store 232 store
233 testonly-simplestore (reposimplestore !)
227 234
228 verify that clone also expand urls 235 verify that clone also expand urls
229 236
230 $ hg clone somewhere elsewhere 237 $ hg clone somewhere elsewhere
231 updating to branch default 238 updating to branch default
236 dotencode 243 dotencode
237 fncache 244 fncache
238 generaldelta 245 generaldelta
239 revlogv1 246 revlogv1
240 store 247 store
248 testonly-simplestore (reposimplestore !)
241 249
242 clone bookmarks 250 clone bookmarks
243 251
244 $ hg -R local bookmark test 252 $ hg -R local bookmark test
245 $ hg -R local bookmarks 253 $ hg -R local bookmarks