Show More
@@ -1,316 +1,316 b'' | |||
|
1 | 1 | This test tries to exercise the ssh functionality with a dummy script |
|
2 | 2 | |
|
3 | 3 | $ checknewrepo() |
|
4 | 4 | > { |
|
5 | 5 | > name=$1 |
|
6 | 6 | > if [ -d "$name"/.hg/store ]; then |
|
7 | 7 | > echo store created |
|
8 | 8 | > fi |
|
9 | 9 | > if [ -f "$name"/.hg/00changelog.i ]; then |
|
10 | 10 | > echo 00changelog.i created |
|
11 | 11 | > fi |
|
12 | > cat "$name"/.hg/requires | |
|
12 | > hg debugrequires -R "$name" | |
|
13 | 13 | > } |
|
14 | 14 | |
|
15 | 15 | creating 'local' |
|
16 | 16 | |
|
17 | 17 | $ hg init local |
|
18 | 18 | $ checknewrepo local |
|
19 | 19 | store created |
|
20 | 20 | 00changelog.i created |
|
21 | 21 | dotencode |
|
22 | 22 | dirstate-v2 (dirstate-v2 !) |
|
23 | 23 | fncache |
|
24 | 24 | generaldelta |
|
25 | 25 | persistent-nodemap (rust !) |
|
26 | 26 | revlog-compression-zstd (zstd !) |
|
27 | 27 | revlogv1 |
|
28 | 28 | sparserevlog |
|
29 | 29 | store |
|
30 | 30 | testonly-simplestore (reposimplestore !) |
|
31 | 31 | $ echo this > local/foo |
|
32 | 32 | $ hg ci --cwd local -A -m "init" |
|
33 | 33 | adding foo |
|
34 | 34 | |
|
35 | 35 | test custom revlog chunk cache sizes |
|
36 | 36 | |
|
37 | 37 | $ hg --config format.chunkcachesize=0 log -R local -pv |
|
38 | 38 | abort: revlog chunk cache size 0 is not greater than 0 |
|
39 | 39 | [50] |
|
40 | 40 | $ hg --config format.chunkcachesize=1023 log -R local -pv |
|
41 | 41 | abort: revlog chunk cache size 1023 is not a power of 2 |
|
42 | 42 | [50] |
|
43 | 43 | $ hg --config format.chunkcachesize=1024 log -R local -pv |
|
44 | 44 | changeset: 0:08b9e9f63b32 |
|
45 | 45 | tag: tip |
|
46 | 46 | user: test |
|
47 | 47 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
48 | 48 | files: foo |
|
49 | 49 | description: |
|
50 | 50 | init |
|
51 | 51 | |
|
52 | 52 | |
|
53 | 53 | diff -r 000000000000 -r 08b9e9f63b32 foo |
|
54 | 54 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
55 | 55 | +++ b/foo Thu Jan 01 00:00:00 1970 +0000 |
|
56 | 56 | @@ -0,0 +1,1 @@ |
|
57 | 57 | +this |
|
58 | 58 | |
|
59 | 59 | |
|
60 | 60 | creating repo with format.usestore=false |
|
61 | 61 | |
|
62 | 62 | $ hg --config format.usestore=false init old |
|
63 | 63 | $ checknewrepo old |
|
64 | 64 | dirstate-v2 (dirstate-v2 !) |
|
65 | 65 | generaldelta |
|
66 | 66 | persistent-nodemap (rust !) |
|
67 | 67 | revlog-compression-zstd (zstd !) |
|
68 | 68 | revlogv1 |
|
69 | 69 | testonly-simplestore (reposimplestore !) |
|
70 | 70 | sparserevlog |
|
71 | 71 | |
|
72 | 72 | creating repo with format.usefncache=false |
|
73 | 73 | |
|
74 | 74 | $ hg --config format.usefncache=false init old2 |
|
75 | 75 | $ checknewrepo old2 |
|
76 | 76 | store created |
|
77 | 77 | 00changelog.i created |
|
78 | 78 | dirstate-v2 (dirstate-v2 !) |
|
79 | 79 | generaldelta |
|
80 | 80 | persistent-nodemap (rust !) |
|
81 | 81 | revlog-compression-zstd (zstd !) |
|
82 | 82 | revlogv1 |
|
83 | 83 | sparserevlog |
|
84 | 84 | store |
|
85 | 85 | testonly-simplestore (reposimplestore !) |
|
86 | 86 | |
|
87 | 87 | creating repo with format.dotencode=false |
|
88 | 88 | |
|
89 | 89 | $ hg --config format.dotencode=false init old3 |
|
90 | 90 | $ checknewrepo old3 |
|
91 | 91 | store created |
|
92 | 92 | 00changelog.i created |
|
93 | 93 | dirstate-v2 (dirstate-v2 !) |
|
94 | 94 | fncache |
|
95 | 95 | generaldelta |
|
96 | 96 | persistent-nodemap (rust !) |
|
97 | 97 | revlog-compression-zstd (zstd !) |
|
98 | 98 | revlogv1 |
|
99 | 99 | sparserevlog |
|
100 | 100 | store |
|
101 | 101 | testonly-simplestore (reposimplestore !) |
|
102 | 102 | |
|
103 | 103 | creating repo with format.dotencode=false |
|
104 | 104 | |
|
105 | 105 | $ hg --config format.generaldelta=false --config format.usegeneraldelta=false --config format.sparse-revlog=no init old4 |
|
106 | 106 | $ checknewrepo old4 |
|
107 | 107 | store created |
|
108 | 108 | 00changelog.i created |
|
109 | 109 | dotencode |
|
110 | 110 | dirstate-v2 (dirstate-v2 !) |
|
111 | 111 | fncache |
|
112 | 112 | persistent-nodemap (rust !) |
|
113 | 113 | revlog-compression-zstd (zstd !) |
|
114 | 114 | revlogv1 |
|
115 | 115 | store |
|
116 | 116 | testonly-simplestore (reposimplestore !) |
|
117 | 117 | |
|
118 | 118 | test failure |
|
119 | 119 | |
|
120 | 120 | $ hg init local |
|
121 | 121 | abort: repository local already exists |
|
122 | 122 | [255] |
|
123 | 123 | |
|
124 | 124 | init+push to remote2 |
|
125 | 125 | |
|
126 | 126 | $ hg init ssh://user@dummy/remote2 |
|
127 | 127 | $ hg incoming -R remote2 local |
|
128 | 128 | comparing with local |
|
129 | 129 | changeset: 0:08b9e9f63b32 |
|
130 | 130 | tag: tip |
|
131 | 131 | user: test |
|
132 | 132 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
133 | 133 | summary: init |
|
134 | 134 | |
|
135 | 135 | |
|
136 | 136 | $ hg push -R local ssh://user@dummy/remote2 |
|
137 | 137 | pushing to ssh://user@dummy/remote2 |
|
138 | 138 | searching for changes |
|
139 | 139 | remote: adding changesets |
|
140 | 140 | remote: adding manifests |
|
141 | 141 | remote: adding file changes |
|
142 | 142 | remote: added 1 changesets with 1 changes to 1 files |
|
143 | 143 | |
|
144 | 144 | clone to remote1 |
|
145 | 145 | |
|
146 | 146 | $ hg clone local ssh://user@dummy/remote1 |
|
147 | 147 | searching for changes |
|
148 | 148 | remote: adding changesets |
|
149 | 149 | remote: adding manifests |
|
150 | 150 | remote: adding file changes |
|
151 | 151 | remote: added 1 changesets with 1 changes to 1 files |
|
152 | 152 | |
|
153 | 153 | The largefiles extension doesn't crash |
|
154 | 154 | $ hg clone local ssh://user@dummy/remotelf --config extensions.largefiles= |
|
155 | 155 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
156 | 156 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
157 | 157 | searching for changes |
|
158 | 158 | remote: adding changesets |
|
159 | 159 | remote: adding manifests |
|
160 | 160 | remote: adding file changes |
|
161 | 161 | remote: added 1 changesets with 1 changes to 1 files |
|
162 | 162 | |
|
163 | 163 | init to existing repo |
|
164 | 164 | |
|
165 | 165 | $ hg init ssh://user@dummy/remote1 |
|
166 | 166 | abort: repository remote1 already exists |
|
167 | 167 | abort: could not create remote repo |
|
168 | 168 | [255] |
|
169 | 169 | |
|
170 | 170 | clone to existing repo |
|
171 | 171 | |
|
172 | 172 | $ hg clone local ssh://user@dummy/remote1 |
|
173 | 173 | abort: repository remote1 already exists |
|
174 | 174 | abort: could not create remote repo |
|
175 | 175 | [255] |
|
176 | 176 | |
|
177 | 177 | output of dummyssh |
|
178 | 178 | |
|
179 | 179 | $ cat dummylog |
|
180 | 180 | Got arguments 1:user@dummy 2:hg init remote2 |
|
181 | 181 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
182 | 182 | Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio |
|
183 | 183 | Got arguments 1:user@dummy 2:hg init remote1 |
|
184 | 184 | Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio |
|
185 | 185 | Got arguments 1:user@dummy 2:hg init remotelf |
|
186 | 186 | Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio |
|
187 | 187 | Got arguments 1:user@dummy 2:hg init remote1 |
|
188 | 188 | Got arguments 1:user@dummy 2:hg init remote1 |
|
189 | 189 | |
|
190 | 190 | comparing repositories |
|
191 | 191 | |
|
192 | 192 | $ hg tip -q -R local |
|
193 | 193 | 0:08b9e9f63b32 |
|
194 | 194 | $ hg tip -q -R remote1 |
|
195 | 195 | 0:08b9e9f63b32 |
|
196 | 196 | $ hg tip -q -R remote2 |
|
197 | 197 | 0:08b9e9f63b32 |
|
198 | 198 | |
|
199 | 199 | check names for repositories (clashes with URL schemes, special chars) |
|
200 | 200 | |
|
201 | 201 | $ for i in bundle file hg http https old-http ssh static-http "with space"; do |
|
202 | 202 | > printf "hg init \"$i\"... " |
|
203 | 203 | > hg init "$i" |
|
204 | 204 | > test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed" |
|
205 | 205 | > done |
|
206 | 206 | hg init "bundle"... ok |
|
207 | 207 | hg init "file"... ok |
|
208 | 208 | hg init "hg"... ok |
|
209 | 209 | hg init "http"... ok |
|
210 | 210 | hg init "https"... ok |
|
211 | 211 | hg init "old-http"... ok |
|
212 | 212 | hg init "ssh"... ok |
|
213 | 213 | hg init "static-http"... ok |
|
214 | 214 | hg init "with space"... ok |
|
215 | 215 | #if eol-in-paths |
|
216 | 216 | /* " " is not a valid name for a directory on Windows */ |
|
217 | 217 | $ hg init " " |
|
218 | 218 | $ test -d " " |
|
219 | 219 | $ test -d " /.hg" |
|
220 | 220 | #endif |
|
221 | 221 | |
|
222 | 222 | creating 'local/sub/repo' |
|
223 | 223 | |
|
224 | 224 | $ hg init local/sub/repo |
|
225 | 225 | $ checknewrepo local/sub/repo |
|
226 | 226 | store created |
|
227 | 227 | 00changelog.i created |
|
228 | 228 | dotencode |
|
229 | 229 | dirstate-v2 (dirstate-v2 !) |
|
230 | 230 | fncache |
|
231 | 231 | generaldelta |
|
232 | 232 | persistent-nodemap (rust !) |
|
233 | 233 | revlog-compression-zstd (zstd !) |
|
234 | 234 | revlogv1 |
|
235 | 235 | sparserevlog |
|
236 | 236 | store |
|
237 | 237 | testonly-simplestore (reposimplestore !) |
|
238 | 238 | |
|
239 | 239 | prepare test of init of url configured from paths |
|
240 | 240 | |
|
241 | 241 | $ echo '[paths]' >> $HGRCPATH |
|
242 | 242 | $ echo "somewhere = `pwd`/url from paths" >> $HGRCPATH |
|
243 | 243 | $ echo "elsewhere = `pwd`/another paths url" >> $HGRCPATH |
|
244 | 244 | |
|
245 | 245 | init should (for consistency with clone) expand the url |
|
246 | 246 | |
|
247 | 247 | $ hg init somewhere |
|
248 | 248 | $ checknewrepo "url from paths" |
|
249 | 249 | store created |
|
250 | 250 | 00changelog.i created |
|
251 | 251 | dotencode |
|
252 | 252 | dirstate-v2 (dirstate-v2 !) |
|
253 | 253 | fncache |
|
254 | 254 | generaldelta |
|
255 | 255 | persistent-nodemap (rust !) |
|
256 | 256 | revlog-compression-zstd (zstd !) |
|
257 | 257 | revlogv1 |
|
258 | 258 | sparserevlog |
|
259 | 259 | store |
|
260 | 260 | testonly-simplestore (reposimplestore !) |
|
261 | 261 | |
|
262 | 262 | verify that clone also expand urls |
|
263 | 263 | |
|
264 | 264 | $ hg clone somewhere elsewhere |
|
265 | 265 | updating to branch default |
|
266 | 266 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
267 | 267 | $ checknewrepo "another paths url" |
|
268 | 268 | store created |
|
269 | 269 | 00changelog.i created |
|
270 | 270 | dotencode |
|
271 | 271 | dirstate-v2 (dirstate-v2 !) |
|
272 | 272 | fncache |
|
273 | 273 | generaldelta |
|
274 | 274 | persistent-nodemap (rust !) |
|
275 | 275 | revlog-compression-zstd (zstd !) |
|
276 | 276 | revlogv1 |
|
277 | 277 | sparserevlog |
|
278 | 278 | store |
|
279 | 279 | testonly-simplestore (reposimplestore !) |
|
280 | 280 | |
|
281 | 281 | clone bookmarks |
|
282 | 282 | |
|
283 | 283 | $ hg -R local bookmark test |
|
284 | 284 | $ hg -R local bookmarks |
|
285 | 285 | * test 0:08b9e9f63b32 |
|
286 | 286 | $ hg clone local ssh://user@dummy/remote-bookmarks |
|
287 | 287 | searching for changes |
|
288 | 288 | remote: adding changesets |
|
289 | 289 | remote: adding manifests |
|
290 | 290 | remote: adding file changes |
|
291 | 291 | remote: added 1 changesets with 1 changes to 1 files |
|
292 | 292 | exporting bookmark test |
|
293 | 293 | $ hg -R remote-bookmarks bookmarks |
|
294 | 294 | test 0:08b9e9f63b32 |
|
295 | 295 | |
|
296 | 296 | Check format constraint |
|
297 | 297 | ----------------------- |
|
298 | 298 | |
|
299 | 299 | $ hg init issue6056 --config format.usegeneraldelta=0 --config format.sparse-revlog=0 |
|
300 | 300 | $ cd issue6056 |
|
301 | 301 | $ echo foo > 1 |
|
302 | 302 | $ echo foo > 2 |
|
303 | 303 | $ echo foo > 3 |
|
304 | 304 | $ echo foo > 4 |
|
305 | 305 | $ echo foo > 5 |
|
306 | 306 | $ hg add * |
|
307 | 307 | |
|
308 | 308 | Build a bogus repository (sparserevlog without general delta) |
|
309 | 309 | |
|
310 | 310 | $ hg commit -m 'initial changesets' |
|
311 | 311 | $ echo 'sparserevlog' >> .hg/requires |
|
312 | 312 | $ for x in `$TESTDIR/seq.py 100`; do |
|
313 | 313 | > echo $x >> `expr $x % 5 + 1` |
|
314 | 314 | > hg commit -m $x |
|
315 | 315 | > done |
|
316 | 316 | $ cd .. |
@@ -1,411 +1,411 b'' | |||
|
1 | 1 | $ USERCACHE="$TESTTMP/cache"; export USERCACHE |
|
2 | 2 | $ mkdir "${USERCACHE}" |
|
3 | 3 | $ cat >> $HGRCPATH <<EOF |
|
4 | 4 | > [extensions] |
|
5 | 5 | > largefiles = |
|
6 | 6 | > share = |
|
7 | 7 | > strip = |
|
8 | 8 | > convert = |
|
9 | 9 | > [largefiles] |
|
10 | 10 | > minsize = 0.5 |
|
11 | 11 | > patterns = **.other |
|
12 | 12 | > **.dat |
|
13 | 13 | > usercache=${USERCACHE} |
|
14 | 14 | > EOF |
|
15 | 15 | |
|
16 | 16 | "lfconvert" works |
|
17 | 17 | $ hg init bigfile-repo |
|
18 | 18 | $ cd bigfile-repo |
|
19 | 19 | $ cat >> .hg/hgrc <<EOF |
|
20 | 20 | > [extensions] |
|
21 | 21 | > largefiles = ! |
|
22 | 22 | > EOF |
|
23 | 23 | $ mkdir sub |
|
24 | 24 | $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null |
|
25 | 25 | $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null |
|
26 | 26 | $ echo normal > normal1 |
|
27 | 27 | $ echo alsonormal > sub/normal2 |
|
28 | 28 | $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null |
|
29 | 29 | $ hg addremove |
|
30 | 30 | adding large |
|
31 | 31 | adding large2 |
|
32 | 32 | adding normal1 |
|
33 | 33 | adding sub/maybelarge.dat |
|
34 | 34 | adding sub/normal2 |
|
35 | 35 | $ hg commit -m"add large, normal1" large normal1 |
|
36 | 36 | $ hg commit -m"add sub/*" sub |
|
37 | 37 | |
|
38 | 38 | Test tag parsing |
|
39 | 39 | $ cat >> .hgtags <<EOF |
|
40 | 40 | > IncorrectlyFormattedTag! |
|
41 | 41 | > invalidhash sometag |
|
42 | 42 | > 0123456789abcdef anothertag |
|
43 | 43 | > EOF |
|
44 | 44 | $ hg add .hgtags |
|
45 | 45 | $ hg commit -m"add large2" large2 .hgtags |
|
46 | 46 | |
|
47 | 47 | Test link+rename largefile codepath |
|
48 | 48 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
49 | 49 | pass |
|
50 | 50 | $ cd .. |
|
51 | 51 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
52 | 52 | initializing destination largefiles-repo |
|
53 | 53 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
54 | 54 | skipping incorrectly formatted id invalidhash |
|
55 | 55 | no mapping for id 0123456789abcdef |
|
56 | 56 | #if symlink |
|
57 | 57 | $ hg --cwd bigfile-repo rename large2 large3 |
|
58 | 58 | $ ln -sf large bigfile-repo/large3 |
|
59 | 59 | $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3 |
|
60 | 60 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink |
|
61 | 61 | initializing destination largefiles-repo-symlink |
|
62 | 62 | skipping incorrectly formatted tag IncorrectlyFormattedTag! |
|
63 | 63 | skipping incorrectly formatted id invalidhash |
|
64 | 64 | no mapping for id 0123456789abcdef |
|
65 | 65 | abort: renamed/copied largefile large3 becomes symlink |
|
66 | 66 | [255] |
|
67 | 67 | #endif |
|
68 | 68 | $ cd bigfile-repo |
|
69 | 69 | $ hg strip --no-backup 2 |
|
70 | 70 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
71 | 71 | $ cd .. |
|
72 | 72 | $ rm -rf largefiles-repo largefiles-repo-symlink |
|
73 | 73 | |
|
74 | 74 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
75 | 75 | initializing destination largefiles-repo |
|
76 | 76 | |
|
77 | 77 | "lfconvert" converts content correctly |
|
78 | 78 | $ cd largefiles-repo |
|
79 | 79 | $ hg up |
|
80 | 80 | getting changed largefiles |
|
81 | 81 | 2 largefiles updated, 0 removed |
|
82 | 82 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 83 | $ hg locate |
|
84 | 84 | .hglf/large |
|
85 | 85 | .hglf/sub/maybelarge.dat |
|
86 | 86 | normal1 |
|
87 | 87 | sub/normal2 |
|
88 | 88 | $ cat normal1 |
|
89 | 89 | normal |
|
90 | 90 | $ cat sub/normal2 |
|
91 | 91 | alsonormal |
|
92 | 92 | $ md5sum.py large sub/maybelarge.dat |
|
93 | 93 | ec87a838931d4d5d2e94a04644788a55 large |
|
94 | 94 | 1276481102f218c981e0324180bafd9f sub/maybelarge.dat |
|
95 | 95 | |
|
96 | 96 | "lfconvert" adds 'largefiles' to .hg/requires. |
|
97 |
$ |
|
|
97 | $ hg debugrequires | |
|
98 | 98 | dotencode |
|
99 | 99 | dirstate-v2 (dirstate-v2 !) |
|
100 | 100 | fncache |
|
101 | 101 | generaldelta |
|
102 | 102 | largefiles |
|
103 | 103 | persistent-nodemap (rust !) |
|
104 | 104 | revlog-compression-zstd (zstd !) |
|
105 | 105 | revlogv1 |
|
106 | 106 | sparserevlog |
|
107 | 107 | store |
|
108 | 108 | testonly-simplestore (reposimplestore !) |
|
109 | 109 | |
|
110 | 110 | "lfconvert" includes a newline at the end of the standin files. |
|
111 | 111 | $ cat .hglf/large .hglf/sub/maybelarge.dat |
|
112 | 112 | 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 |
|
113 | 113 | 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c |
|
114 | 114 | $ cd .. |
|
115 | 115 | |
|
116 | 116 | add some changesets to rename/remove/merge |
|
117 | 117 | $ cd bigfile-repo |
|
118 | 118 | $ hg mv -q sub stuff |
|
119 | 119 | $ hg commit -m"rename sub/ to stuff/" |
|
120 | 120 | $ hg update -q 1 |
|
121 | 121 | $ echo blah >> normal3 |
|
122 | 122 | $ echo blah >> sub/normal2 |
|
123 | 123 | $ echo blah >> sub/maybelarge.dat |
|
124 | 124 | $ md5sum.py sub/maybelarge.dat |
|
125 | 125 | 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat |
|
126 | 126 | $ hg commit -A -m"add normal3, modify sub/*" |
|
127 | 127 | adding normal3 |
|
128 | 128 | created new head |
|
129 | 129 | $ hg rm large normal3 |
|
130 | 130 | $ hg commit -q -m"remove large, normal3" |
|
131 | 131 | $ hg merge |
|
132 | 132 | tool internal:merge (for pattern stuff/maybelarge.dat) can't handle binary |
|
133 | 133 | no tool found to merge stuff/maybelarge.dat |
|
134 | 134 | file 'stuff/maybelarge.dat' needs to be resolved. |
|
135 | 135 | You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved. |
|
136 | 136 | What do you want to do? u |
|
137 | 137 | merging sub/normal2 and stuff/normal2 to stuff/normal2 |
|
138 | 138 | 0 files updated, 1 files merged, 0 files removed, 1 files unresolved |
|
139 | 139 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
140 | 140 | [1] |
|
141 | 141 | $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat |
|
142 | 142 | $ hg resolve -m stuff/maybelarge.dat |
|
143 | 143 | (no more unresolved files) |
|
144 | 144 | $ hg commit -m"merge" |
|
145 | 145 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
146 | 146 | @ 5:4884f215abda merge |
|
147 | 147 | |\ |
|
148 | 148 | | o 4:7285f817b77e remove large, normal3 |
|
149 | 149 | | | |
|
150 | 150 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
151 | 151 | | | |
|
152 | 152 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
153 | 153 | |/ |
|
154 | 154 | o 1:020c65d24e11 add sub/* |
|
155 | 155 | | |
|
156 | 156 | o 0:117b8328f97a add large, normal1 |
|
157 | 157 | |
|
158 | 158 | $ cd .. |
|
159 | 159 | |
|
160 | 160 | lfconvert with rename, merge, and remove |
|
161 | 161 | $ rm -rf largefiles-repo |
|
162 | 162 | $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo |
|
163 | 163 | initializing destination largefiles-repo |
|
164 | 164 | $ cd largefiles-repo |
|
165 | 165 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
166 | 166 | o 5:9cc5aa7204f0 merge |
|
167 | 167 | |\ |
|
168 | 168 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
169 | 169 | | | |
|
170 | 170 | | o 3:55759520c76f add normal3, modify sub/* |
|
171 | 171 | | | |
|
172 | 172 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
173 | 173 | |/ |
|
174 | 174 | o 1:334e5237836d add sub/* |
|
175 | 175 | | |
|
176 | 176 | o 0:d4892ec57ce2 add large, normal1 |
|
177 | 177 | |
|
178 | 178 | $ hg locate -r 2 |
|
179 | 179 | .hglf/large |
|
180 | 180 | .hglf/stuff/maybelarge.dat |
|
181 | 181 | normal1 |
|
182 | 182 | stuff/normal2 |
|
183 | 183 | $ hg locate -r 3 |
|
184 | 184 | .hglf/large |
|
185 | 185 | .hglf/sub/maybelarge.dat |
|
186 | 186 | normal1 |
|
187 | 187 | normal3 |
|
188 | 188 | sub/normal2 |
|
189 | 189 | $ hg locate -r 4 |
|
190 | 190 | .hglf/sub/maybelarge.dat |
|
191 | 191 | normal1 |
|
192 | 192 | sub/normal2 |
|
193 | 193 | $ hg locate -r 5 |
|
194 | 194 | .hglf/stuff/maybelarge.dat |
|
195 | 195 | normal1 |
|
196 | 196 | stuff/normal2 |
|
197 | 197 | $ hg update |
|
198 | 198 | getting changed largefiles |
|
199 | 199 | 1 largefiles updated, 0 removed |
|
200 | 200 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
201 | 201 | $ cat stuff/normal2 |
|
202 | 202 | alsonormal |
|
203 | 203 | blah |
|
204 | 204 | $ md5sum.py stuff/maybelarge.dat |
|
205 | 205 | 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat |
|
206 | 206 | $ cat .hglf/stuff/maybelarge.dat |
|
207 | 207 | 76236b6a2c6102826c61af4297dd738fb3b1de38 |
|
208 | 208 | $ cd .. |
|
209 | 209 | |
|
210 | 210 | "lfconvert" error cases |
|
211 | 211 | $ hg lfconvert http://localhost/foo foo |
|
212 | 212 | abort: http://localhost/foo is not a local Mercurial repo |
|
213 | 213 | [255] |
|
214 | 214 | $ hg lfconvert foo ssh://localhost/foo |
|
215 | 215 | abort: ssh://localhost/foo is not a local Mercurial repo |
|
216 | 216 | [255] |
|
217 | 217 | $ hg lfconvert nosuchrepo foo |
|
218 | 218 | abort: repository nosuchrepo not found |
|
219 | 219 | [255] |
|
220 | 220 | $ hg share -q -U bigfile-repo shared |
|
221 | 221 | $ printf 'bogus' > shared/.hg/sharedpath |
|
222 | 222 | $ hg lfconvert shared foo |
|
223 | 223 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus |
|
224 | 224 | [255] |
|
225 | 225 | $ hg lfconvert bigfile-repo largefiles-repo |
|
226 | 226 | initializing destination largefiles-repo |
|
227 | 227 | abort: repository largefiles-repo already exists |
|
228 | 228 | [255] |
|
229 | 229 | |
|
230 | 230 | add another largefile to the new largefiles repo |
|
231 | 231 | $ cd largefiles-repo |
|
232 | 232 | $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null |
|
233 | 233 | $ hg add --lfsize=1 anotherlarge |
|
234 | 234 | $ hg commit -m "add anotherlarge (should be a largefile)" |
|
235 | 235 | $ cat .hglf/anotherlarge |
|
236 | 236 | 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
|
237 | 237 | $ hg tag mytag |
|
238 | 238 | $ cd .. |
|
239 | 239 | |
|
240 | 240 | round-trip: converting back to a normal (non-largefiles) repo with |
|
241 | 241 | "lfconvert --to-normal" should give the same as ../bigfile-repo. The |
|
242 | 242 | convert extension is disabled to show config items can be loaded without it. |
|
243 | 243 | $ cd largefiles-repo |
|
244 | 244 | $ hg --config extensions.convert=! lfconvert --to-normal . ../normal-repo |
|
245 | 245 | initializing destination ../normal-repo |
|
246 | 246 | 0 additional largefiles cached |
|
247 | 247 | scanning source... |
|
248 | 248 | sorting... |
|
249 | 249 | converting... |
|
250 | 250 | 7 add large, normal1 |
|
251 | 251 | 6 add sub/* |
|
252 | 252 | 5 rename sub/ to stuff/ |
|
253 | 253 | 4 add normal3, modify sub/* |
|
254 | 254 | 3 remove large, normal3 |
|
255 | 255 | 2 merge |
|
256 | 256 | 1 add anotherlarge (should be a largefile) |
|
257 | 257 | 0 Added tag mytag for changeset 17126745edfd |
|
258 | 258 | $ cd ../normal-repo |
|
259 | 259 | $ cat >> .hg/hgrc <<EOF |
|
260 | 260 | > [extensions] |
|
261 | 261 | > largefiles = ! |
|
262 | 262 | > EOF |
|
263 | 263 | |
|
264 | 264 | $ hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
265 | 265 | o 7:b5fedc110b9d Added tag mytag for changeset 867ab992ecf4 |
|
266 | 266 | | |
|
267 | 267 | o 6:867ab992ecf4 add anotherlarge (should be a largefile) |
|
268 | 268 | | |
|
269 | 269 | o 5:4884f215abda merge |
|
270 | 270 | |\ |
|
271 | 271 | | o 4:7285f817b77e remove large, normal3 |
|
272 | 272 | | | |
|
273 | 273 | | o 3:67e3892e3534 add normal3, modify sub/* |
|
274 | 274 | | | |
|
275 | 275 | o | 2:c96c8beb5d56 rename sub/ to stuff/ |
|
276 | 276 | |/ |
|
277 | 277 | o 1:020c65d24e11 add sub/* |
|
278 | 278 | | |
|
279 | 279 | o 0:117b8328f97a add large, normal1 |
|
280 | 280 | |
|
281 | 281 | $ hg update |
|
282 | 282 | 5 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
283 | 283 | $ hg locate |
|
284 | 284 | .hgtags |
|
285 | 285 | anotherlarge |
|
286 | 286 | normal1 |
|
287 | 287 | stuff/maybelarge.dat |
|
288 | 288 | stuff/normal2 |
|
289 | 289 | $ [ -d .hg/largefiles ] && echo fail || echo pass |
|
290 | 290 | pass |
|
291 | 291 | |
|
292 | 292 | $ cd .. |
|
293 | 293 | |
|
294 | 294 | Clearing the usercache ensures that commitctx doesn't try to cache largefiles |
|
295 | 295 | from the working dir on a convert. |
|
296 | 296 | $ rm "${USERCACHE}"/* |
|
297 | 297 | $ hg convert largefiles-repo |
|
298 | 298 | assuming destination largefiles-repo-hg |
|
299 | 299 | initializing destination largefiles-repo-hg repository |
|
300 | 300 | scanning source... |
|
301 | 301 | sorting... |
|
302 | 302 | converting... |
|
303 | 303 | 7 add large, normal1 |
|
304 | 304 | 6 add sub/* |
|
305 | 305 | 5 rename sub/ to stuff/ |
|
306 | 306 | 4 add normal3, modify sub/* |
|
307 | 307 | 3 remove large, normal3 |
|
308 | 308 | 2 merge |
|
309 | 309 | 1 add anotherlarge (should be a largefile) |
|
310 | 310 | 0 Added tag mytag for changeset 17126745edfd |
|
311 | 311 | |
|
312 | 312 | $ hg -R largefiles-repo-hg log -G --template "{rev}:{node|short} {desc|firstline}\n" |
|
313 | 313 | o 7:2f08f66459b7 Added tag mytag for changeset 17126745edfd |
|
314 | 314 | | |
|
315 | 315 | o 6:17126745edfd add anotherlarge (should be a largefile) |
|
316 | 316 | | |
|
317 | 317 | o 5:9cc5aa7204f0 merge |
|
318 | 318 | |\ |
|
319 | 319 | | o 4:a5a02de7a8e4 remove large, normal3 |
|
320 | 320 | | | |
|
321 | 321 | | o 3:55759520c76f add normal3, modify sub/* |
|
322 | 322 | | | |
|
323 | 323 | o | 2:261ad3f3f037 rename sub/ to stuff/ |
|
324 | 324 | |/ |
|
325 | 325 | o 1:334e5237836d add sub/* |
|
326 | 326 | | |
|
327 | 327 | o 0:d4892ec57ce2 add large, normal1 |
|
328 | 328 | |
|
329 | 329 | Verify will fail (for now) if the usercache is purged before converting, since |
|
330 | 330 | largefiles are not cached in the converted repo's local store by the conversion |
|
331 | 331 | process. |
|
332 | 332 | $ cd largefiles-repo-hg |
|
333 | 333 | $ cat >> .hg/hgrc <<EOF |
|
334 | 334 | > [experimental] |
|
335 | 335 | > evolution.createmarkers=True |
|
336 | 336 | > EOF |
|
337 | 337 | $ hg debugobsolete `hg log -r tip -T "{node}"` |
|
338 | 338 | 1 new obsolescence markers |
|
339 | 339 | obsoleted 1 changesets |
|
340 | 340 | $ cd .. |
|
341 | 341 | |
|
342 | 342 | $ hg -R largefiles-repo-hg verify --large --lfa |
|
343 | 343 | checking changesets |
|
344 | 344 | checking manifests |
|
345 | 345 | crosschecking files in changesets and manifests |
|
346 | 346 | checking files |
|
347 | 347 | checked 8 changesets with 13 changes to 9 files |
|
348 | 348 | searching 7 changesets for largefiles |
|
349 | 349 | changeset 0:d4892ec57ce2: large references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/2e000fa7e85759c7f4c254d4d9c33ef481e459a7 |
|
350 | 350 | changeset 1:334e5237836d: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c |
|
351 | 351 | changeset 2:261ad3f3f037: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c |
|
352 | 352 | changeset 3:55759520c76f: sub/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 |
|
353 | 353 | changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/76236b6a2c6102826c61af4297dd738fb3b1de38 |
|
354 | 354 | changeset 6:17126745edfd: anotherlarge references missing $TESTTMP/largefiles-repo-hg/.hg/largefiles/3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 |
|
355 | 355 | verified existence of 6 revisions of 4 largefiles |
|
356 | 356 | [1] |
|
357 | 357 | $ hg -R largefiles-repo-hg showconfig paths |
|
358 | 358 | [1] |
|
359 | 359 | |
|
360 | 360 | |
|
361 | 361 | Avoid a traceback if a largefile isn't available (issue3519) |
|
362 | 362 | |
|
363 | 363 | Ensure the largefile can be cached in the source if necessary |
|
364 | 364 | $ hg clone -U largefiles-repo issue3519 |
|
365 | 365 | $ rm -f "${USERCACHE}"/* |
|
366 | 366 | $ hg -R issue3519 branch -q mybranch |
|
367 | 367 | $ hg -R issue3519 ci -m 'change branch name only' |
|
368 | 368 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
369 | 369 | initializing destination normalized3519 |
|
370 | 370 | 4 additional largefiles cached |
|
371 | 371 | scanning source... |
|
372 | 372 | sorting... |
|
373 | 373 | converting... |
|
374 | 374 | 8 add large, normal1 |
|
375 | 375 | 7 add sub/* |
|
376 | 376 | 6 rename sub/ to stuff/ |
|
377 | 377 | 5 add normal3, modify sub/* |
|
378 | 378 | 4 remove large, normal3 |
|
379 | 379 | 3 merge |
|
380 | 380 | 2 add anotherlarge (should be a largefile) |
|
381 | 381 | 1 Added tag mytag for changeset 17126745edfd |
|
382 | 382 | 0 change branch name only |
|
383 | 383 | |
|
384 | 384 | Ensure empty commits aren't lost in the conversion |
|
385 | 385 | $ hg -R normalized3519 log -r tip -T '{desc}\n' |
|
386 | 386 | change branch name only |
|
387 | 387 | |
|
388 | 388 | Ensure the abort message is useful if a largefile is entirely unavailable |
|
389 | 389 | $ rm -rf normalized3519 |
|
390 | 390 | $ rm "${USERCACHE}"/* |
|
391 | 391 | $ rm issue3519/.hg/largefiles/* |
|
392 | 392 | $ rm largefiles-repo/.hg/largefiles/* |
|
393 | 393 | $ hg lfconvert --to-normal issue3519 normalized3519 |
|
394 | 394 | initializing destination normalized3519 |
|
395 | 395 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
396 | 396 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
397 | 397 | sub/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
398 | 398 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
399 | 399 | stuff/maybelarge.dat: largefile 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
400 | 400 | large: largefile 2e000fa7e85759c7f4c254d4d9c33ef481e459a7 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
401 | 401 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
402 | 402 | sub/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
403 | 403 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
404 | 404 | anotherlarge: largefile 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
405 | 405 | stuff/maybelarge.dat: largefile 76236b6a2c6102826c61af4297dd738fb3b1de38 not available from file:/*/$TESTTMP/largefiles-repo (glob) |
|
406 | 406 | 0 additional largefiles cached |
|
407 | 407 | 11 largefiles failed to download |
|
408 | 408 | abort: all largefiles must be present locally |
|
409 | 409 | [255] |
|
410 | 410 | |
|
411 | 411 |
@@ -1,360 +1,360 b'' | |||
|
1 | 1 | #require no-reposimplestore no-chg |
|
2 | 2 | |
|
3 | 3 | This tests the interaction between the largefiles and lfs extensions, and |
|
4 | 4 | conversion from largefiles -> lfs. |
|
5 | 5 | |
|
6 | 6 | $ cat >> $HGRCPATH << EOF |
|
7 | 7 | > [extensions] |
|
8 | 8 | > largefiles = |
|
9 | 9 | > |
|
10 | 10 | > [lfs] |
|
11 | 11 | > # standin files are 41 bytes. Stay bigger for clarity. |
|
12 | 12 | > threshold = 42 |
|
13 | 13 | > EOF |
|
14 | 14 | |
|
15 | 15 | Setup a repo with a normal file and a largefile, above and below the lfs |
|
16 | 16 | threshold to test lfconvert. *.txt start life as a normal file; *.bin start as |
|
17 | 17 | an lfs/largefile. |
|
18 | 18 | |
|
19 | 19 | $ hg init largefiles |
|
20 | 20 | $ cd largefiles |
|
21 | 21 | $ echo 'normal' > normal.txt |
|
22 | 22 | $ echo 'normal above lfs threshold 0000000000000000000000000' > lfs.txt |
|
23 | 23 | $ hg ci -Am 'normal.txt' |
|
24 | 24 | adding lfs.txt |
|
25 | 25 | adding normal.txt |
|
26 | 26 | $ echo 'largefile' > large.bin |
|
27 | 27 | $ echo 'largefile above lfs threshold 0000000000000000000000' > lfs.bin |
|
28 | 28 | $ hg add --large large.bin lfs.bin |
|
29 | 29 | $ hg ci -m 'add largefiles' |
|
30 | 30 | |
|
31 | 31 | $ cat >> $HGRCPATH << EOF |
|
32 | 32 | > [extensions] |
|
33 | 33 | > lfs = |
|
34 | 34 | > EOF |
|
35 | 35 | |
|
36 | 36 | Add an lfs file and normal file that collide with files on the other branch. |
|
37 | 37 | large.bin is added as a normal file, and is named as such only to clash with the |
|
38 | 38 | largefile on the other branch. |
|
39 | 39 | |
|
40 | 40 | $ hg up -q '.^' |
|
41 | 41 | $ echo 'below lfs threshold' > large.bin |
|
42 | 42 | $ echo 'lfs above the lfs threshold for length 0000000000000' > lfs.bin |
|
43 | 43 | $ hg ci -Am 'add with lfs extension' |
|
44 | 44 | adding large.bin |
|
45 | 45 | adding lfs.bin |
|
46 | 46 | created new head |
|
47 | 47 | |
|
48 | 48 | $ hg log -G |
|
49 | 49 | @ changeset: 2:e989d0fa3764 |
|
50 | 50 | | tag: tip |
|
51 | 51 | | parent: 0:29361292f54d |
|
52 | 52 | | user: test |
|
53 | 53 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
54 | 54 | | summary: add with lfs extension |
|
55 | 55 | | |
|
56 | 56 | | o changeset: 1:6513aaab9ca0 |
|
57 | 57 | |/ user: test |
|
58 | 58 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | 59 | | summary: add largefiles |
|
60 | 60 | | |
|
61 | 61 | o changeset: 0:29361292f54d |
|
62 | 62 | user: test |
|
63 | 63 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
64 | 64 | summary: normal.txt |
|
65 | 65 | |
|
66 | 66 | -------------------------------------------------------------------------------- |
|
67 | 67 | Merge largefiles into lfs branch |
|
68 | 68 | |
|
69 | 69 | The largefiles extension will prompt to use the normal or largefile when merged |
|
70 | 70 | into the lfs files. `hg manifest` will show standins if present. They aren't, |
|
71 | 71 | because largefiles merge doesn't merge content. If it did, selecting (n)ormal |
|
72 | 72 | would convert to lfs on commit, if appropriate. |
|
73 | 73 | |
|
74 | 74 | BUG: Largefiles isn't running the merge tool, like when two lfs files are |
|
75 | 75 | merged. This is probably by design, but it should probably at least prompt if |
|
76 | 76 | content should be taken from (l)ocal or (o)ther as well. |
|
77 | 77 | |
|
78 | 78 | $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF |
|
79 | 79 | > n |
|
80 | 80 | > n |
|
81 | 81 | > EOF |
|
82 | 82 | remote turned local normal file large.bin into a largefile |
|
83 | 83 | use (l)argefile or keep (n)ormal file? n |
|
84 | 84 | remote turned local normal file lfs.bin into a largefile |
|
85 | 85 | use (l)argefile or keep (n)ormal file? n |
|
86 | 86 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
87 | 87 | (branch merge, don't forget to commit) |
|
88 | 88 | $ hg ci -m 'merge lfs with largefiles -> normal' |
|
89 | 89 | $ hg manifest |
|
90 | 90 | large.bin |
|
91 | 91 | lfs.bin |
|
92 | 92 | lfs.txt |
|
93 | 93 | normal.txt |
|
94 | 94 | |
|
95 | 95 | The merged lfs.bin resolved to lfs because the (n)ormal option was picked. The |
|
96 | 96 | lfs.txt file is unchanged by the merge, because it was added before lfs was |
|
97 | 97 | enabled, and the content didn't change. |
|
98 | 98 | $ hg debugdata lfs.bin 0 |
|
99 | 99 | version https://git-lfs.github.com/spec/v1 |
|
100 | 100 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b |
|
101 | 101 | size 53 |
|
102 | 102 | x-is-binary 0 |
|
103 | 103 | $ hg debugdata lfs.txt 0 |
|
104 | 104 | normal above lfs threshold 0000000000000000000000000 |
|
105 | 105 | |
|
106 | 106 | Another filelog entry is NOT made by the merge, so nothing is committed as lfs. |
|
107 | 107 | $ hg log -r . -T '{join(lfs_files, ", ")}\n' |
|
108 | 108 | |
|
109 | 109 | |
|
110 | 110 | Replay the last merge, but pick (l)arge this time. The manifest will show any |
|
111 | 111 | standins. |
|
112 | 112 | |
|
113 | 113 | $ hg up -Cq e989d0fa3764 |
|
114 | 114 | |
|
115 | 115 | $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF |
|
116 | 116 | > l |
|
117 | 117 | > l |
|
118 | 118 | > EOF |
|
119 | 119 | remote turned local normal file large.bin into a largefile |
|
120 | 120 | use (l)argefile or keep (n)ormal file? l |
|
121 | 121 | remote turned local normal file lfs.bin into a largefile |
|
122 | 122 | use (l)argefile or keep (n)ormal file? l |
|
123 | 123 | getting changed largefiles |
|
124 | 124 | 2 largefiles updated, 0 removed |
|
125 | 125 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
126 | 126 | (branch merge, don't forget to commit) |
|
127 | 127 | $ hg ci -m 'merge lfs with largefiles -> large' |
|
128 | 128 | created new head |
|
129 | 129 | $ hg manifest |
|
130 | 130 | .hglf/large.bin |
|
131 | 131 | .hglf/lfs.bin |
|
132 | 132 | lfs.txt |
|
133 | 133 | normal.txt |
|
134 | 134 | |
|
135 | 135 | -------------------------------------------------------------------------------- |
|
136 | 136 | Merge lfs into largefiles branch |
|
137 | 137 | |
|
138 | 138 | $ hg up -Cq 6513aaab9ca0 |
|
139 | 139 | $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF |
|
140 | 140 | > n |
|
141 | 141 | > n |
|
142 | 142 | > EOF |
|
143 | 143 | remote turned local largefile large.bin into a normal file |
|
144 | 144 | keep (l)argefile or use (n)ormal file? n |
|
145 | 145 | remote turned local largefile lfs.bin into a normal file |
|
146 | 146 | keep (l)argefile or use (n)ormal file? n |
|
147 | 147 | getting changed largefiles |
|
148 | 148 | 0 largefiles updated, 0 removed |
|
149 | 149 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
150 | 150 | (branch merge, don't forget to commit) |
|
151 | 151 | $ hg ci -m 'merge largefiles with lfs -> normal' |
|
152 | 152 | created new head |
|
153 | 153 | $ hg manifest |
|
154 | 154 | large.bin |
|
155 | 155 | lfs.bin |
|
156 | 156 | lfs.txt |
|
157 | 157 | normal.txt |
|
158 | 158 | |
|
159 | 159 | The merged lfs.bin got converted to lfs because the (n)ormal option was picked. |
|
160 | 160 | The lfs.txt file is unchanged by the merge, because it was added before lfs was |
|
161 | 161 | enabled. |
|
162 | 162 | $ hg debugdata lfs.bin 0 |
|
163 | 163 | version https://git-lfs.github.com/spec/v1 |
|
164 | 164 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b |
|
165 | 165 | size 53 |
|
166 | 166 | x-is-binary 0 |
|
167 | 167 | $ hg debugdata lfs.txt 0 |
|
168 | 168 | normal above lfs threshold 0000000000000000000000000 |
|
169 | 169 | |
|
170 | 170 | Another filelog entry is NOT made by the merge, so nothing is committed as lfs. |
|
171 | 171 | $ hg log -r . -T '{join(lfs_files, ", ")}\n' |
|
172 | 172 | |
|
173 | 173 | |
|
174 | 174 | Replay the last merge, but pick (l)arge this time. The manifest will show the |
|
175 | 175 | standins. |
|
176 | 176 | |
|
177 | 177 | $ hg up -Cq 6513aaab9ca0 |
|
178 | 178 | |
|
179 | 179 | $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF |
|
180 | 180 | > l |
|
181 | 181 | > l |
|
182 | 182 | > EOF |
|
183 | 183 | remote turned local largefile large.bin into a normal file |
|
184 | 184 | keep (l)argefile or use (n)ormal file? l |
|
185 | 185 | remote turned local largefile lfs.bin into a normal file |
|
186 | 186 | keep (l)argefile or use (n)ormal file? l |
|
187 | 187 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
188 | 188 | (branch merge, don't forget to commit) |
|
189 | 189 | $ hg ci -m 'merge largefiles with lfs -> large' |
|
190 | 190 | created new head |
|
191 | 191 | $ hg manifest |
|
192 | 192 | .hglf/large.bin |
|
193 | 193 | .hglf/lfs.bin |
|
194 | 194 | lfs.txt |
|
195 | 195 | normal.txt |
|
196 | 196 | |
|
197 | 197 | -------------------------------------------------------------------------------- |
|
198 | 198 | |
|
199 | 199 | When both largefiles and lfs are configured to add by size, the tie goes to |
|
200 | 200 | largefiles since it hooks cmdutil.add() and lfs hooks the filelog write in the |
|
201 | 201 | commit. By the time the commit occurs, the tracked file is smaller than the |
|
202 | 202 | threshold (assuming it is > 41, so the standins don't become lfs objects). |
|
203 | 203 | |
|
204 | 204 | $ "$PYTHON" -c 'import sys ; sys.stdout.write("y\n" * 1048576)' > large_by_size.bin |
|
205 | 205 | $ hg --config largefiles.minsize=1 ci -Am 'large by size' |
|
206 | 206 | adding large_by_size.bin as a largefile |
|
207 | 207 | $ hg manifest |
|
208 | 208 | .hglf/large.bin |
|
209 | 209 | .hglf/large_by_size.bin |
|
210 | 210 | .hglf/lfs.bin |
|
211 | 211 | lfs.txt |
|
212 | 212 | normal.txt |
|
213 | 213 | |
|
214 | 214 | $ hg rm large_by_size.bin |
|
215 | 215 | $ hg ci -m 'remove large_by_size.bin' |
|
216 | 216 | |
|
217 | 217 | Largefiles doesn't do anything special with diff, so it falls back to diffing |
|
218 | 218 | the standins. Extdiff also is standin based comparison. Diff and extdiff both |
|
219 | 219 | work on the original file for lfs objects. |
|
220 | 220 | |
|
221 | 221 | Largefile -> lfs transition |
|
222 | 222 | $ hg diff -r 1 -r 3 |
|
223 | 223 | diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/large.bin |
|
224 | 224 | --- a/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
225 | 225 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
226 | 226 | @@ -1,1 +0,0 @@ |
|
227 | 227 | -cef9a458373df9b0743a0d3c14d0c66fb19b8629 |
|
228 | 228 | diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/lfs.bin |
|
229 | 229 | --- a/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
230 | 230 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
231 | 231 | @@ -1,1 +0,0 @@ |
|
232 | 232 | -557fb6309cef935e1ac2c8296508379e4b15a6e6 |
|
233 | 233 | diff -r 6513aaab9ca0 -r dcc5ce63e252 large.bin |
|
234 | 234 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
235 | 235 | +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
236 | 236 | @@ -0,0 +1,1 @@ |
|
237 | 237 | +below lfs threshold |
|
238 | 238 | diff -r 6513aaab9ca0 -r dcc5ce63e252 lfs.bin |
|
239 | 239 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
240 | 240 | +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
241 | 241 | @@ -0,0 +1,1 @@ |
|
242 | 242 | +lfs above the lfs threshold for length 0000000000000 |
|
243 | 243 | |
|
244 | 244 | lfs -> largefiles transition |
|
245 | 245 | $ hg diff -r 2 -r 6 |
|
246 | 246 | diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/large.bin |
|
247 | 247 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
248 | 248 | +++ b/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
249 | 249 | @@ -0,0 +1,1 @@ |
|
250 | 250 | +cef9a458373df9b0743a0d3c14d0c66fb19b8629 |
|
251 | 251 | diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/lfs.bin |
|
252 | 252 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
253 | 253 | +++ b/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
254 | 254 | @@ -0,0 +1,1 @@ |
|
255 | 255 | +557fb6309cef935e1ac2c8296508379e4b15a6e6 |
|
256 | 256 | diff -r e989d0fa3764 -r 95e1e80325c8 large.bin |
|
257 | 257 | --- a/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
258 | 258 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
259 | 259 | @@ -1,1 +0,0 @@ |
|
260 | 260 | -below lfs threshold |
|
261 | 261 | diff -r e989d0fa3764 -r 95e1e80325c8 lfs.bin |
|
262 | 262 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
263 | 263 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
264 | 264 | @@ -1,1 +0,0 @@ |
|
265 | 265 | -lfs above the lfs threshold for length 0000000000000 |
|
266 | 266 | |
|
267 | 267 | A largefiles repo can be converted to lfs. The lfconvert command uses the |
|
268 | 268 | convert extension under the hood with --to-normal. So the --config based |
|
269 | 269 | parameters are available, but not --authormap, --branchmap, etc. |
|
270 | 270 | |
|
271 | 271 | $ cd .. |
|
272 | 272 | $ hg lfconvert --to-normal largefiles nolargefiles 2>&1 |
|
273 | 273 | initializing destination nolargefiles |
|
274 | 274 | 0 additional largefiles cached |
|
275 | 275 | scanning source... |
|
276 | 276 | sorting... |
|
277 | 277 | converting... |
|
278 | 278 | 8 normal.txt |
|
279 | 279 | 7 add largefiles |
|
280 | 280 | 6 add with lfs extension |
|
281 | 281 | 5 merge lfs with largefiles -> normal |
|
282 | 282 | 4 merge lfs with largefiles -> large |
|
283 | 283 | 3 merge largefiles with lfs -> normal |
|
284 | 284 | 2 merge largefiles with lfs -> large |
|
285 | 285 | 1 large by size |
|
286 | 286 | 0 remove large_by_size.bin |
|
287 | 287 | $ cd nolargefiles |
|
288 | 288 | |
|
289 | 289 | The requirement is added to the destination repo. |
|
290 | 290 | |
|
291 |
$ |
|
|
291 | $ hg debugrequires | |
|
292 | 292 | dotencode |
|
293 | 293 | dirstate-v2 (dirstate-v2 !) |
|
294 | 294 | fncache |
|
295 | 295 | generaldelta |
|
296 | 296 | lfs |
|
297 | 297 | persistent-nodemap (rust !) |
|
298 | 298 | revlog-compression-zstd (zstd !) |
|
299 | 299 | revlogv1 |
|
300 | 300 | sparserevlog |
|
301 | 301 | store |
|
302 | 302 | |
|
303 | 303 | $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n' |
|
304 | 304 | o 8 large_by_size.bin (remove large_by_size.bin) |
|
305 | 305 | | |
|
306 | 306 | o 7 large_by_size.bin (large by size) |
|
307 | 307 | | |
|
308 | 308 | o 6 (merge largefiles with lfs -> large) |
|
309 | 309 | |\ |
|
310 | 310 | +---o 5 (merge largefiles with lfs -> normal) |
|
311 | 311 | | |/ |
|
312 | 312 | +---o 4 lfs.bin (merge lfs with largefiles -> large) |
|
313 | 313 | | |/ |
|
314 | 314 | +---o 3 (merge lfs with largefiles -> normal) |
|
315 | 315 | | |/ |
|
316 | 316 | | o 2 lfs.bin (add with lfs extension) |
|
317 | 317 | | | |
|
318 | 318 | o | 1 lfs.bin (add largefiles) |
|
319 | 319 | |/ |
|
320 | 320 | o 0 lfs.txt (normal.txt) |
|
321 | 321 | |
|
322 | 322 | $ hg debugdata lfs.bin 0 |
|
323 | 323 | version https://git-lfs.github.com/spec/v1 |
|
324 | 324 | oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62 |
|
325 | 325 | size 53 |
|
326 | 326 | x-is-binary 0 |
|
327 | 327 | $ hg debugdata lfs.bin 1 |
|
328 | 328 | version https://git-lfs.github.com/spec/v1 |
|
329 | 329 | oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b |
|
330 | 330 | size 53 |
|
331 | 331 | x-is-binary 0 |
|
332 | 332 | $ hg debugdata lfs.bin 2 |
|
333 | 333 | version https://git-lfs.github.com/spec/v1 |
|
334 | 334 | oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62 |
|
335 | 335 | size 53 |
|
336 | 336 | x-is-binary 0 |
|
337 | 337 | $ hg debugdata lfs.bin 3 |
|
338 | 338 | abort: invalid revision identifier 3 |
|
339 | 339 | [255] |
|
340 | 340 | |
|
341 | 341 | No diffs when comparing merge and p1 that kept p1's changes. Diff of lfs to |
|
342 | 342 | largefiles no longer operates in standin files. |
|
343 | 343 | |
|
344 | 344 | This `head -n 20` looks dumb (since we expect no output), but if something |
|
345 | 345 | breaks you can get 1048576 lines of +y in the output, which takes a looooooong |
|
346 | 346 | time to print. |
|
347 | 347 | $ hg diff -r 2:3 | head -n 20 |
|
348 | 348 | $ hg diff -r 2:6 | head -n 20 |
|
349 | 349 | diff -r e989d0fa3764 -r 752e3a0d8488 large.bin |
|
350 | 350 | --- a/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
351 | 351 | +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000 |
|
352 | 352 | @@ -1,1 +1,1 @@ |
|
353 | 353 | -below lfs threshold |
|
354 | 354 | +largefile |
|
355 | 355 | diff -r e989d0fa3764 -r 752e3a0d8488 lfs.bin |
|
356 | 356 | --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
357 | 357 | +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000 |
|
358 | 358 | @@ -1,1 +1,1 @@ |
|
359 | 359 | -lfs above the lfs threshold for length 0000000000000 |
|
360 | 360 | +largefile above lfs threshold 0000000000000000000000 |
@@ -1,43 +1,43 b'' | |||
|
1 | 1 | Make a narrow clone then archive it |
|
2 | 2 | $ . "$TESTDIR/narrow-library.sh" |
|
3 | 3 | |
|
4 | 4 | $ hg init master |
|
5 | 5 | $ cd master |
|
6 | 6 | |
|
7 | 7 | $ for x in `$TESTDIR/seq.py 3`; do |
|
8 | 8 | > echo $x > "f$x" |
|
9 | 9 | > hg add "f$x" |
|
10 | 10 | > hg commit -m "Add $x" |
|
11 | 11 | > done |
|
12 | 12 | $ cat >> .hg/hgrc << EOF |
|
13 | 13 | > [narrowacl] |
|
14 | 14 | > default.includes=f1 f2 |
|
15 | 15 | > EOF |
|
16 | 16 | $ hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid |
|
17 | 17 | $ cat hg.pid >> "$DAEMON_PIDS" |
|
18 | 18 | |
|
19 | 19 | $ cd .. |
|
20 | 20 | $ hg clone http://localhost:$HGPORT1 narrowclone1 |
|
21 | 21 | requesting all changes |
|
22 | 22 | adding changesets |
|
23 | 23 | adding manifests |
|
24 | 24 | adding file changes |
|
25 | 25 | added 3 changesets with 2 changes to 2 files |
|
26 | 26 | new changesets * (glob) |
|
27 | 27 | updating to branch default |
|
28 | 28 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
29 | 29 | |
|
30 | 30 | The clone directory should only contain f1 and f2 |
|
31 | 31 | $ ls -A -1 narrowclone1 | sort |
|
32 | 32 | .hg |
|
33 | 33 | f1 |
|
34 | 34 | f2 |
|
35 | 35 | |
|
36 | 36 | Requirements should contain narrowhg |
|
37 |
$ |
|
|
37 | $ hg debugrequires -R narrowclone1 | grep narrowhg | |
|
38 | 38 | narrowhg-experimental |
|
39 | 39 | |
|
40 | 40 | NarrowHG should track f1 and f2 |
|
41 | 41 | $ hg -R narrowclone1 tracked |
|
42 | 42 | I path:f1 |
|
43 | 43 | I path:f2 |
@@ -1,165 +1,165 b'' | |||
|
1 | 1 | $ . "$TESTDIR/narrow-library.sh" |
|
2 | 2 | |
|
3 | 3 | $ hg init master |
|
4 | 4 | $ cd master |
|
5 | 5 | $ mkdir dir |
|
6 | 6 | $ mkdir dir/src |
|
7 | 7 | $ cd dir/src |
|
8 | 8 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "f$x"; hg add "f$x"; hg commit -m "Commit src $x"; done |
|
9 | 9 | $ cd .. |
|
10 | 10 | $ mkdir tests |
|
11 | 11 | $ cd tests |
|
12 | 12 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "t$x"; hg add "t$x"; hg commit -m "Commit test $x"; done |
|
13 | 13 | $ cd ../../.. |
|
14 | 14 | |
|
15 | 15 | narrow clone a file, f10 |
|
16 | 16 | |
|
17 | 17 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" |
|
18 | 18 | requesting all changes |
|
19 | 19 | adding changesets |
|
20 | 20 | adding manifests |
|
21 | 21 | adding file changes |
|
22 | 22 | added 40 changesets with 1 changes to 1 files |
|
23 | 23 | new changesets *:* (glob) |
|
24 | 24 | $ cd narrow |
|
25 |
$ |
|
|
25 | $ hg debugrequires | grep -v generaldelta | |
|
26 | 26 | dotencode |
|
27 | 27 | dirstate-v2 (dirstate-v2 !) |
|
28 | 28 | fncache |
|
29 | 29 | narrowhg-experimental |
|
30 | 30 | persistent-nodemap (rust !) |
|
31 | 31 | revlog-compression-zstd (zstd !) |
|
32 | 32 | revlogv1 |
|
33 | 33 | sparserevlog |
|
34 | 34 | store |
|
35 | 35 | testonly-simplestore (reposimplestore !) |
|
36 | 36 | |
|
37 | 37 | $ hg tracked |
|
38 | 38 | I path:dir/src/f10 |
|
39 | 39 | $ hg update |
|
40 | 40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
41 | 41 | $ find * | sort |
|
42 | 42 | dir |
|
43 | 43 | dir/src |
|
44 | 44 | dir/src/f10 |
|
45 | 45 | $ cat dir/src/f10 |
|
46 | 46 | 10 |
|
47 | 47 | |
|
48 | 48 | $ cd .. |
|
49 | 49 | |
|
50 | 50 | narrow clone a directory, tests/, except tests/t19 |
|
51 | 51 | |
|
52 | 52 | $ hg clone --narrow ssh://user@dummy/master narrowdir --noupdate --include "dir/tests/" --exclude "dir/tests/t19" |
|
53 | 53 | requesting all changes |
|
54 | 54 | adding changesets |
|
55 | 55 | adding manifests |
|
56 | 56 | adding file changes |
|
57 | 57 | added 40 changesets with 19 changes to 19 files |
|
58 | 58 | new changesets *:* (glob) |
|
59 | 59 | $ cd narrowdir |
|
60 | 60 | $ hg tracked |
|
61 | 61 | I path:dir/tests |
|
62 | 62 | X path:dir/tests/t19 |
|
63 | 63 | $ hg update |
|
64 | 64 | 19 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
65 | 65 | $ find * | sort |
|
66 | 66 | dir |
|
67 | 67 | dir/tests |
|
68 | 68 | dir/tests/t1 |
|
69 | 69 | dir/tests/t10 |
|
70 | 70 | dir/tests/t11 |
|
71 | 71 | dir/tests/t12 |
|
72 | 72 | dir/tests/t13 |
|
73 | 73 | dir/tests/t14 |
|
74 | 74 | dir/tests/t15 |
|
75 | 75 | dir/tests/t16 |
|
76 | 76 | dir/tests/t17 |
|
77 | 77 | dir/tests/t18 |
|
78 | 78 | dir/tests/t2 |
|
79 | 79 | dir/tests/t20 |
|
80 | 80 | dir/tests/t3 |
|
81 | 81 | dir/tests/t4 |
|
82 | 82 | dir/tests/t5 |
|
83 | 83 | dir/tests/t6 |
|
84 | 84 | dir/tests/t7 |
|
85 | 85 | dir/tests/t8 |
|
86 | 86 | dir/tests/t9 |
|
87 | 87 | |
|
88 | 88 | $ cd .. |
|
89 | 89 | |
|
90 | 90 | narrow clone everything but a directory (tests/) |
|
91 | 91 | |
|
92 | 92 | $ hg clone --narrow ssh://user@dummy/master narrowroot --noupdate --exclude "dir/tests" |
|
93 | 93 | requesting all changes |
|
94 | 94 | adding changesets |
|
95 | 95 | adding manifests |
|
96 | 96 | adding file changes |
|
97 | 97 | added 40 changesets with 20 changes to 20 files |
|
98 | 98 | new changesets *:* (glob) |
|
99 | 99 | $ cd narrowroot |
|
100 | 100 | $ hg tracked |
|
101 | 101 | I path:. |
|
102 | 102 | X path:dir/tests |
|
103 | 103 | $ hg update |
|
104 | 104 | 20 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
105 | 105 | $ find * | sort |
|
106 | 106 | dir |
|
107 | 107 | dir/src |
|
108 | 108 | dir/src/f1 |
|
109 | 109 | dir/src/f10 |
|
110 | 110 | dir/src/f11 |
|
111 | 111 | dir/src/f12 |
|
112 | 112 | dir/src/f13 |
|
113 | 113 | dir/src/f14 |
|
114 | 114 | dir/src/f15 |
|
115 | 115 | dir/src/f16 |
|
116 | 116 | dir/src/f17 |
|
117 | 117 | dir/src/f18 |
|
118 | 118 | dir/src/f19 |
|
119 | 119 | dir/src/f2 |
|
120 | 120 | dir/src/f20 |
|
121 | 121 | dir/src/f3 |
|
122 | 122 | dir/src/f4 |
|
123 | 123 | dir/src/f5 |
|
124 | 124 | dir/src/f6 |
|
125 | 125 | dir/src/f7 |
|
126 | 126 | dir/src/f8 |
|
127 | 127 | dir/src/f9 |
|
128 | 128 | |
|
129 | 129 | $ cd .. |
|
130 | 130 | |
|
131 | 131 | Testing the --narrowspec flag to clone |
|
132 | 132 | |
|
133 | 133 | $ cat >> narrowspecs <<EOF |
|
134 | 134 | > %include foo |
|
135 | 135 | > [include] |
|
136 | 136 | > path:dir/tests/ |
|
137 | 137 | > path:dir/src/f12 |
|
138 | 138 | > EOF |
|
139 | 139 | |
|
140 | 140 | $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs |
|
141 | 141 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
142 | 142 | config error: cannot specify other files using '%include' in narrowspec |
|
143 | 143 | [30] |
|
144 | 144 | |
|
145 | 145 | $ cat > narrowspecs <<EOF |
|
146 | 146 | > [include] |
|
147 | 147 | > path:dir/tests/ |
|
148 | 148 | > path:dir/src/f12 |
|
149 | 149 | > EOF |
|
150 | 150 | |
|
151 | 151 | $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs |
|
152 | 152 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
153 | 153 | requesting all changes |
|
154 | 154 | adding changesets |
|
155 | 155 | adding manifests |
|
156 | 156 | adding file changes |
|
157 | 157 | added 40 changesets with 21 changes to 21 files |
|
158 | 158 | new changesets 681085829a73:26ce255d5b5d |
|
159 | 159 | updating to branch default |
|
160 | 160 | 21 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
161 | 161 | $ cd specfile |
|
162 | 162 | $ hg tracked |
|
163 | 163 | I path:dir/src/f12 |
|
164 | 164 | I path:dir/tests |
|
165 | 165 | $ cd .. |
@@ -1,102 +1,102 b'' | |||
|
1 | 1 | #testcases tree flat-fncache flat-nofncache |
|
2 | 2 | |
|
3 | 3 | Tests narrow stream clones |
|
4 | 4 | |
|
5 | 5 | $ . "$TESTDIR/narrow-library.sh" |
|
6 | 6 | |
|
7 | 7 | #if tree |
|
8 | 8 | $ cat << EOF >> $HGRCPATH |
|
9 | 9 | > [experimental] |
|
10 | 10 | > treemanifest = 1 |
|
11 | 11 | > EOF |
|
12 | 12 | #endif |
|
13 | 13 | |
|
14 | 14 | #if flat-nofncache |
|
15 | 15 | $ cat << EOF >> $HGRCPATH |
|
16 | 16 | > [format] |
|
17 | 17 | > usefncache = 0 |
|
18 | 18 | > EOF |
|
19 | 19 | #endif |
|
20 | 20 | |
|
21 | 21 | Server setup |
|
22 | 22 | |
|
23 | 23 | $ hg init master |
|
24 | 24 | $ cd master |
|
25 | 25 | $ mkdir dir |
|
26 | 26 | $ mkdir dir/src |
|
27 | 27 | $ cd dir/src |
|
28 | 28 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done |
|
29 | 29 | |
|
30 | 30 | $ cd .. |
|
31 | 31 | $ mkdir tests |
|
32 | 32 | $ cd tests |
|
33 | 33 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done |
|
34 | 34 | $ cd ../../.. |
|
35 | 35 | |
|
36 | 36 | Trying to stream clone when the server does not support it |
|
37 | 37 | |
|
38 | 38 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream |
|
39 | 39 | streaming all changes |
|
40 | 40 | remote: abort: server does not support narrow stream clones |
|
41 | 41 | abort: pull failed on remote |
|
42 | 42 | [100] |
|
43 | 43 | |
|
44 | 44 | Enable stream clone on the server |
|
45 | 45 | |
|
46 | 46 | $ echo "[experimental]" >> master/.hg/hgrc |
|
47 | 47 | $ echo "server.stream-narrow-clones=True" >> master/.hg/hgrc |
|
48 | 48 | |
|
49 | 49 | Cloning a specific file when stream clone is supported |
|
50 | 50 | |
|
51 | 51 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream |
|
52 | 52 | streaming all changes |
|
53 | 53 | * files to transfer, * KB of data (glob) |
|
54 | 54 | transferred * KB in * seconds (* */sec) (glob) |
|
55 | 55 | |
|
56 | 56 | $ cd narrow |
|
57 | 57 | $ ls -A |
|
58 | 58 | .hg |
|
59 | 59 | $ hg tracked |
|
60 | 60 | I path:dir/src/F10 |
|
61 | 61 | |
|
62 | 62 | Making sure we have the correct set of requirements |
|
63 | 63 | |
|
64 |
$ |
|
|
64 | $ hg debugrequires | |
|
65 | 65 | dotencode (tree !) |
|
66 | 66 | dotencode (flat-fncache !) |
|
67 | 67 | dirstate-v2 (dirstate-v2 !) |
|
68 | 68 | fncache (tree !) |
|
69 | 69 | fncache (flat-fncache !) |
|
70 | 70 | generaldelta |
|
71 | 71 | narrowhg-experimental |
|
72 | 72 | persistent-nodemap (rust !) |
|
73 | 73 | revlog-compression-zstd (zstd !) |
|
74 | 74 | revlogv1 |
|
75 | 75 | sparserevlog |
|
76 | 76 | store |
|
77 | 77 | treemanifest (tree !) |
|
78 | 78 | |
|
79 | 79 | Making sure store has the required files |
|
80 | 80 | |
|
81 | 81 | $ ls .hg/store/ |
|
82 | 82 | 00changelog.i |
|
83 | 83 | 00manifest.i |
|
84 | 84 | data |
|
85 | 85 | fncache (tree !) |
|
86 | 86 | fncache (flat-fncache !) |
|
87 | 87 | meta (tree !) |
|
88 | 88 | narrowspec |
|
89 | 89 | undo |
|
90 | 90 | undo.backupfiles |
|
91 | 91 | undo.narrowspec |
|
92 | 92 | undo.phaseroots |
|
93 | 93 | |
|
94 | 94 | Checking that repository has all the required data and not broken |
|
95 | 95 | |
|
96 | 96 | $ hg verify |
|
97 | 97 | checking changesets |
|
98 | 98 | checking manifests |
|
99 | 99 | checking directory manifests (tree !) |
|
100 | 100 | crosschecking files in changesets and manifests |
|
101 | 101 | checking files |
|
102 | 102 | checked 40 changesets with 1 changes to 1 files |
@@ -1,298 +1,298 b'' | |||
|
1 | 1 | $ . "$TESTDIR/narrow-library.sh" |
|
2 | 2 | |
|
3 | 3 | $ hg init master |
|
4 | 4 | $ cd master |
|
5 | 5 | $ cat >> .hg/hgrc <<EOF |
|
6 | 6 | > [narrow] |
|
7 | 7 | > serveellipses=True |
|
8 | 8 | > EOF |
|
9 | 9 | $ mkdir dir |
|
10 | 10 | $ mkdir dir/src |
|
11 | 11 | $ cd dir/src |
|
12 | 12 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "f$x"; hg add "f$x"; hg commit -m "Commit src $x"; done |
|
13 | 13 | $ cd .. |
|
14 | 14 | $ mkdir tests |
|
15 | 15 | $ cd tests |
|
16 | 16 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "t$x"; hg add "t$x"; hg commit -m "Commit test $x"; done |
|
17 | 17 | $ cd ../../.. |
|
18 | 18 | |
|
19 | 19 | Only path: and rootfilesin: pattern prefixes are allowed |
|
20 | 20 | |
|
21 | 21 | $ hg clone --narrow ssh://user@dummy/master badnarrow --noupdate --include 'glob:**' |
|
22 | 22 | abort: invalid prefix on narrow pattern: glob:** |
|
23 | 23 | (narrow patterns must begin with one of the following: path:, rootfilesin:) |
|
24 | 24 | [255] |
|
25 | 25 | |
|
26 | 26 | $ hg clone --narrow ssh://user@dummy/master badnarrow --noupdate --exclude 'set:ignored' |
|
27 | 27 | abort: invalid prefix on narrow pattern: set:ignored |
|
28 | 28 | (narrow patterns must begin with one of the following: path:, rootfilesin:) |
|
29 | 29 | [255] |
|
30 | 30 | |
|
31 | 31 | narrow clone a file, f10 |
|
32 | 32 | |
|
33 | 33 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" |
|
34 | 34 | requesting all changes |
|
35 | 35 | adding changesets |
|
36 | 36 | adding manifests |
|
37 | 37 | adding file changes |
|
38 | 38 | added 3 changesets with 1 changes to 1 files |
|
39 | 39 | new changesets *:* (glob) |
|
40 | 40 | $ cd narrow |
|
41 |
$ |
|
|
41 | $ hg debugrequires | grep -v generaldelta | |
|
42 | 42 | dotencode |
|
43 | 43 | dirstate-v2 (dirstate-v2 !) |
|
44 | 44 | fncache |
|
45 | 45 | narrowhg-experimental |
|
46 | 46 | persistent-nodemap (rust !) |
|
47 | 47 | revlog-compression-zstd (zstd !) |
|
48 | 48 | revlogv1 |
|
49 | 49 | sparserevlog |
|
50 | 50 | store |
|
51 | 51 | testonly-simplestore (reposimplestore !) |
|
52 | 52 | |
|
53 | 53 | $ hg tracked |
|
54 | 54 | I path:dir/src/f10 |
|
55 | 55 | $ hg tracked |
|
56 | 56 | I path:dir/src/f10 |
|
57 | 57 | $ hg update |
|
58 | 58 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
59 | 59 | $ find * | sort |
|
60 | 60 | dir |
|
61 | 61 | dir/src |
|
62 | 62 | dir/src/f10 |
|
63 | 63 | $ cat dir/src/f10 |
|
64 | 64 | 10 |
|
65 | 65 | |
|
66 | 66 | $ cd .. |
|
67 | 67 | |
|
68 | 68 | local-to-local narrow clones work |
|
69 | 69 | |
|
70 | 70 | $ hg clone --narrow master narrow-via-localpeer --noupdate --include "dir/src/f10" |
|
71 | 71 | requesting all changes |
|
72 | 72 | adding changesets |
|
73 | 73 | adding manifests |
|
74 | 74 | adding file changes |
|
75 | 75 | added 3 changesets with 1 changes to 1 files |
|
76 | 76 | new changesets 5d21aaea77f8:26ce255d5b5d |
|
77 | 77 | $ hg tracked -R narrow-via-localpeer |
|
78 | 78 | I path:dir/src/f10 |
|
79 | 79 | $ rm -Rf narrow-via-localpeer |
|
80 | 80 | |
|
81 | 81 | narrow clone with a newline should fail |
|
82 | 82 | |
|
83 | 83 | $ hg clone --narrow ssh://user@dummy/master narrow_fail --noupdate --include 'dir/src/f10 |
|
84 | 84 | > ' |
|
85 | 85 | abort: newlines are not allowed in narrowspec paths |
|
86 | 86 | [255] |
|
87 | 87 | |
|
88 | 88 | narrow clone a directory, tests/, except tests/t19 |
|
89 | 89 | |
|
90 | 90 | $ hg clone --narrow ssh://user@dummy/master narrowdir --noupdate --include "dir/tests/" --exclude "dir/tests/t19" |
|
91 | 91 | requesting all changes |
|
92 | 92 | adding changesets |
|
93 | 93 | adding manifests |
|
94 | 94 | adding file changes |
|
95 | 95 | added 21 changesets with 19 changes to 19 files |
|
96 | 96 | new changesets *:* (glob) |
|
97 | 97 | $ cd narrowdir |
|
98 | 98 | $ hg tracked |
|
99 | 99 | I path:dir/tests |
|
100 | 100 | X path:dir/tests/t19 |
|
101 | 101 | $ hg tracked |
|
102 | 102 | I path:dir/tests |
|
103 | 103 | X path:dir/tests/t19 |
|
104 | 104 | $ hg update |
|
105 | 105 | 19 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
106 | 106 | $ find * | sort |
|
107 | 107 | dir |
|
108 | 108 | dir/tests |
|
109 | 109 | dir/tests/t1 |
|
110 | 110 | dir/tests/t10 |
|
111 | 111 | dir/tests/t11 |
|
112 | 112 | dir/tests/t12 |
|
113 | 113 | dir/tests/t13 |
|
114 | 114 | dir/tests/t14 |
|
115 | 115 | dir/tests/t15 |
|
116 | 116 | dir/tests/t16 |
|
117 | 117 | dir/tests/t17 |
|
118 | 118 | dir/tests/t18 |
|
119 | 119 | dir/tests/t2 |
|
120 | 120 | dir/tests/t20 |
|
121 | 121 | dir/tests/t3 |
|
122 | 122 | dir/tests/t4 |
|
123 | 123 | dir/tests/t5 |
|
124 | 124 | dir/tests/t6 |
|
125 | 125 | dir/tests/t7 |
|
126 | 126 | dir/tests/t8 |
|
127 | 127 | dir/tests/t9 |
|
128 | 128 | |
|
129 | 129 | $ cd .. |
|
130 | 130 | |
|
131 | 131 | narrow clone everything but a directory (tests/) |
|
132 | 132 | |
|
133 | 133 | $ hg clone --narrow ssh://user@dummy/master narrowroot --noupdate --exclude "dir/tests" |
|
134 | 134 | requesting all changes |
|
135 | 135 | adding changesets |
|
136 | 136 | adding manifests |
|
137 | 137 | adding file changes |
|
138 | 138 | added 21 changesets with 20 changes to 20 files |
|
139 | 139 | new changesets *:* (glob) |
|
140 | 140 | $ cd narrowroot |
|
141 | 141 | $ hg tracked |
|
142 | 142 | I path:. |
|
143 | 143 | X path:dir/tests |
|
144 | 144 | $ hg tracked |
|
145 | 145 | I path:. |
|
146 | 146 | X path:dir/tests |
|
147 | 147 | $ hg update |
|
148 | 148 | 20 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
149 | 149 | $ find * | sort |
|
150 | 150 | dir |
|
151 | 151 | dir/src |
|
152 | 152 | dir/src/f1 |
|
153 | 153 | dir/src/f10 |
|
154 | 154 | dir/src/f11 |
|
155 | 155 | dir/src/f12 |
|
156 | 156 | dir/src/f13 |
|
157 | 157 | dir/src/f14 |
|
158 | 158 | dir/src/f15 |
|
159 | 159 | dir/src/f16 |
|
160 | 160 | dir/src/f17 |
|
161 | 161 | dir/src/f18 |
|
162 | 162 | dir/src/f19 |
|
163 | 163 | dir/src/f2 |
|
164 | 164 | dir/src/f20 |
|
165 | 165 | dir/src/f3 |
|
166 | 166 | dir/src/f4 |
|
167 | 167 | dir/src/f5 |
|
168 | 168 | dir/src/f6 |
|
169 | 169 | dir/src/f7 |
|
170 | 170 | dir/src/f8 |
|
171 | 171 | dir/src/f9 |
|
172 | 172 | |
|
173 | 173 | $ cd .. |
|
174 | 174 | |
|
175 | 175 | narrow clone no paths at all |
|
176 | 176 | |
|
177 | 177 | $ hg clone --narrow ssh://user@dummy/master narrowempty --noupdate |
|
178 | 178 | requesting all changes |
|
179 | 179 | adding changesets |
|
180 | 180 | adding manifests |
|
181 | 181 | adding file changes |
|
182 | 182 | added 1 changesets with 0 changes to 0 files |
|
183 | 183 | new changesets * (glob) |
|
184 | 184 | $ cd narrowempty |
|
185 | 185 | $ hg tracked |
|
186 | 186 | $ hg update |
|
187 | 187 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
188 | 188 | $ ls -A |
|
189 | 189 | .hg |
|
190 | 190 | |
|
191 | 191 | $ cd .. |
|
192 | 192 | |
|
193 | 193 | simple clone |
|
194 | 194 | $ hg clone ssh://user@dummy/master simpleclone |
|
195 | 195 | requesting all changes |
|
196 | 196 | adding changesets |
|
197 | 197 | adding manifests |
|
198 | 198 | adding file changes |
|
199 | 199 | added 40 changesets with 40 changes to 40 files |
|
200 | 200 | new changesets * (glob) |
|
201 | 201 | updating to branch default |
|
202 | 202 | 40 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
203 | 203 | $ cd simpleclone |
|
204 | 204 | $ find * | sort |
|
205 | 205 | dir |
|
206 | 206 | dir/src |
|
207 | 207 | dir/src/f1 |
|
208 | 208 | dir/src/f10 |
|
209 | 209 | dir/src/f11 |
|
210 | 210 | dir/src/f12 |
|
211 | 211 | dir/src/f13 |
|
212 | 212 | dir/src/f14 |
|
213 | 213 | dir/src/f15 |
|
214 | 214 | dir/src/f16 |
|
215 | 215 | dir/src/f17 |
|
216 | 216 | dir/src/f18 |
|
217 | 217 | dir/src/f19 |
|
218 | 218 | dir/src/f2 |
|
219 | 219 | dir/src/f20 |
|
220 | 220 | dir/src/f3 |
|
221 | 221 | dir/src/f4 |
|
222 | 222 | dir/src/f5 |
|
223 | 223 | dir/src/f6 |
|
224 | 224 | dir/src/f7 |
|
225 | 225 | dir/src/f8 |
|
226 | 226 | dir/src/f9 |
|
227 | 227 | dir/tests |
|
228 | 228 | dir/tests/t1 |
|
229 | 229 | dir/tests/t10 |
|
230 | 230 | dir/tests/t11 |
|
231 | 231 | dir/tests/t12 |
|
232 | 232 | dir/tests/t13 |
|
233 | 233 | dir/tests/t14 |
|
234 | 234 | dir/tests/t15 |
|
235 | 235 | dir/tests/t16 |
|
236 | 236 | dir/tests/t17 |
|
237 | 237 | dir/tests/t18 |
|
238 | 238 | dir/tests/t19 |
|
239 | 239 | dir/tests/t2 |
|
240 | 240 | dir/tests/t20 |
|
241 | 241 | dir/tests/t3 |
|
242 | 242 | dir/tests/t4 |
|
243 | 243 | dir/tests/t5 |
|
244 | 244 | dir/tests/t6 |
|
245 | 245 | dir/tests/t7 |
|
246 | 246 | dir/tests/t8 |
|
247 | 247 | dir/tests/t9 |
|
248 | 248 | |
|
249 | 249 | $ cd .. |
|
250 | 250 | |
|
251 | 251 | Testing the --narrowspec flag to clone |
|
252 | 252 | |
|
253 | 253 | $ cat >> narrowspecs <<EOF |
|
254 | 254 | > %include foo |
|
255 | 255 | > [include] |
|
256 | 256 | > path:dir/tests/ |
|
257 | 257 | > path:dir/src/f12 |
|
258 | 258 | > EOF |
|
259 | 259 | |
|
260 | 260 | $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs |
|
261 | 261 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
262 | 262 | config error: cannot specify other files using '%include' in narrowspec |
|
263 | 263 | [30] |
|
264 | 264 | |
|
265 | 265 | $ cat > narrowspecs <<EOF |
|
266 | 266 | > [include] |
|
267 | 267 | > path:dir/tests/ |
|
268 | 268 | > path:dir/src/f12 |
|
269 | 269 | > EOF |
|
270 | 270 | |
|
271 | 271 | $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs |
|
272 | 272 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
273 | 273 | requesting all changes |
|
274 | 274 | adding changesets |
|
275 | 275 | adding manifests |
|
276 | 276 | adding file changes |
|
277 | 277 | added 23 changesets with 21 changes to 21 files |
|
278 | 278 | new changesets c13e3773edb4:26ce255d5b5d |
|
279 | 279 | updating to branch default |
|
280 | 280 | 21 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
281 | 281 | $ cd specfile |
|
282 | 282 | $ hg tracked |
|
283 | 283 | I path:dir/src/f12 |
|
284 | 284 | I path:dir/tests |
|
285 | 285 | $ cd .. |
|
286 | 286 | |
|
287 | 287 | Narrow spec with invalid patterns is rejected |
|
288 | 288 | |
|
289 | 289 | $ cat > narrowspecs <<EOF |
|
290 | 290 | > [include] |
|
291 | 291 | > glob:** |
|
292 | 292 | > EOF |
|
293 | 293 | |
|
294 | 294 | $ hg clone ssh://user@dummy/master badspecfile --narrowspec narrowspecs |
|
295 | 295 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
296 | 296 | abort: invalid prefix on narrow pattern: glob:** |
|
297 | 297 | (narrow patterns must begin with one of the following: path:, rootfilesin:) |
|
298 | 298 | [255] |
@@ -1,97 +1,97 b'' | |||
|
1 | 1 | Testing interaction of sparse and narrow when both are enabled on the client |
|
2 | 2 | side and we do a non-ellipsis clone |
|
3 | 3 | |
|
4 | 4 | #testcases tree flat |
|
5 | 5 | $ . "$TESTDIR/narrow-library.sh" |
|
6 | 6 | $ cat << EOF >> $HGRCPATH |
|
7 | 7 | > [extensions] |
|
8 | 8 | > sparse = |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | #if tree |
|
12 | 12 | $ cat << EOF >> $HGRCPATH |
|
13 | 13 | > [experimental] |
|
14 | 14 | > treemanifest = 1 |
|
15 | 15 | > EOF |
|
16 | 16 | #endif |
|
17 | 17 | |
|
18 | 18 | $ hg init master |
|
19 | 19 | $ cd master |
|
20 | 20 | |
|
21 | 21 | $ mkdir inside |
|
22 | 22 | $ echo 'inside' > inside/f |
|
23 | 23 | $ hg add inside/f |
|
24 | 24 | $ hg commit -m 'add inside' |
|
25 | 25 | |
|
26 | 26 | $ mkdir widest |
|
27 | 27 | $ echo 'widest' > widest/f |
|
28 | 28 | $ hg add widest/f |
|
29 | 29 | $ hg commit -m 'add widest' |
|
30 | 30 | |
|
31 | 31 | $ mkdir outside |
|
32 | 32 | $ echo 'outside' > outside/f |
|
33 | 33 | $ hg add outside/f |
|
34 | 34 | $ hg commit -m 'add outside' |
|
35 | 35 | |
|
36 | 36 | $ cd .. |
|
37 | 37 | |
|
38 | 38 | narrow clone the inside file |
|
39 | 39 | |
|
40 | 40 | $ hg clone --narrow ssh://user@dummy/master narrow --include inside/f |
|
41 | 41 | requesting all changes |
|
42 | 42 | adding changesets |
|
43 | 43 | adding manifests |
|
44 | 44 | adding file changes |
|
45 | 45 | added 3 changesets with 1 changes to 1 files |
|
46 | 46 | new changesets *:* (glob) |
|
47 | 47 | updating to branch default |
|
48 | 48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 49 | $ cd narrow |
|
50 | 50 | $ hg tracked |
|
51 | 51 | I path:inside/f |
|
52 | 52 | $ hg files |
|
53 | 53 | inside/f |
|
54 | 54 | |
|
55 | 55 | XXX: we should have a flag in `hg debugsparse` to list the sparse profile |
|
56 | 56 | $ test -f .hg/sparse |
|
57 | 57 | [1] |
|
58 | 58 | |
|
59 |
$ |
|
|
59 | $ hg debugrequires | |
|
60 | 60 | dotencode |
|
61 | 61 | dirstate-v2 (dirstate-v2 !) |
|
62 | 62 | fncache |
|
63 | 63 | generaldelta |
|
64 | 64 | narrowhg-experimental |
|
65 | 65 | persistent-nodemap (rust !) |
|
66 | 66 | revlog-compression-zstd (zstd !) |
|
67 | 67 | revlogv1 |
|
68 | 68 | sparserevlog |
|
69 | 69 | store |
|
70 | 70 | treemanifest (tree !) |
|
71 | 71 | |
|
72 | 72 | $ hg debugrebuilddirstate |
|
73 | 73 | |
|
74 | 74 | We only make the following assertions for the flat test case since in the |
|
75 | 75 | treemanifest test case debugsparse fails with "path ends in directory |
|
76 | 76 | separator: outside/" which seems like a bug unrelated to the regression this is |
|
77 | 77 | testing for. |
|
78 | 78 | |
|
79 | 79 | #if flat |
|
80 | 80 | widening with both sparse and narrow is possible |
|
81 | 81 | |
|
82 | 82 | $ cat >> .hg/hgrc <<EOF |
|
83 | 83 | > [extensions] |
|
84 | 84 | > sparse = |
|
85 | 85 | > narrow = |
|
86 | 86 | > EOF |
|
87 | 87 | |
|
88 | 88 | $ hg debugsparse -X outside/f -X widest/f |
|
89 | 89 | $ hg tracked -q --addinclude outside/f |
|
90 | 90 | $ find . -name .hg -prune -o -type f -print | sort |
|
91 | 91 | ./inside/f |
|
92 | 92 | |
|
93 | 93 | $ hg debugsparse -d outside/f |
|
94 | 94 | $ find . -name .hg -prune -o -type f -print | sort |
|
95 | 95 | ./inside/f |
|
96 | 96 | ./outside/f |
|
97 | 97 | #endif |
@@ -1,127 +1,127 b'' | |||
|
1 | 1 | #require no-windows |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
4 | 4 | |
|
5 | 5 | $ hg init master |
|
6 | 6 | $ cd master |
|
7 | 7 | $ echo treemanifest >> .hg/requires |
|
8 | 8 | $ cat >> .hg/hgrc <<EOF |
|
9 | 9 | > [remotefilelog] |
|
10 | 10 | > server=True |
|
11 | 11 | > EOF |
|
12 | 12 | # uppercase directory name to test encoding |
|
13 | 13 | $ mkdir -p A/B |
|
14 | 14 | $ echo x > A/B/x |
|
15 | 15 | $ hg commit -qAm x |
|
16 | 16 | |
|
17 | 17 | $ cd .. |
|
18 | 18 | |
|
19 | 19 | # shallow clone from full |
|
20 | 20 | |
|
21 | 21 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
|
22 | 22 | streaming all changes |
|
23 | 23 | 4 files to transfer, 449 bytes of data |
|
24 | 24 | transferred 449 bytes in * seconds (*/sec) (glob) |
|
25 | 25 | searching for changes |
|
26 | 26 | no changes found |
|
27 | 27 | $ cd shallow |
|
28 |
$ |
|
|
28 | $ hg debugrequires | |
|
29 | 29 | dotencode |
|
30 | 30 | dirstate-v2 (dirstate-v2 !) |
|
31 | 31 | exp-remotefilelog-repo-req-1 |
|
32 | 32 | fncache |
|
33 | 33 | generaldelta |
|
34 | 34 | persistent-nodemap (rust !) |
|
35 | 35 | revlog-compression-zstd (zstd !) |
|
36 | 36 | revlogv1 |
|
37 | 37 | sparserevlog |
|
38 | 38 | store |
|
39 | 39 | treemanifest |
|
40 | 40 | $ find .hg/store/meta | sort |
|
41 | 41 | .hg/store/meta |
|
42 | 42 | .hg/store/meta/_a |
|
43 | 43 | .hg/store/meta/_a/00manifest.i |
|
44 | 44 | .hg/store/meta/_a/_b |
|
45 | 45 | .hg/store/meta/_a/_b/00manifest.i |
|
46 | 46 | |
|
47 | 47 | $ hg update |
|
48 | 48 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 49 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
|
50 | 50 | |
|
51 | 51 | $ cat A/B/x |
|
52 | 52 | x |
|
53 | 53 | |
|
54 | 54 | $ ls .hg/store/data |
|
55 | 55 | $ echo foo > A/B/F |
|
56 | 56 | $ hg add A/B/F |
|
57 | 57 | $ hg ci -m 'local content' |
|
58 | 58 | $ ls .hg/store/data |
|
59 | 59 | ca31988f085bfb945cb8115b78fabdee40f741aa |
|
60 | 60 | |
|
61 | 61 | $ cd .. |
|
62 | 62 | |
|
63 | 63 | # shallow clone from shallow |
|
64 | 64 | |
|
65 | 65 | $ hgcloneshallow ssh://user@dummy/shallow shallow2 --noupdate |
|
66 | 66 | streaming all changes |
|
67 | 67 | 5 files to transfer, 1008 bytes of data |
|
68 | 68 | transferred 1008 bytes in * seconds (*/sec) (glob) |
|
69 | 69 | searching for changes |
|
70 | 70 | no changes found |
|
71 | 71 | $ cd shallow2 |
|
72 |
$ |
|
|
72 | $ hg debugrequires | |
|
73 | 73 | dotencode |
|
74 | 74 | dirstate-v2 (dirstate-v2 !) |
|
75 | 75 | exp-remotefilelog-repo-req-1 |
|
76 | 76 | fncache |
|
77 | 77 | generaldelta |
|
78 | 78 | persistent-nodemap (rust !) |
|
79 | 79 | revlog-compression-zstd (zstd !) |
|
80 | 80 | revlogv1 |
|
81 | 81 | sparserevlog |
|
82 | 82 | store |
|
83 | 83 | treemanifest |
|
84 | 84 | $ ls .hg/store/data |
|
85 | 85 | ca31988f085bfb945cb8115b78fabdee40f741aa |
|
86 | 86 | |
|
87 | 87 | $ hg update |
|
88 | 88 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
89 | 89 | |
|
90 | 90 | $ cat A/B/x |
|
91 | 91 | x |
|
92 | 92 | |
|
93 | 93 | $ cd .. |
|
94 | 94 | |
|
95 | 95 | # full clone from shallow |
|
96 | 96 | # - send stderr to /dev/null because the order of stdout/err causes |
|
97 | 97 | # flakiness here |
|
98 | 98 | $ hg clone --noupdate ssh://user@dummy/shallow full 2>/dev/null |
|
99 | 99 | streaming all changes |
|
100 | 100 | [100] |
|
101 | 101 | |
|
102 | 102 | # getbundle full clone |
|
103 | 103 | |
|
104 | 104 | $ printf '[server]\npreferuncompressed=False\n' >> master/.hg/hgrc |
|
105 | 105 | $ hgcloneshallow ssh://user@dummy/master shallow3 |
|
106 | 106 | requesting all changes |
|
107 | 107 | adding changesets |
|
108 | 108 | adding manifests |
|
109 | 109 | adding file changes |
|
110 | 110 | added 1 changesets with 0 changes to 0 files |
|
111 | 111 | new changesets 18d955ee7ba0 |
|
112 | 112 | updating to branch default |
|
113 | 113 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
114 | 114 | |
|
115 | 115 | $ ls shallow3/.hg/store/data |
|
116 | $ cat shallow3/.hg/requires | |
|
116 | $ hg debugrequires -R shallow3/ | |
|
117 | 117 | dotencode |
|
118 | 118 | dirstate-v2 (dirstate-v2 !) |
|
119 | 119 | exp-remotefilelog-repo-req-1 |
|
120 | 120 | fncache |
|
121 | 121 | generaldelta |
|
122 | 122 | persistent-nodemap (rust !) |
|
123 | 123 | revlog-compression-zstd (zstd !) |
|
124 | 124 | revlogv1 |
|
125 | 125 | sparserevlog |
|
126 | 126 | store |
|
127 | 127 | treemanifest |
@@ -1,124 +1,124 b'' | |||
|
1 | 1 | #require no-windows |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
4 | 4 | |
|
5 | 5 | $ hg init master |
|
6 | 6 | $ cd master |
|
7 | 7 | $ cat >> .hg/hgrc <<EOF |
|
8 | 8 | > [remotefilelog] |
|
9 | 9 | > server=True |
|
10 | 10 | > EOF |
|
11 | 11 | $ echo x > x |
|
12 | 12 | $ hg commit -qAm x |
|
13 | 13 | |
|
14 | 14 | $ cd .. |
|
15 | 15 | |
|
16 | 16 | # shallow clone from full |
|
17 | 17 | |
|
18 | 18 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
|
19 | 19 | streaming all changes |
|
20 | 20 | 2 files to transfer, 227 bytes of data |
|
21 | 21 | transferred 227 bytes in * seconds (*/sec) (glob) |
|
22 | 22 | searching for changes |
|
23 | 23 | no changes found |
|
24 | 24 | $ cd shallow |
|
25 |
$ |
|
|
25 | $ hg debugrequires | |
|
26 | 26 | dotencode |
|
27 | 27 | dirstate-v2 (dirstate-v2 !) |
|
28 | 28 | exp-remotefilelog-repo-req-1 |
|
29 | 29 | fncache |
|
30 | 30 | generaldelta |
|
31 | 31 | persistent-nodemap (rust !) |
|
32 | 32 | revlog-compression-zstd (zstd !) |
|
33 | 33 | revlogv1 |
|
34 | 34 | sparserevlog |
|
35 | 35 | store |
|
36 | 36 | |
|
37 | 37 | $ hg update |
|
38 | 38 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
39 | 39 | 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
|
40 | 40 | |
|
41 | 41 | $ cat x |
|
42 | 42 | x |
|
43 | 43 | |
|
44 | 44 | $ ls .hg/store/data |
|
45 | 45 | $ echo foo > f |
|
46 | 46 | $ hg add f |
|
47 | 47 | $ hg ci -m 'local content' |
|
48 | 48 | $ ls .hg/store/data |
|
49 | 49 | 4a0a19218e082a343a1b17e5333409af9d98f0f5 |
|
50 | 50 | |
|
51 | 51 | $ cd .. |
|
52 | 52 | |
|
53 | 53 | # shallow clone from shallow |
|
54 | 54 | |
|
55 | 55 | $ hgcloneshallow ssh://user@dummy/shallow shallow2 --noupdate |
|
56 | 56 | streaming all changes |
|
57 | 57 | 3 files to transfer, 564 bytes of data |
|
58 | 58 | transferred 564 bytes in * seconds (*/sec) (glob) |
|
59 | 59 | searching for changes |
|
60 | 60 | no changes found |
|
61 | 61 | $ cd shallow2 |
|
62 |
$ |
|
|
62 | $ hg debugrequires | |
|
63 | 63 | dotencode |
|
64 | 64 | dirstate-v2 (dirstate-v2 !) |
|
65 | 65 | exp-remotefilelog-repo-req-1 |
|
66 | 66 | fncache |
|
67 | 67 | generaldelta |
|
68 | 68 | persistent-nodemap (rust !) |
|
69 | 69 | revlog-compression-zstd (zstd !) |
|
70 | 70 | revlogv1 |
|
71 | 71 | sparserevlog |
|
72 | 72 | store |
|
73 | 73 | $ ls .hg/store/data |
|
74 | 74 | 4a0a19218e082a343a1b17e5333409af9d98f0f5 |
|
75 | 75 | |
|
76 | 76 | $ hg update |
|
77 | 77 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
78 | 78 | |
|
79 | 79 | $ cat x |
|
80 | 80 | x |
|
81 | 81 | |
|
82 | 82 | $ cd .. |
|
83 | 83 | |
|
84 | 84 | # full clone from shallow |
|
85 | 85 | |
|
86 | 86 | Note: the output to STDERR comes from a different process to the output on |
|
87 | 87 | STDOUT and their relative ordering is not deterministic. As a result, the test |
|
88 | 88 | was failing sporadically. To avoid this, we capture STDERR to a file and |
|
89 | 89 | check its contents separately. |
|
90 | 90 | |
|
91 | 91 | $ TEMP_STDERR=full-clone-from-shallow.stderr.tmp |
|
92 | 92 | $ hg clone --noupdate ssh://user@dummy/shallow full 2>$TEMP_STDERR |
|
93 | 93 | streaming all changes |
|
94 | 94 | [100] |
|
95 | 95 | $ cat $TEMP_STDERR |
|
96 | 96 | remote: abort: Cannot clone from a shallow repo to a full repo. |
|
97 | 97 | abort: pull failed on remote |
|
98 | 98 | $ rm $TEMP_STDERR |
|
99 | 99 | |
|
100 | 100 | # getbundle full clone |
|
101 | 101 | |
|
102 | 102 | $ printf '[server]\npreferuncompressed=False\n' >> master/.hg/hgrc |
|
103 | 103 | $ hgcloneshallow ssh://user@dummy/master shallow3 |
|
104 | 104 | requesting all changes |
|
105 | 105 | adding changesets |
|
106 | 106 | adding manifests |
|
107 | 107 | adding file changes |
|
108 | 108 | added 1 changesets with 0 changes to 0 files |
|
109 | 109 | new changesets b292c1e3311f |
|
110 | 110 | updating to branch default |
|
111 | 111 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 112 | |
|
113 | 113 | $ ls shallow3/.hg/store/data |
|
114 | $ cat shallow3/.hg/requires | |
|
114 | $ hg debugrequires -R shallow3/ | |
|
115 | 115 | dotencode |
|
116 | 116 | dirstate-v2 (dirstate-v2 !) |
|
117 | 117 | exp-remotefilelog-repo-req-1 |
|
118 | 118 | fncache |
|
119 | 119 | generaldelta |
|
120 | 120 | persistent-nodemap (rust !) |
|
121 | 121 | revlog-compression-zstd (zstd !) |
|
122 | 122 | revlogv1 |
|
123 | 123 | sparserevlog |
|
124 | 124 | store |
@@ -1,121 +1,121 b'' | |||
|
1 | 1 | #require no-windows |
|
2 | 2 | |
|
3 | 3 | $ . "$TESTDIR/remotefilelog-library.sh" |
|
4 | 4 | |
|
5 | 5 | $ hg init master |
|
6 | 6 | $ cd master |
|
7 | 7 | $ cat >> .hg/hgrc <<EOF |
|
8 | 8 | > [remotefilelog] |
|
9 | 9 | > server=True |
|
10 | 10 | > EOF |
|
11 | 11 | $ echo x > x |
|
12 | 12 | $ hg commit -qAm x |
|
13 | 13 | $ mkdir dir |
|
14 | 14 | $ echo y > dir/y |
|
15 | 15 | $ hg commit -qAm y |
|
16 | 16 | |
|
17 | 17 | $ cd .. |
|
18 | 18 | |
|
19 | 19 | Shallow clone from full |
|
20 | 20 | |
|
21 | 21 | $ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
|
22 | 22 | streaming all changes |
|
23 | 23 | 2 files to transfer, 473 bytes of data |
|
24 | 24 | transferred 473 bytes in * seconds (*/sec) (glob) |
|
25 | 25 | searching for changes |
|
26 | 26 | no changes found |
|
27 | 27 | $ cd shallow |
|
28 |
$ |
|
|
28 | $ hg debugrequires | |
|
29 | 29 | dotencode |
|
30 | 30 | dirstate-v2 (dirstate-v2 !) |
|
31 | 31 | exp-remotefilelog-repo-req-1 |
|
32 | 32 | fncache |
|
33 | 33 | generaldelta |
|
34 | 34 | persistent-nodemap (rust !) |
|
35 | 35 | revlog-compression-zstd (zstd !) |
|
36 | 36 | revlogv1 |
|
37 | 37 | sparserevlog |
|
38 | 38 | store |
|
39 | 39 | |
|
40 | 40 | $ hg update |
|
41 | 41 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 42 | 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob) |
|
43 | 43 | |
|
44 | 44 | Log on a file without -f |
|
45 | 45 | |
|
46 | 46 | $ hg log dir/y |
|
47 | 47 | warning: file log can be slow on large repos - use -f to speed it up |
|
48 | 48 | changeset: 1:2e73264fab97 |
|
49 | 49 | tag: tip |
|
50 | 50 | user: test |
|
51 | 51 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 | 52 | summary: y |
|
53 | 53 | |
|
54 | 54 | Log on a file with -f |
|
55 | 55 | |
|
56 | 56 | $ hg log -f dir/y |
|
57 | 57 | changeset: 1:2e73264fab97 |
|
58 | 58 | tag: tip |
|
59 | 59 | user: test |
|
60 | 60 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
61 | 61 | summary: y |
|
62 | 62 | |
|
63 | 63 | Log on a file with kind in path |
|
64 | 64 | $ hg log -r "filelog('path:dir/y')" |
|
65 | 65 | changeset: 1:2e73264fab97 |
|
66 | 66 | tag: tip |
|
67 | 67 | user: test |
|
68 | 68 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
69 | 69 | summary: y |
|
70 | 70 | |
|
71 | 71 | Log on multiple files with -f |
|
72 | 72 | |
|
73 | 73 | $ hg log -f dir/y x |
|
74 | 74 | changeset: 1:2e73264fab97 |
|
75 | 75 | tag: tip |
|
76 | 76 | user: test |
|
77 | 77 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
78 | 78 | summary: y |
|
79 | 79 | |
|
80 | 80 | changeset: 0:b292c1e3311f |
|
81 | 81 | user: test |
|
82 | 82 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
83 | 83 | summary: x |
|
84 | 84 | |
|
85 | 85 | Log on a directory |
|
86 | 86 | |
|
87 | 87 | $ hg log dir |
|
88 | 88 | changeset: 1:2e73264fab97 |
|
89 | 89 | tag: tip |
|
90 | 90 | user: test |
|
91 | 91 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
92 | 92 | summary: y |
|
93 | 93 | |
|
94 | 94 | Log on a file from inside a directory |
|
95 | 95 | |
|
96 | 96 | $ cd dir |
|
97 | 97 | $ hg log y |
|
98 | 98 | warning: file log can be slow on large repos - use -f to speed it up |
|
99 | 99 | changeset: 1:2e73264fab97 |
|
100 | 100 | tag: tip |
|
101 | 101 | user: test |
|
102 | 102 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
103 | 103 | summary: y |
|
104 | 104 | |
|
105 | 105 | Log on a file via -fr |
|
106 | 106 | $ cd .. |
|
107 | 107 | $ hg log -fr tip dir/ --template '{rev}\n' |
|
108 | 108 | 1 |
|
109 | 109 | |
|
110 | 110 | Trace renames |
|
111 | 111 | $ hg mv x z |
|
112 | 112 | $ hg commit -m move |
|
113 | 113 | $ hg log -f z -T '{desc} {file_copies}\n' -G |
|
114 | 114 | @ move z (x) |
|
115 | 115 | : |
|
116 | 116 | o x |
|
117 | 117 | |
|
118 | 118 | |
|
119 | 119 | Verify remotefilelog handles rename metadata stripping when comparing file sizes |
|
120 | 120 | $ hg debugrebuilddirstate |
|
121 | 121 | $ hg status |
@@ -1,258 +1,258 b'' | |||
|
1 | 1 | A new repository uses zlib storage, which doesn't need a requirement |
|
2 | 2 | |
|
3 | 3 | $ cat << EOF >> $HGRCPATH |
|
4 | 4 | > [format] |
|
5 | 5 | > # stabilize test accross variant |
|
6 | 6 | > revlog-compression=zlib |
|
7 | 7 | > EOF |
|
8 | 8 | |
|
9 | 9 | |
|
10 | 10 | $ hg init default |
|
11 | 11 | $ cd default |
|
12 |
$ |
|
|
12 | $ hg debugrequires | |
|
13 | 13 | dotencode |
|
14 | 14 | dirstate-v2 (dirstate-v2 !) |
|
15 | 15 | fncache |
|
16 | 16 | generaldelta |
|
17 | 17 | persistent-nodemap (rust !) |
|
18 | 18 | revlogv1 |
|
19 | 19 | sparserevlog |
|
20 | 20 | store |
|
21 | 21 | testonly-simplestore (reposimplestore !) |
|
22 | 22 | |
|
23 | 23 | $ touch foo |
|
24 | 24 | $ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text to trigger compression' |
|
25 | 25 | $ hg debugrevlog -c | grep 0x78 |
|
26 | 26 | 0x78 (x) : 1 (100.00%) |
|
27 | 27 | 0x78 (x) : 110 (100.00%) |
|
28 | 28 | |
|
29 | 29 | $ cd .. |
|
30 | 30 | |
|
31 | 31 | Unknown compression engine to format.compression aborts |
|
32 | 32 | |
|
33 | 33 | $ hg --config format.revlog-compression=unknown init unknown |
|
34 | 34 | abort: compression engines "unknown" defined by format.revlog-compression not available |
|
35 | 35 | (run "hg debuginstall" to list available compression engines) |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | unknown compression engine in a list with known one works fine |
|
39 | 39 | |
|
40 | 40 | $ hg --config format.revlog-compression=zlib,unknown init zlib-before-unknow |
|
41 | 41 | $ hg --config format.revlog-compression=unknown,zlib init unknown-before-zlib |
|
42 | 42 | |
|
43 | 43 | A requirement specifying an unknown compression engine results in bail |
|
44 | 44 | |
|
45 | 45 | $ hg init unknownrequirement |
|
46 | 46 | $ cd unknownrequirement |
|
47 | 47 | $ echo exp-compression-unknown >> .hg/requires |
|
48 | 48 | $ hg log |
|
49 | 49 | abort: repository requires features unknown to this Mercurial: exp-compression-unknown |
|
50 | 50 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
51 | 51 | [255] |
|
52 | 52 | |
|
53 | 53 | $ cd .. |
|
54 | 54 | |
|
55 | 55 | Specifying a new format.compression on an existing repo won't introduce data |
|
56 | 56 | with that engine or a requirement |
|
57 | 57 | |
|
58 | 58 | $ cd default |
|
59 | 59 | $ touch bar |
|
60 | 60 | $ hg --config format.revlog-compression=none -q commit -A -m 'add bar with a lot of repeated repeated repeated text' |
|
61 | 61 | |
|
62 |
$ |
|
|
62 | $ hg debugrequires | |
|
63 | 63 | dotencode |
|
64 | 64 | dirstate-v2 (dirstate-v2 !) |
|
65 | 65 | fncache |
|
66 | 66 | generaldelta |
|
67 | 67 | persistent-nodemap (rust !) |
|
68 | 68 | revlogv1 |
|
69 | 69 | sparserevlog |
|
70 | 70 | store |
|
71 | 71 | testonly-simplestore (reposimplestore !) |
|
72 | 72 | |
|
73 | 73 | $ hg debugrevlog -c | grep 0x78 |
|
74 | 74 | 0x78 (x) : 2 (100.00%) |
|
75 | 75 | 0x78 (x) : 199 (100.00%) |
|
76 | 76 | $ cd .. |
|
77 | 77 | |
|
78 | 78 | #if zstd |
|
79 | 79 | |
|
80 | 80 | $ hg --config format.revlog-compression=zstd init zstd |
|
81 | 81 | $ cd zstd |
|
82 |
$ |
|
|
82 | $ hg debugrequires | |
|
83 | 83 | dotencode |
|
84 | 84 | dirstate-v2 (dirstate-v2 !) |
|
85 | 85 | fncache |
|
86 | 86 | generaldelta |
|
87 | 87 | persistent-nodemap (rust !) |
|
88 | 88 | revlog-compression-zstd |
|
89 | 89 | revlogv1 |
|
90 | 90 | sparserevlog |
|
91 | 91 | store |
|
92 | 92 | testonly-simplestore (reposimplestore !) |
|
93 | 93 | |
|
94 | 94 | $ touch foo |
|
95 | 95 | $ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text' |
|
96 | 96 | |
|
97 | 97 | $ hg debugrevlog -c | grep 0x28 |
|
98 | 98 | 0x28 : 1 (100.00%) |
|
99 | 99 | 0x28 : 98 (100.00%) |
|
100 | 100 | |
|
101 | 101 | $ cd .. |
|
102 | 102 | |
|
103 | 103 | |
|
104 | 104 | #endif |
|
105 | 105 | |
|
106 | 106 | checking zlib options |
|
107 | 107 | ===================== |
|
108 | 108 | |
|
109 | 109 | $ hg init zlib-level-default |
|
110 | 110 | $ hg init zlib-level-1 |
|
111 | 111 | $ cat << EOF >> zlib-level-1/.hg/hgrc |
|
112 | 112 | > [storage] |
|
113 | 113 | > revlog.zlib.level=1 |
|
114 | 114 | > EOF |
|
115 | 115 | $ hg init zlib-level-9 |
|
116 | 116 | $ cat << EOF >> zlib-level-9/.hg/hgrc |
|
117 | 117 | > [storage] |
|
118 | 118 | > revlog.zlib.level=9 |
|
119 | 119 | > EOF |
|
120 | 120 | |
|
121 | 121 | |
|
122 | 122 | $ commitone() { |
|
123 | 123 | > repo=$1 |
|
124 | 124 | > cp $RUNTESTDIR/bundles/issue4438-r1.hg $repo/a |
|
125 | 125 | > hg -R $repo add $repo/a |
|
126 | 126 | > hg -R $repo commit -m some-commit |
|
127 | 127 | > } |
|
128 | 128 | |
|
129 | 129 | $ for repo in zlib-level-default zlib-level-1 zlib-level-9; do |
|
130 | 130 | > commitone $repo |
|
131 | 131 | > done |
|
132 | 132 | |
|
133 | 133 | $ $RUNTESTDIR/f -s */.hg/store/data/* |
|
134 | 134 | default/.hg/store/data/bar.i: size=64 |
|
135 | 135 | default/.hg/store/data/foo.i: size=64 |
|
136 | 136 | zlib-level-1/.hg/store/data/a.i: size=4146 |
|
137 | 137 | zlib-level-9/.hg/store/data/a.i: size=4138 |
|
138 | 138 | zlib-level-default/.hg/store/data/a.i: size=4138 |
|
139 | 139 | zstd/.hg/store/data/foo.i: size=64 (zstd !) |
|
140 | 140 | |
|
141 | 141 | Test error cases |
|
142 | 142 | |
|
143 | 143 | $ hg init zlib-level-invalid |
|
144 | 144 | $ cat << EOF >> zlib-level-invalid/.hg/hgrc |
|
145 | 145 | > [storage] |
|
146 | 146 | > revlog.zlib.level=foobar |
|
147 | 147 | > EOF |
|
148 | 148 | $ commitone zlib-level-invalid |
|
149 | 149 | config error: storage.revlog.zlib.level is not a valid integer ('foobar') |
|
150 | 150 | config error: storage.revlog.zlib.level is not a valid integer ('foobar') |
|
151 | 151 | [30] |
|
152 | 152 | |
|
153 | 153 | $ hg init zlib-level-out-of-range |
|
154 | 154 | $ cat << EOF >> zlib-level-out-of-range/.hg/hgrc |
|
155 | 155 | > [storage] |
|
156 | 156 | > revlog.zlib.level=42 |
|
157 | 157 | > EOF |
|
158 | 158 | |
|
159 | 159 | $ commitone zlib-level-out-of-range |
|
160 | 160 | abort: invalid value for `storage.revlog.zlib.level` config: 42 |
|
161 | 161 | abort: invalid value for `storage.revlog.zlib.level` config: 42 |
|
162 | 162 | [255] |
|
163 | 163 | |
|
164 | 164 | checking details of none compression |
|
165 | 165 | ==================================== |
|
166 | 166 | |
|
167 | 167 | $ hg init none-compression --config format.revlog-compression=none |
|
168 | 168 | |
|
169 | 169 | $ commitone() { |
|
170 | 170 | > repo=$1 |
|
171 | 171 | > cp $RUNTESTDIR/bundles/issue4438-r1.hg $repo/a |
|
172 | 172 | > hg -R $repo add $repo/a |
|
173 | 173 | > hg -R $repo commit -m some-commit |
|
174 | 174 | > } |
|
175 | 175 | |
|
176 | 176 | $ commitone none-compression |
|
177 | 177 | |
|
178 | 178 | $ hg log -R none-compression |
|
179 | 179 | changeset: 0:68b53da39cd8 |
|
180 | 180 | tag: tip |
|
181 | 181 | user: test |
|
182 | 182 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
183 | 183 | summary: some-commit |
|
184 | 184 | |
|
185 | 185 | |
|
186 | $ cat none-compression/.hg/requires | |
|
186 | $ hg debugrequires -R none-compression/ | |
|
187 | 187 | dotencode |
|
188 | 188 | exp-compression-none |
|
189 | 189 | dirstate-v2 (dirstate-v2 !) |
|
190 | 190 | fncache |
|
191 | 191 | generaldelta |
|
192 | 192 | persistent-nodemap (rust !) |
|
193 | 193 | revlogv1 |
|
194 | 194 | sparserevlog |
|
195 | 195 | store |
|
196 | 196 | testonly-simplestore (reposimplestore !) |
|
197 | 197 | |
|
198 | 198 | $ $RUNTESTDIR/f -s none-compression/.hg/store/data/* |
|
199 | 199 | none-compression/.hg/store/data/a.i: size=4216 |
|
200 | 200 | |
|
201 | 201 | #if zstd |
|
202 | 202 | |
|
203 | 203 | checking zstd options |
|
204 | 204 | ===================== |
|
205 | 205 | |
|
206 | 206 | $ hg init zstd-level-default --config format.revlog-compression=zstd |
|
207 | 207 | $ hg init zstd-level-1 --config format.revlog-compression=zstd |
|
208 | 208 | $ cat << EOF >> zstd-level-1/.hg/hgrc |
|
209 | 209 | > [storage] |
|
210 | 210 | > revlog.zstd.level=1 |
|
211 | 211 | > EOF |
|
212 | 212 | $ hg init zstd-level-22 --config format.revlog-compression=zstd |
|
213 | 213 | $ cat << EOF >> zstd-level-22/.hg/hgrc |
|
214 | 214 | > [storage] |
|
215 | 215 | > revlog.zstd.level=22 |
|
216 | 216 | > EOF |
|
217 | 217 | |
|
218 | 218 | |
|
219 | 219 | $ commitone() { |
|
220 | 220 | > repo=$1 |
|
221 | 221 | > cp $RUNTESTDIR/bundles/issue4438-r1.hg $repo/a |
|
222 | 222 | > hg -R $repo add $repo/a |
|
223 | 223 | > hg -R $repo commit -m some-commit |
|
224 | 224 | > } |
|
225 | 225 | |
|
226 | 226 | $ for repo in zstd-level-default zstd-level-1 zstd-level-22; do |
|
227 | 227 | > commitone $repo |
|
228 | 228 | > done |
|
229 | 229 | |
|
230 | 230 | $ $RUNTESTDIR/f -s zstd-*/.hg/store/data/* |
|
231 | 231 | zstd-level-1/.hg/store/data/a.i: size=4114 |
|
232 | 232 | zstd-level-22/.hg/store/data/a.i: size=4091 |
|
233 | 233 | zstd-level-default/\.hg/store/data/a\.i: size=(4094|4102) (re) |
|
234 | 234 | |
|
235 | 235 | Test error cases |
|
236 | 236 | |
|
237 | 237 | $ hg init zstd-level-invalid --config format.revlog-compression=zstd |
|
238 | 238 | $ cat << EOF >> zstd-level-invalid/.hg/hgrc |
|
239 | 239 | > [storage] |
|
240 | 240 | > revlog.zstd.level=foobar |
|
241 | 241 | > EOF |
|
242 | 242 | $ commitone zstd-level-invalid |
|
243 | 243 | config error: storage.revlog.zstd.level is not a valid integer ('foobar') |
|
244 | 244 | config error: storage.revlog.zstd.level is not a valid integer ('foobar') |
|
245 | 245 | [30] |
|
246 | 246 | |
|
247 | 247 | $ hg init zstd-level-out-of-range --config format.revlog-compression=zstd |
|
248 | 248 | $ cat << EOF >> zstd-level-out-of-range/.hg/hgrc |
|
249 | 249 | > [storage] |
|
250 | 250 | > revlog.zstd.level=42 |
|
251 | 251 | > EOF |
|
252 | 252 | |
|
253 | 253 | $ commitone zstd-level-out-of-range |
|
254 | 254 | abort: invalid value for `storage.revlog.zstd.level` config: 42 |
|
255 | 255 | abort: invalid value for `storage.revlog.zstd.level` config: 42 |
|
256 | 256 | [255] |
|
257 | 257 | |
|
258 | 258 | #endif |
@@ -1,139 +1,139 b'' | |||
|
1 | 1 | #require reporevlogstore |
|
2 | 2 | |
|
3 | 3 | A repo with unknown revlogv2 requirement string cannot be opened |
|
4 | 4 | |
|
5 | 5 | $ hg init invalidreq |
|
6 | 6 | $ cd invalidreq |
|
7 | 7 | $ echo exp-revlogv2.unknown >> .hg/requires |
|
8 | 8 | $ hg log |
|
9 | 9 | abort: repository requires features unknown to this Mercurial: exp-revlogv2.unknown |
|
10 | 10 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
11 | 11 | [255] |
|
12 | 12 | $ cd .. |
|
13 | 13 | |
|
14 | 14 | Can create and open repo with revlog v2 requirement |
|
15 | 15 | |
|
16 | 16 | $ cat >> $HGRCPATH << EOF |
|
17 | 17 | > [experimental] |
|
18 | 18 | > revlogv2 = enable-unstable-format-and-corrupt-my-data |
|
19 | 19 | > EOF |
|
20 | 20 | |
|
21 | 21 | $ hg init new-repo |
|
22 | 22 | $ cd new-repo |
|
23 |
$ |
|
|
23 | $ hg debugrequires | |
|
24 | 24 | dotencode |
|
25 | 25 | dirstate-v2 (dirstate-v2 !) |
|
26 | 26 | exp-revlogv2.2 |
|
27 | 27 | fncache |
|
28 | 28 | generaldelta |
|
29 | 29 | persistent-nodemap (rust !) |
|
30 | 30 | revlog-compression-zstd (zstd !) |
|
31 | 31 | sparserevlog |
|
32 | 32 | store |
|
33 | 33 | |
|
34 | 34 | $ hg log |
|
35 | 35 | |
|
36 | 36 | Unknown flags to revlog are rejected |
|
37 | 37 | |
|
38 | 38 | >>> with open('.hg/store/00changelog.i', 'wb') as fh: |
|
39 | 39 | ... fh.write(b'\xff\x00\xde\xad') and None |
|
40 | 40 | |
|
41 | 41 | $ hg log |
|
42 | 42 | abort: unknown flags (0xff00) in version 57005 revlog 00changelog |
|
43 | 43 | [50] |
|
44 | 44 | |
|
45 | 45 | $ cd .. |
|
46 | 46 | |
|
47 | 47 | Writing a simple revlog v2 works |
|
48 | 48 | |
|
49 | 49 | $ hg init simple |
|
50 | 50 | $ cd simple |
|
51 | 51 | $ touch foo |
|
52 | 52 | $ hg -q commit -A -m initial |
|
53 | 53 | |
|
54 | 54 | $ hg log |
|
55 | 55 | changeset: 0:96ee1d7354c4 |
|
56 | 56 | tag: tip |
|
57 | 57 | user: test |
|
58 | 58 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
59 | 59 | summary: initial |
|
60 | 60 | |
|
61 | 61 | |
|
62 | 62 | Header written as expected |
|
63 | 63 | |
|
64 | 64 | $ f --hexdump --bytes 4 .hg/store/00changelog.i |
|
65 | 65 | .hg/store/00changelog.i: |
|
66 | 66 | 0000: 00 00 de ad |....| |
|
67 | 67 | |
|
68 | 68 | $ f --hexdump --bytes 4 .hg/store/data/foo.i |
|
69 | 69 | .hg/store/data/foo.i: |
|
70 | 70 | 0000: 00 00 de ad |....| |
|
71 | 71 | |
|
72 | 72 | Bundle use a compatible changegroup format |
|
73 | 73 | ------------------------------------------ |
|
74 | 74 | |
|
75 | 75 | $ hg bundle --all ../basic.hg |
|
76 | 76 | 1 changesets found |
|
77 | 77 | $ hg debugbundle --spec ../basic.hg |
|
78 | 78 | bzip2-v2 |
|
79 | 79 | |
|
80 | 80 | The expected files are generated |
|
81 | 81 | -------------------------------- |
|
82 | 82 | |
|
83 | 83 | We should have have: |
|
84 | 84 | - a docket |
|
85 | 85 | - a index file with a unique name |
|
86 | 86 | - a data file |
|
87 | 87 | |
|
88 | 88 | $ ls .hg/store/00changelog* .hg/store/00manifest* |
|
89 | 89 | .hg/store/00changelog-1335303a.sda |
|
90 | 90 | .hg/store/00changelog-6b8ab34b.idx |
|
91 | 91 | .hg/store/00changelog-b875dfc5.dat |
|
92 | 92 | .hg/store/00changelog.i |
|
93 | 93 | .hg/store/00manifest-05a21d65.idx |
|
94 | 94 | .hg/store/00manifest-43c37dde.dat |
|
95 | 95 | .hg/store/00manifest-e2c9362a.sda |
|
96 | 96 | .hg/store/00manifest.i |
|
97 | 97 | |
|
98 | 98 | Local clone works |
|
99 | 99 | ----------------- |
|
100 | 100 | |
|
101 | 101 | $ hg clone . ../cloned-repo |
|
102 | 102 | updating to branch default |
|
103 | 103 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 104 | $ hg tip | tee ../tip-new |
|
105 | 105 | changeset: 0:96ee1d7354c4 |
|
106 | 106 | tag: tip |
|
107 | 107 | user: test |
|
108 | 108 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
109 | 109 | summary: initial |
|
110 | 110 | |
|
111 | 111 | $ hg tip -R ../cloned-repo | tee ../tip-cloned |
|
112 | 112 | changeset: 0:96ee1d7354c4 |
|
113 | 113 | tag: tip |
|
114 | 114 | user: test |
|
115 | 115 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
116 | 116 | summary: initial |
|
117 | 117 | |
|
118 | 118 | |
|
119 | 119 | The two repository should be identical, this diff MUST be empty |
|
120 | 120 | |
|
121 | 121 | $ cmp ../tip-new ../tip-cloned || diff -U8 ../tip-new ../tip-cloned |
|
122 | 122 | |
|
123 | 123 | |
|
124 | 124 | hg verify should be happy |
|
125 | 125 | ------------------------- |
|
126 | 126 | |
|
127 | 127 | $ hg verify |
|
128 | 128 | checking changesets |
|
129 | 129 | checking manifests |
|
130 | 130 | crosschecking files in changesets and manifests |
|
131 | 131 | checking files |
|
132 | 132 | checked 1 changesets with 1 changes to 1 files |
|
133 | 133 | |
|
134 | 134 | $ hg verify -R ../cloned-repo |
|
135 | 135 | checking changesets |
|
136 | 136 | checking manifests |
|
137 | 137 | crosschecking files in changesets and manifests |
|
138 | 138 | checking files |
|
139 | 139 | checked 1 changesets with 1 changes to 1 files |
@@ -1,286 +1,286 b'' | |||
|
1 | 1 | #testcases safe normal |
|
2 | 2 | |
|
3 | 3 | #if safe |
|
4 | 4 | $ echo "[format]" >> $HGRCPATH |
|
5 | 5 | $ echo "use-share-safe = True" >> $HGRCPATH |
|
6 | 6 | #endif |
|
7 | 7 | |
|
8 | 8 | $ echo "[extensions]" >> $HGRCPATH |
|
9 | 9 | $ echo "share = " >> $HGRCPATH |
|
10 | 10 | |
|
11 | 11 | prepare repo1 |
|
12 | 12 | |
|
13 | 13 | $ hg init repo1 |
|
14 | 14 | $ cd repo1 |
|
15 | 15 | $ echo a > a |
|
16 | 16 | $ hg commit -A -m'init' |
|
17 | 17 | adding a |
|
18 | 18 | |
|
19 | 19 | share it |
|
20 | 20 | |
|
21 | 21 | $ cd .. |
|
22 | 22 | $ hg share repo1 repo2 |
|
23 | 23 | updating working directory |
|
24 | 24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
25 | 25 | |
|
26 | 26 | share shouldn't have a store dir |
|
27 | 27 | |
|
28 | 28 | $ cd repo2 |
|
29 | 29 | $ test -d .hg/store |
|
30 | 30 | [1] |
|
31 | 31 | $ hg root -Tjson | sed 's|\\\\|\\|g' |
|
32 | 32 | [ |
|
33 | 33 | { |
|
34 | 34 | "hgpath": "$TESTTMP/repo2/.hg", |
|
35 | 35 | "reporoot": "$TESTTMP/repo2", |
|
36 | 36 | "storepath": "$TESTTMP/repo1/.hg/store" |
|
37 | 37 | } |
|
38 | 38 | ] |
|
39 | 39 | |
|
40 | 40 | share shouldn't have a full cache dir, original repo should |
|
41 | 41 | |
|
42 | 42 | $ hg branches |
|
43 | 43 | default 0:d3873e73d99e |
|
44 | 44 | $ hg tags |
|
45 | 45 | tip 0:d3873e73d99e |
|
46 | 46 | $ test -d .hg/cache |
|
47 | 47 | [1] |
|
48 | 48 | $ ls -1 .hg/wcache || true |
|
49 | 49 | checkisexec (execbit !) |
|
50 | 50 | checklink (symlink no-rust !) |
|
51 | 51 | checklink-target (symlink no-rust !) |
|
52 | 52 | manifestfulltextcache (reporevlogstore !) |
|
53 | 53 | $ ls -1 ../repo1/.hg/cache |
|
54 | 54 | branch2-served |
|
55 | 55 | rbc-names-v1 |
|
56 | 56 | rbc-revs-v1 |
|
57 | 57 | tags2-visible |
|
58 | 58 | |
|
59 | 59 | Cloning a shared repo should pick up the full cache dir on the other hand. |
|
60 | 60 | |
|
61 | 61 | $ hg clone . ../repo2-clone |
|
62 | 62 | updating to branch default |
|
63 | 63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 64 | $ ls -1 ../repo2-clone/.hg/cache |
|
65 | 65 | branch2-base |
|
66 | 66 | branch2-immutable |
|
67 | 67 | branch2-served |
|
68 | 68 | branch2-served.hidden |
|
69 | 69 | branch2-visible |
|
70 | 70 | branch2-visible-hidden |
|
71 | 71 | rbc-names-v1 |
|
72 | 72 | rbc-revs-v1 |
|
73 | 73 | tags2 |
|
74 | 74 | tags2-served |
|
75 | 75 | tags2-visible |
|
76 | 76 | |
|
77 | 77 | Some sed versions appends newline, some don't, and some just fails |
|
78 | 78 | |
|
79 | 79 | $ cat .hg/sharedpath; echo |
|
80 | 80 | $TESTTMP/repo1/.hg |
|
81 | 81 | |
|
82 | 82 | trailing newline on .hg/sharedpath is ok |
|
83 | 83 | $ hg tip -q |
|
84 | 84 | 0:d3873e73d99e |
|
85 | 85 | $ echo '' >> .hg/sharedpath |
|
86 | 86 | $ cat .hg/sharedpath |
|
87 | 87 | $TESTTMP/repo1/.hg |
|
88 | 88 | $ hg tip -q |
|
89 | 89 | 0:d3873e73d99e |
|
90 | 90 | |
|
91 | 91 | commit in shared clone |
|
92 | 92 | |
|
93 | 93 | $ echo a >> a |
|
94 | 94 | $ hg commit -m'change in shared clone' |
|
95 | 95 | |
|
96 | 96 | check original |
|
97 | 97 | |
|
98 | 98 | $ cd ../repo1 |
|
99 | 99 | $ hg log |
|
100 | 100 | changeset: 1:8af4dc49db9e |
|
101 | 101 | tag: tip |
|
102 | 102 | user: test |
|
103 | 103 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
104 | 104 | summary: change in shared clone |
|
105 | 105 | |
|
106 | 106 | changeset: 0:d3873e73d99e |
|
107 | 107 | user: test |
|
108 | 108 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
109 | 109 | summary: init |
|
110 | 110 | |
|
111 | 111 | $ hg update |
|
112 | 112 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 113 | $ cat a # should be two lines of "a" |
|
114 | 114 | a |
|
115 | 115 | a |
|
116 | 116 | |
|
117 | 117 | commit in original |
|
118 | 118 | |
|
119 | 119 | $ echo b > b |
|
120 | 120 | $ hg commit -A -m'another file' |
|
121 | 121 | adding b |
|
122 | 122 | |
|
123 | 123 | check in shared clone |
|
124 | 124 | |
|
125 | 125 | $ cd ../repo2 |
|
126 | 126 | $ hg log |
|
127 | 127 | changeset: 2:c2e0ac586386 |
|
128 | 128 | tag: tip |
|
129 | 129 | user: test |
|
130 | 130 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
131 | 131 | summary: another file |
|
132 | 132 | |
|
133 | 133 | changeset: 1:8af4dc49db9e |
|
134 | 134 | user: test |
|
135 | 135 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
136 | 136 | summary: change in shared clone |
|
137 | 137 | |
|
138 | 138 | changeset: 0:d3873e73d99e |
|
139 | 139 | user: test |
|
140 | 140 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
141 | 141 | summary: init |
|
142 | 142 | |
|
143 | 143 | $ hg update |
|
144 | 144 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 145 | $ cat b # should exist with one "b" |
|
146 | 146 | b |
|
147 | 147 | |
|
148 | 148 | hg serve shared clone |
|
149 | 149 | |
|
150 | 150 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid |
|
151 | 151 | $ cat hg.pid >> $DAEMON_PIDS |
|
152 | 152 | $ get-with-headers.py localhost:$HGPORT 'raw-file/' |
|
153 | 153 | 200 Script output follows |
|
154 | 154 | |
|
155 | 155 | |
|
156 | 156 | -rw-r--r-- 4 a |
|
157 | 157 | -rw-r--r-- 2 b |
|
158 | 158 | |
|
159 | 159 | |
|
160 | 160 | Cloning a shared repo via bundle2 results in a non-shared clone |
|
161 | 161 | |
|
162 | 162 | $ cd .. |
|
163 | 163 | $ hg clone -q --stream ssh://user@dummy/`pwd`/repo2 cloned-via-bundle2 |
|
164 |
$ |
|
|
164 | $ hg -R cloned-via-bundle2 debugrequires | grep "shared" | |
|
165 | 165 | [1] |
|
166 | 166 | $ hg id --cwd cloned-via-bundle2 -r tip |
|
167 | 167 | c2e0ac586386 tip |
|
168 | 168 | $ cd repo2 |
|
169 | 169 | |
|
170 | 170 | test unshare command |
|
171 | 171 | |
|
172 | 172 | $ hg unshare |
|
173 | 173 | $ test -d .hg/store |
|
174 | 174 | $ test -f .hg/sharedpath |
|
175 | 175 | [1] |
|
176 | 176 | $ grep shared .hg/requires |
|
177 | 177 | [1] |
|
178 | 178 | $ hg unshare |
|
179 | 179 | abort: this is not a shared repo |
|
180 | 180 | [255] |
|
181 | 181 | |
|
182 | 182 | check that a change does not propagate |
|
183 | 183 | |
|
184 | 184 | $ echo b >> b |
|
185 | 185 | $ hg commit -m'change in unshared' |
|
186 | 186 | $ cd ../repo1 |
|
187 | 187 | $ hg id -r tip |
|
188 | 188 | c2e0ac586386 tip |
|
189 | 189 | |
|
190 | 190 | $ cd .. |
|
191 | 191 | |
|
192 | 192 | |
|
193 | 193 | non largefiles repos won't enable largefiles |
|
194 | 194 | |
|
195 | 195 | $ hg share --config extensions.largefiles= repo2 sharedrepo |
|
196 | 196 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
197 | 197 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
198 | 198 | updating working directory |
|
199 | 199 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
200 | 200 | $ [ -f sharedrepo/.hg/hgrc ] |
|
201 | 201 | [1] |
|
202 | 202 | |
|
203 | 203 | test shared clones using relative paths work |
|
204 | 204 | |
|
205 | 205 | $ mkdir thisdir |
|
206 | 206 | $ hg init thisdir/orig |
|
207 | 207 | $ hg share -U thisdir/orig thisdir/abs |
|
208 | 208 | $ hg share -U --relative thisdir/abs thisdir/rel |
|
209 | 209 | $ cat thisdir/rel/.hg/sharedpath |
|
210 | 210 | ../../orig/.hg (no-eol) |
|
211 | 211 | $ grep shared thisdir/*/.hg/requires |
|
212 | 212 | thisdir/abs/.hg/requires:shared |
|
213 | 213 | thisdir/rel/.hg/requires:relshared |
|
214 | 214 | thisdir/rel/.hg/requires:shared |
|
215 | 215 | |
|
216 | 216 | test that relative shared paths aren't relative to $PWD |
|
217 | 217 | |
|
218 | 218 | $ cd thisdir |
|
219 | 219 | $ hg -R rel root |
|
220 | 220 | $TESTTMP/thisdir/rel |
|
221 | 221 | $ cd .. |
|
222 | 222 | |
|
223 | 223 | now test that relative paths really are relative, survive across |
|
224 | 224 | renames and changes of PWD |
|
225 | 225 | |
|
226 | 226 | $ hg -R thisdir/abs root |
|
227 | 227 | $TESTTMP/thisdir/abs |
|
228 | 228 | $ hg -R thisdir/rel root |
|
229 | 229 | $TESTTMP/thisdir/rel |
|
230 | 230 | $ mv thisdir thatdir |
|
231 | 231 | $ hg -R thatdir/abs root |
|
232 | 232 | abort: .hg/sharedpath points to nonexistent directory $TESTTMP/thisdir/orig/.hg |
|
233 | 233 | [255] |
|
234 | 234 | $ hg -R thatdir/rel root |
|
235 | 235 | $TESTTMP/thatdir/rel |
|
236 | 236 | |
|
237 | 237 | test unshare relshared repo |
|
238 | 238 | |
|
239 | 239 | $ cd thatdir/rel |
|
240 | 240 | $ hg unshare |
|
241 | 241 | $ test -d .hg/store |
|
242 | 242 | $ test -f .hg/sharedpath |
|
243 | 243 | [1] |
|
244 | 244 | $ grep shared .hg/requires |
|
245 | 245 | [1] |
|
246 | 246 | $ hg unshare |
|
247 | 247 | abort: this is not a shared repo |
|
248 | 248 | [255] |
|
249 | 249 | $ cd ../.. |
|
250 | 250 | |
|
251 | 251 | $ rm -r thatdir |
|
252 | 252 | |
|
253 | 253 | Demonstrate buggy behavior around requirements validation |
|
254 | 254 | See comment in localrepo.py:makelocalrepository() for more. |
|
255 | 255 | |
|
256 | 256 | $ hg init sharenewrequires |
|
257 | 257 | $ hg share sharenewrequires shareoldrequires |
|
258 | 258 | updating working directory |
|
259 | 259 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
260 | 260 | |
|
261 | 261 | $ cat >> sharenewrequires/.hg/requires << EOF |
|
262 | 262 | > missing-requirement |
|
263 | 263 | > EOF |
|
264 | 264 | |
|
265 | 265 | We cannot open the repo with the unknown requirement |
|
266 | 266 | |
|
267 | 267 | $ hg -R sharenewrequires status |
|
268 | 268 | abort: repository requires features unknown to this Mercurial: missing-requirement |
|
269 | 269 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
270 | 270 | [255] |
|
271 | 271 | |
|
272 | 272 | BUG: we don't get the same error when opening the shared repo pointing to it |
|
273 | 273 | |
|
274 | 274 | $ hg -R shareoldrequires status |
|
275 | 275 | |
|
276 | 276 | Explicitly kill daemons to let the test exit on Windows |
|
277 | 277 | |
|
278 | 278 | $ killdaemons.py |
|
279 | 279 | |
|
280 | 280 | Test sharing a repository which was created with store requirement disable |
|
281 | 281 | |
|
282 | 282 | $ hg init nostore --config format.usestore=false |
|
283 | 283 | ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !) |
|
284 | 284 | $ hg share nostore sharednostore |
|
285 | 285 | abort: cannot create shared repository as source was created with 'format.usestore' config disabled |
|
286 | 286 | [255] |
@@ -1,81 +1,81 b'' | |||
|
1 | 1 | $ hg init repo |
|
2 | 2 | $ cd repo |
|
3 | 3 | |
|
4 | 4 | $ touch a.html b.html c.py d.py |
|
5 | 5 | |
|
6 | 6 | $ cat > frontend.sparse << EOF |
|
7 | 7 | > [include] |
|
8 | 8 | > *.html |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | $ hg -q commit -A -m initial |
|
12 | 12 | |
|
13 | 13 | $ echo 1 > a.html |
|
14 | 14 | $ echo 1 > c.py |
|
15 | 15 | $ hg commit -m 'commit 1' |
|
16 | 16 | |
|
17 | 17 | Enable sparse profile |
|
18 | 18 | |
|
19 |
$ |
|
|
19 | $ hg debugrequires | |
|
20 | 20 | dotencode |
|
21 | 21 | dirstate-v2 (dirstate-v2 !) |
|
22 | 22 | fncache |
|
23 | 23 | generaldelta |
|
24 | 24 | persistent-nodemap (rust !) |
|
25 | 25 | revlog-compression-zstd (zstd !) |
|
26 | 26 | revlogv1 |
|
27 | 27 | sparserevlog |
|
28 | 28 | store |
|
29 | 29 | testonly-simplestore (reposimplestore !) |
|
30 | 30 | |
|
31 | 31 | $ hg debugsparse --config extensions.sparse= --enable-profile frontend.sparse |
|
32 | 32 | $ ls -A |
|
33 | 33 | .hg |
|
34 | 34 | a.html |
|
35 | 35 | b.html |
|
36 | 36 | |
|
37 | 37 | Requirement for sparse added when sparse is enabled |
|
38 | 38 | |
|
39 | $ cat .hg/requires | |
|
39 | $ hg debugrequires --config extensions.sparse= | |
|
40 | 40 | dotencode |
|
41 | 41 | dirstate-v2 (dirstate-v2 !) |
|
42 | 42 | exp-sparse |
|
43 | 43 | fncache |
|
44 | 44 | generaldelta |
|
45 | 45 | persistent-nodemap (rust !) |
|
46 | 46 | revlog-compression-zstd (zstd !) |
|
47 | 47 | revlogv1 |
|
48 | 48 | sparserevlog |
|
49 | 49 | store |
|
50 | 50 | testonly-simplestore (reposimplestore !) |
|
51 | 51 | |
|
52 | 52 | Client without sparse enabled reacts properly |
|
53 | 53 | |
|
54 | 54 | $ hg files |
|
55 | 55 | abort: repository is using sparse feature but sparse is not enabled; enable the "sparse" extensions to access |
|
56 | 56 | [255] |
|
57 | 57 | |
|
58 | 58 | Requirement for sparse is removed when sparse is disabled |
|
59 | 59 | |
|
60 | 60 | $ hg debugsparse --reset --config extensions.sparse= |
|
61 | 61 | |
|
62 |
$ |
|
|
62 | $ hg debugrequires | |
|
63 | 63 | dotencode |
|
64 | 64 | dirstate-v2 (dirstate-v2 !) |
|
65 | 65 | fncache |
|
66 | 66 | generaldelta |
|
67 | 67 | persistent-nodemap (rust !) |
|
68 | 68 | revlog-compression-zstd (zstd !) |
|
69 | 69 | revlogv1 |
|
70 | 70 | sparserevlog |
|
71 | 71 | store |
|
72 | 72 | testonly-simplestore (reposimplestore !) |
|
73 | 73 | |
|
74 | 74 | And client without sparse can access |
|
75 | 75 | |
|
76 | 76 | $ hg files |
|
77 | 77 | a.html |
|
78 | 78 | b.html |
|
79 | 79 | c.py |
|
80 | 80 | d.py |
|
81 | 81 | frontend.sparse |
@@ -1,131 +1,131 b'' | |||
|
1 | 1 | #require sqlite no-chg |
|
2 | 2 | |
|
3 | 3 | The sqlitestore backend leaves transactions around when used with chg. |
|
4 | 4 | Since this backend is primarily intended as proof-of-concept for |
|
5 | 5 | alternative storage backends, disable it for chg test runs to avoid |
|
6 | 6 | the instability. |
|
7 | 7 | |
|
8 | 8 | $ cat >> $HGRCPATH <<EOF |
|
9 | 9 | > [extensions] |
|
10 | 10 | > sqlitestore = |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | New repo should not use SQLite by default |
|
14 | 14 | |
|
15 | 15 | $ hg init empty-no-sqlite |
|
16 | $ cat empty-no-sqlite/.hg/requires | |
|
16 | $ hg debugrequires -R empty-no-sqlite | |
|
17 | 17 | dotencode |
|
18 | 18 | dirstate-v2 (dirstate-v2 !) |
|
19 | 19 | fncache |
|
20 | 20 | generaldelta |
|
21 | 21 | persistent-nodemap (rust !) |
|
22 | 22 | revlog-compression-zstd (zstd !) |
|
23 | 23 | revlogv1 |
|
24 | 24 | sparserevlog |
|
25 | 25 | store |
|
26 | 26 | |
|
27 | 27 | storage.new-repo-backend=sqlite is recognized |
|
28 | 28 | |
|
29 | 29 | $ hg --config storage.new-repo-backend=sqlite init empty-sqlite |
|
30 | $ cat empty-sqlite/.hg/requires | |
|
30 | $ hg debugrequires -R empty-sqlite | |
|
31 | 31 | dotencode |
|
32 | 32 | dirstate-v2 (dirstate-v2 !) |
|
33 | 33 | exp-sqlite-001 |
|
34 | 34 | exp-sqlite-comp-001=zstd (zstd !) |
|
35 | 35 | exp-sqlite-comp-001=$BUNDLE2_COMPRESSIONS$ (no-zstd !) |
|
36 | 36 | fncache |
|
37 | 37 | generaldelta |
|
38 | 38 | persistent-nodemap (rust !) |
|
39 | 39 | revlog-compression-zstd (zstd !) |
|
40 | 40 | revlogv1 |
|
41 | 41 | sparserevlog |
|
42 | 42 | store |
|
43 | 43 | |
|
44 | 44 | $ cat >> $HGRCPATH << EOF |
|
45 | 45 | > [storage] |
|
46 | 46 | > new-repo-backend = sqlite |
|
47 | 47 | > EOF |
|
48 | 48 | |
|
49 | 49 | Can force compression to zlib |
|
50 | 50 | |
|
51 | 51 | $ hg --config storage.sqlite.compression=zlib init empty-zlib |
|
52 | $ cat empty-zlib/.hg/requires | |
|
52 | $ hg debugrequires -R empty-zlib | |
|
53 | 53 | dotencode |
|
54 | 54 | dirstate-v2 (dirstate-v2 !) |
|
55 | 55 | exp-sqlite-001 |
|
56 | 56 | exp-sqlite-comp-001=$BUNDLE2_COMPRESSIONS$ |
|
57 | 57 | fncache |
|
58 | 58 | generaldelta |
|
59 | 59 | persistent-nodemap (rust !) |
|
60 | 60 | revlog-compression-zstd (zstd !) |
|
61 | 61 | revlogv1 |
|
62 | 62 | sparserevlog |
|
63 | 63 | store |
|
64 | 64 | |
|
65 | 65 | Can force compression to none |
|
66 | 66 | |
|
67 | 67 | $ hg --config storage.sqlite.compression=none init empty-none |
|
68 | $ cat empty-none/.hg/requires | |
|
68 | $ hg debugrequires -R empty-none | |
|
69 | 69 | dotencode |
|
70 | 70 | dirstate-v2 (dirstate-v2 !) |
|
71 | 71 | exp-sqlite-001 |
|
72 | 72 | exp-sqlite-comp-001=none |
|
73 | 73 | fncache |
|
74 | 74 | generaldelta |
|
75 | 75 | persistent-nodemap (rust !) |
|
76 | 76 | revlog-compression-zstd (zstd !) |
|
77 | 77 | revlogv1 |
|
78 | 78 | sparserevlog |
|
79 | 79 | store |
|
80 | 80 | |
|
81 | 81 | Can make a local commit |
|
82 | 82 | |
|
83 | 83 | $ hg init local-commit |
|
84 | 84 | $ cd local-commit |
|
85 | 85 | $ echo 0 > foo |
|
86 | 86 | $ hg commit -A -m initial |
|
87 | 87 | adding foo |
|
88 | 88 | |
|
89 | 89 | That results in a row being inserted into various tables |
|
90 | 90 | |
|
91 | 91 | $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF |
|
92 | 92 | > SELECT * FROM filepath; |
|
93 | 93 | > EOF |
|
94 | 94 | 1|foo |
|
95 | 95 | |
|
96 | 96 | $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF |
|
97 | 97 | > SELECT * FROM fileindex; |
|
98 | 98 | > EOF |
|
99 | 99 | 1|1|0|-1|-1|0|0|1||6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe (esc) |
|
100 | 100 | |
|
101 | 101 | $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF |
|
102 | 102 | > SELECT * FROM delta; |
|
103 | 103 | > EOF |
|
104 | 104 | 1|1| \xd2\xaf\x8d\xd2"\x01\xdd\x8dH\xe5\xdc\xfc\xae\xd2\x81\xff\x94"\xc7|0 (esc) |
|
105 | 105 | |
|
106 | 106 | |
|
107 | 107 | Tracking multiple files works |
|
108 | 108 | |
|
109 | 109 | $ echo 1 > bar |
|
110 | 110 | $ hg commit -A -m 'add bar' |
|
111 | 111 | adding bar |
|
112 | 112 | |
|
113 | 113 | $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF |
|
114 | 114 | > SELECT * FROM filedata ORDER BY id ASC; |
|
115 | 115 | > EOF |
|
116 | 116 | 1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc) |
|
117 | 117 | 2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc) |
|
118 | 118 | |
|
119 | 119 | Multiple revisions of a file works |
|
120 | 120 | |
|
121 | 121 | $ echo a >> foo |
|
122 | 122 | $ hg commit -m 'modify foo' |
|
123 | 123 | |
|
124 | 124 | $ sqlite3 .hg/store/db.sqlite -init /dev/null << EOF |
|
125 | 125 | > SELECT * FROM filedata ORDER BY id ASC; |
|
126 | 126 | > EOF |
|
127 | 127 | 1|1|foo|0|6/\xef(L\xe2\xca\x02\xae\xcc\x8d\xe6\xd5\xe8\xa1\xc3\xaf\x05V\xfe|-1|-1|0|0|1| (esc) |
|
128 | 128 | 2|2|bar|0|\xb8\xe0/d3s\x80!\xa0e\xf9Au\xc7\xcd#\xdb_\x05\xbe|-1|-1|1|0|2| (esc) |
|
129 | 129 | 3|1|foo|1|\xdd\xb3V\xcd\xde1p@\xf7\x8e\x90\xb8*\x8b,\xe9\x0e\xd6j+|0|-1|2|0|3|1 (esc) |
|
130 | 130 | |
|
131 | 131 | $ cd .. |
@@ -1,898 +1,898 b'' | |||
|
1 | 1 | Set up repo |
|
2 | 2 | |
|
3 | 3 | $ hg --config experimental.treemanifest=True init repo |
|
4 | 4 | $ cd repo |
|
5 | 5 | |
|
6 | 6 | Requirements get set on init |
|
7 | 7 | |
|
8 | $ grep treemanifest .hg/requires | |
|
8 | $ hg debugrequires | grep treemanifest | |
|
9 | 9 | treemanifest |
|
10 | 10 | |
|
11 | 11 | Without directories, looks like any other repo |
|
12 | 12 | |
|
13 | 13 | $ echo 0 > a |
|
14 | 14 | $ echo 0 > b |
|
15 | 15 | $ hg ci -Aqm initial |
|
16 | 16 | $ hg debugdata -m 0 |
|
17 | 17 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
18 | 18 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
19 | 19 | |
|
20 | 20 | Submanifest is stored in separate revlog |
|
21 | 21 | |
|
22 | 22 | $ mkdir dir1 |
|
23 | 23 | $ echo 1 > dir1/a |
|
24 | 24 | $ echo 1 > dir1/b |
|
25 | 25 | $ echo 1 > e |
|
26 | 26 | $ hg ci -Aqm 'add dir1' |
|
27 | 27 | $ hg debugdata -m 1 |
|
28 | 28 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
29 | 29 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
30 | 30 | dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc) |
|
31 | 31 | e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
32 | 32 | $ hg debugdata --dir dir1 0 |
|
33 | 33 | a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
34 | 34 | b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
35 | 35 | |
|
36 | 36 | Can add nested directories |
|
37 | 37 | |
|
38 | 38 | $ mkdir dir1/dir1 |
|
39 | 39 | $ echo 2 > dir1/dir1/a |
|
40 | 40 | $ echo 2 > dir1/dir1/b |
|
41 | 41 | $ mkdir dir1/dir2 |
|
42 | 42 | $ echo 2 > dir1/dir2/a |
|
43 | 43 | $ echo 2 > dir1/dir2/b |
|
44 | 44 | $ hg ci -Aqm 'add dir1/dir1' |
|
45 | 45 | $ hg files -r . |
|
46 | 46 | a |
|
47 | 47 | b |
|
48 | 48 | dir1/a |
|
49 | 49 | dir1/b |
|
50 | 50 | dir1/dir1/a |
|
51 | 51 | dir1/dir1/b |
|
52 | 52 | dir1/dir2/a |
|
53 | 53 | dir1/dir2/b |
|
54 | 54 | e |
|
55 | 55 | |
|
56 | 56 | The manifest command works |
|
57 | 57 | |
|
58 | 58 | $ hg manifest |
|
59 | 59 | a |
|
60 | 60 | b |
|
61 | 61 | dir1/a |
|
62 | 62 | dir1/b |
|
63 | 63 | dir1/dir1/a |
|
64 | 64 | dir1/dir1/b |
|
65 | 65 | dir1/dir2/a |
|
66 | 66 | dir1/dir2/b |
|
67 | 67 | e |
|
68 | 68 | |
|
69 | 69 | Revision is not created for unchanged directory |
|
70 | 70 | |
|
71 | 71 | $ mkdir dir2 |
|
72 | 72 | $ echo 3 > dir2/a |
|
73 | 73 | $ hg add dir2 |
|
74 | 74 | adding dir2/a |
|
75 | 75 | $ hg debugindex --dir dir1 > before |
|
76 | 76 | $ hg ci -qm 'add dir2' |
|
77 | 77 | $ hg debugindex --dir dir1 > after |
|
78 | 78 | $ diff before after |
|
79 | 79 | $ rm before after |
|
80 | 80 | |
|
81 | 81 | Removing directory does not create an revlog entry |
|
82 | 82 | |
|
83 | 83 | $ hg rm dir1/dir1 |
|
84 | 84 | removing dir1/dir1/a |
|
85 | 85 | removing dir1/dir1/b |
|
86 | 86 | $ hg debugindex --dir dir1/dir1 > before |
|
87 | 87 | $ hg ci -qm 'remove dir1/dir1' |
|
88 | 88 | $ hg debugindex --dir dir1/dir1 > after |
|
89 | 89 | $ diff before after |
|
90 | 90 | $ rm before after |
|
91 | 91 | |
|
92 | 92 | Check that hg files (calls treemanifest.walk()) works |
|
93 | 93 | without loading all directory revlogs |
|
94 | 94 | |
|
95 | 95 | $ hg co 'desc("add dir2")' |
|
96 | 96 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
97 | 97 | $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup |
|
98 | 98 | $ hg files -r . dir1 |
|
99 | 99 | dir1/a |
|
100 | 100 | dir1/b |
|
101 | 101 | dir1/dir1/a |
|
102 | 102 | dir1/dir1/b |
|
103 | 103 | dir1/dir2/a |
|
104 | 104 | dir1/dir2/b |
|
105 | 105 | |
|
106 | 106 | Check that status between revisions works (calls treemanifest.matches()) |
|
107 | 107 | without loading all directory revlogs |
|
108 | 108 | |
|
109 | 109 | $ hg status --rev 'desc("add dir1")' --rev . dir1 |
|
110 | 110 | A dir1/dir1/a |
|
111 | 111 | A dir1/dir1/b |
|
112 | 112 | A dir1/dir2/a |
|
113 | 113 | A dir1/dir2/b |
|
114 | 114 | $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2 |
|
115 | 115 | |
|
116 | 116 | Merge creates 2-parent revision of directory revlog |
|
117 | 117 | |
|
118 | 118 | $ echo 5 > dir1/a |
|
119 | 119 | $ hg ci -Aqm 'modify dir1/a' |
|
120 | 120 | $ hg co '.^' |
|
121 | 121 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
122 | 122 | $ echo 6 > dir1/b |
|
123 | 123 | $ hg ci -Aqm 'modify dir1/b' |
|
124 | 124 | $ hg merge 'desc("modify dir1/a")' |
|
125 | 125 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
126 | 126 | (branch merge, don't forget to commit) |
|
127 | 127 | $ hg ci -m 'conflict-free merge involving dir1/' |
|
128 | 128 | $ cat dir1/a |
|
129 | 129 | 5 |
|
130 | 130 | $ cat dir1/b |
|
131 | 131 | 6 |
|
132 | 132 | $ hg debugindex --dir dir1 |
|
133 | 133 | rev linkrev nodeid p1 p2 |
|
134 | 134 | 0 1 8b3ffd73f901 000000000000 000000000000 |
|
135 | 135 | 1 2 68e9d057c5a8 8b3ffd73f901 000000000000 |
|
136 | 136 | 2 4 4698198d2624 68e9d057c5a8 000000000000 |
|
137 | 137 | 3 5 44844058ccce 68e9d057c5a8 000000000000 |
|
138 | 138 | 4 6 bf3d9b744927 68e9d057c5a8 000000000000 |
|
139 | 139 | 5 7 dde7c0af2a03 bf3d9b744927 44844058ccce |
|
140 | 140 | |
|
141 | 141 | Merge keeping directory from parent 1 does not create revlog entry. (Note that |
|
142 | 142 | dir1's manifest does change, but only because dir1/a's filelog changes.) |
|
143 | 143 | |
|
144 | 144 | $ hg co 'desc("add dir2")' |
|
145 | 145 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
146 | 146 | $ echo 8 > dir2/a |
|
147 | 147 | $ hg ci -m 'modify dir2/a' |
|
148 | 148 | created new head |
|
149 | 149 | |
|
150 | 150 | $ hg debugindex --dir dir2 > before |
|
151 | 151 | $ hg merge 'desc("modify dir1/a")' |
|
152 | 152 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
153 | 153 | (branch merge, don't forget to commit) |
|
154 | 154 | $ hg revert -r 'desc("modify dir2/a")' . |
|
155 | 155 | reverting dir1/a |
|
156 | 156 | $ hg ci -m 'merge, keeping parent 1' |
|
157 | 157 | $ hg debugindex --dir dir2 > after |
|
158 | 158 | $ diff before after |
|
159 | 159 | $ rm before after |
|
160 | 160 | |
|
161 | 161 | Merge keeping directory from parent 2 does not create revlog entry. (Note that |
|
162 | 162 | dir2's manifest does change, but only because dir2/a's filelog changes.) |
|
163 | 163 | |
|
164 | 164 | $ hg co 'desc("modify dir2/a")' |
|
165 | 165 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
166 | 166 | $ hg debugindex --dir dir1 > before |
|
167 | 167 | $ hg merge 'desc("modify dir1/a")' |
|
168 | 168 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
169 | 169 | (branch merge, don't forget to commit) |
|
170 | 170 | $ hg revert -r 'desc("modify dir1/a")' . |
|
171 | 171 | reverting dir2/a |
|
172 | 172 | $ hg ci -m 'merge, keeping parent 2' |
|
173 | 173 | created new head |
|
174 | 174 | $ hg debugindex --dir dir1 > after |
|
175 | 175 | $ diff before after |
|
176 | 176 | $ rm before after |
|
177 | 177 | |
|
178 | 178 | Create flat source repo for tests with mixed flat/tree manifests |
|
179 | 179 | |
|
180 | 180 | $ cd .. |
|
181 | 181 | $ hg init repo-flat |
|
182 | 182 | $ cd repo-flat |
|
183 | 183 | |
|
184 | 184 | Create a few commits with flat manifest |
|
185 | 185 | |
|
186 | 186 | $ echo 0 > a |
|
187 | 187 | $ echo 0 > b |
|
188 | 188 | $ echo 0 > e |
|
189 | 189 | $ for d in dir1 dir1/dir1 dir1/dir2 dir2 |
|
190 | 190 | > do |
|
191 | 191 | > mkdir $d |
|
192 | 192 | > echo 0 > $d/a |
|
193 | 193 | > echo 0 > $d/b |
|
194 | 194 | > done |
|
195 | 195 | $ hg ci -Aqm initial |
|
196 | 196 | |
|
197 | 197 | $ echo 1 > a |
|
198 | 198 | $ echo 1 > dir1/a |
|
199 | 199 | $ echo 1 > dir1/dir1/a |
|
200 | 200 | $ hg ci -Aqm 'modify on branch 1' |
|
201 | 201 | |
|
202 | 202 | $ hg co 0 |
|
203 | 203 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
204 | 204 | $ echo 2 > b |
|
205 | 205 | $ echo 2 > dir1/b |
|
206 | 206 | $ echo 2 > dir1/dir1/b |
|
207 | 207 | $ hg ci -Aqm 'modify on branch 2' |
|
208 | 208 | |
|
209 | 209 | $ hg merge 1 |
|
210 | 210 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
211 | 211 | (branch merge, don't forget to commit) |
|
212 | 212 | $ hg ci -m 'merge of flat manifests to new flat manifest' |
|
213 | 213 | |
|
214 | 214 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log |
|
215 | 215 | $ cat hg.pid >> $DAEMON_PIDS |
|
216 | 216 | |
|
217 | 217 | Create clone with tree manifests enabled |
|
218 | 218 | |
|
219 | 219 | $ cd .. |
|
220 | 220 | $ hg clone --config experimental.treemanifest=1 \ |
|
221 | 221 | > http://localhost:$HGPORT repo-mixed -r 1 |
|
222 | 222 | adding changesets |
|
223 | 223 | adding manifests |
|
224 | 224 | adding file changes |
|
225 | 225 | added 2 changesets with 14 changes to 11 files |
|
226 | 226 | new changesets 5b02a3e8db7e:581ef6037d8b |
|
227 | 227 | updating to branch default |
|
228 | 228 | 11 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
229 | 229 | $ cd repo-mixed |
|
230 | 230 | $ test -d .hg/store/meta |
|
231 | 231 | [1] |
|
232 | $ grep treemanifest .hg/requires | |
|
232 | $ hg debugrequires | grep treemanifest | |
|
233 | 233 | treemanifest |
|
234 | 234 | |
|
235 | 235 | Should be possible to push updates from flat to tree manifest repo |
|
236 | 236 | |
|
237 | 237 | $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed |
|
238 | 238 | pushing to ssh://user@dummy/repo-mixed |
|
239 | 239 | searching for changes |
|
240 | 240 | remote: adding changesets |
|
241 | 241 | remote: adding manifests |
|
242 | 242 | remote: adding file changes |
|
243 | 243 | remote: added 2 changesets with 3 changes to 3 files |
|
244 | 244 | |
|
245 | 245 | Commit should store revlog per directory |
|
246 | 246 | |
|
247 | 247 | $ hg co 1 |
|
248 | 248 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
249 | 249 | $ echo 3 > a |
|
250 | 250 | $ echo 3 > dir1/a |
|
251 | 251 | $ echo 3 > dir1/dir1/a |
|
252 | 252 | $ hg ci -m 'first tree' |
|
253 | 253 | created new head |
|
254 | 254 | $ find .hg/store/meta | sort |
|
255 | 255 | .hg/store/meta |
|
256 | 256 | .hg/store/meta/dir1 |
|
257 | 257 | .hg/store/meta/dir1/00manifest.i |
|
258 | 258 | .hg/store/meta/dir1/dir1 |
|
259 | 259 | .hg/store/meta/dir1/dir1/00manifest.i |
|
260 | 260 | .hg/store/meta/dir1/dir2 |
|
261 | 261 | .hg/store/meta/dir1/dir2/00manifest.i |
|
262 | 262 | .hg/store/meta/dir2 |
|
263 | 263 | .hg/store/meta/dir2/00manifest.i |
|
264 | 264 | |
|
265 | 265 | Merge of two trees |
|
266 | 266 | |
|
267 | 267 | $ hg co 2 |
|
268 | 268 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
269 | 269 | $ hg merge 1 |
|
270 | 270 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
271 | 271 | (branch merge, don't forget to commit) |
|
272 | 272 | $ hg ci -m 'merge of flat manifests to new tree manifest' |
|
273 | 273 | created new head |
|
274 | 274 | $ hg diff -r 3 |
|
275 | 275 | |
|
276 | 276 | Parent of tree root manifest should be flat manifest, and two for merge |
|
277 | 277 | |
|
278 | 278 | $ hg debugindex -m |
|
279 | 279 | rev linkrev nodeid p1 p2 |
|
280 | 280 | 0 0 40536115ed9e 000000000000 000000000000 |
|
281 | 281 | 1 1 f3376063c255 40536115ed9e 000000000000 |
|
282 | 282 | 2 2 5d9b9da231a2 40536115ed9e 000000000000 |
|
283 | 283 | 3 3 d17d663cbd8a 5d9b9da231a2 f3376063c255 |
|
284 | 284 | 4 4 51e32a8c60ee f3376063c255 000000000000 |
|
285 | 285 | 5 5 cc5baa78b230 5d9b9da231a2 f3376063c255 |
|
286 | 286 | |
|
287 | 287 | |
|
288 | 288 | Status across flat/tree boundary should work |
|
289 | 289 | |
|
290 | 290 | $ hg status --rev '.^' --rev . |
|
291 | 291 | M a |
|
292 | 292 | M dir1/a |
|
293 | 293 | M dir1/dir1/a |
|
294 | 294 | |
|
295 | 295 | |
|
296 | 296 | Turning off treemanifest config has no effect |
|
297 | 297 | |
|
298 | 298 | $ hg debugindex --dir dir1 |
|
299 | 299 | rev linkrev nodeid p1 p2 |
|
300 | 300 | 0 4 064927a0648a 000000000000 000000000000 |
|
301 | 301 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
302 | 302 | $ echo 2 > dir1/a |
|
303 | 303 | $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a' |
|
304 | 304 | $ hg debugindex --dir dir1 |
|
305 | 305 | rev linkrev nodeid p1 p2 |
|
306 | 306 | 0 4 064927a0648a 000000000000 000000000000 |
|
307 | 307 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
308 | 308 | 2 6 5b16163a30c6 25ecb8cb8618 000000000000 |
|
309 | 309 | |
|
310 | 310 | Stripping and recovering changes should work |
|
311 | 311 | |
|
312 | 312 | $ hg st --change tip |
|
313 | 313 | M dir1/a |
|
314 | 314 | $ hg --config extensions.strip= strip tip |
|
315 | 315 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
316 | 316 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg |
|
317 | 317 | $ hg debugindex --dir dir1 |
|
318 | 318 | rev linkrev nodeid p1 p2 |
|
319 | 319 | 0 4 064927a0648a 000000000000 000000000000 |
|
320 | 320 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
321 | 321 | |
|
322 | 322 | #if repobundlerepo |
|
323 | 323 | $ hg incoming .hg/strip-backup/* |
|
324 | 324 | comparing with .hg/strip-backup/*-backup.hg (glob) |
|
325 | 325 | searching for changes |
|
326 | 326 | changeset: 6:51cfd7b1e13b |
|
327 | 327 | tag: tip |
|
328 | 328 | user: test |
|
329 | 329 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
330 | 330 | summary: modify dir1/a |
|
331 | 331 | |
|
332 | 332 | #endif |
|
333 | 333 | |
|
334 | 334 | $ hg unbundle .hg/strip-backup/* |
|
335 | 335 | adding changesets |
|
336 | 336 | adding manifests |
|
337 | 337 | adding file changes |
|
338 | 338 | added 1 changesets with 1 changes to 1 files |
|
339 | 339 | new changesets 51cfd7b1e13b (1 drafts) |
|
340 | 340 | (run 'hg update' to get a working copy) |
|
341 | 341 | $ hg --config extensions.strip= strip tip |
|
342 | 342 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob) |
|
343 | 343 | $ hg unbundle -q .hg/strip-backup/* |
|
344 | 344 | $ hg debugindex --dir dir1 |
|
345 | 345 | rev linkrev nodeid p1 p2 |
|
346 | 346 | 0 4 064927a0648a 000000000000 000000000000 |
|
347 | 347 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
348 | 348 | 2 6 5b16163a30c6 25ecb8cb8618 000000000000 |
|
349 | 349 | $ hg st --change tip |
|
350 | 350 | M dir1/a |
|
351 | 351 | |
|
352 | 352 | Shelving and unshelving should work |
|
353 | 353 | |
|
354 | 354 | $ echo foo >> dir1/a |
|
355 | 355 | $ hg shelve |
|
356 | 356 | shelved as default |
|
357 | 357 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
358 | 358 | $ hg unshelve |
|
359 | 359 | unshelving change 'default' |
|
360 | 360 | $ hg diff --nodates |
|
361 | 361 | diff -r 708a273da119 dir1/a |
|
362 | 362 | --- a/dir1/a |
|
363 | 363 | +++ b/dir1/a |
|
364 | 364 | @@ -1,1 +1,2 @@ |
|
365 | 365 | 1 |
|
366 | 366 | +foo |
|
367 | 367 | |
|
368 | 368 | Pushing from treemanifest repo to an empty repo makes that a treemanifest repo |
|
369 | 369 | |
|
370 | 370 | $ cd .. |
|
371 | 371 | $ hg init empty-repo |
|
372 | 372 | $ cat << EOF >> empty-repo/.hg/hgrc |
|
373 | 373 | > [experimental] |
|
374 | 374 | > changegroup3=yes |
|
375 | 375 | > EOF |
|
376 | $ grep treemanifest empty-repo/.hg/requires | |
|
376 | $ hg debugrequires -R empty-repo | grep treemanifest | |
|
377 | 377 | [1] |
|
378 | 378 | $ hg push -R repo -r 0 empty-repo |
|
379 | 379 | pushing to empty-repo |
|
380 | 380 | searching for changes |
|
381 | 381 | adding changesets |
|
382 | 382 | adding manifests |
|
383 | 383 | adding file changes |
|
384 | 384 | added 1 changesets with 2 changes to 2 files |
|
385 | $ grep treemanifest empty-repo/.hg/requires | |
|
385 | $ hg debugrequires -R empty-repo | grep treemanifest | |
|
386 | 386 | treemanifest |
|
387 | 387 | |
|
388 | 388 | Pushing to an empty repo works |
|
389 | 389 | |
|
390 | 390 | $ hg --config experimental.treemanifest=1 init clone |
|
391 | $ grep treemanifest clone/.hg/requires | |
|
391 | $ hg debugrequires -R clone | grep treemanifest | |
|
392 | 392 | treemanifest |
|
393 | 393 | $ hg push -R repo clone |
|
394 | 394 | pushing to clone |
|
395 | 395 | searching for changes |
|
396 | 396 | adding changesets |
|
397 | 397 | adding manifests |
|
398 | 398 | adding file changes |
|
399 | 399 | added 11 changesets with 15 changes to 10 files (+3 heads) |
|
400 | $ grep treemanifest clone/.hg/requires | |
|
400 | $ hg debugrequires -R clone | grep treemanifest | |
|
401 | 401 | treemanifest |
|
402 | 402 | $ hg -R clone verify |
|
403 | 403 | checking changesets |
|
404 | 404 | checking manifests |
|
405 | 405 | checking directory manifests |
|
406 | 406 | crosschecking files in changesets and manifests |
|
407 | 407 | checking files |
|
408 | 408 | checked 11 changesets with 15 changes to 10 files |
|
409 | 409 | |
|
410 | 410 | Create deeper repo with tree manifests. |
|
411 | 411 | |
|
412 | 412 | $ hg --config experimental.treemanifest=True init deeprepo |
|
413 | 413 | $ cd deeprepo |
|
414 | 414 | |
|
415 | 415 | $ mkdir .A |
|
416 | 416 | $ mkdir b |
|
417 | 417 | $ mkdir b/bar |
|
418 | 418 | $ mkdir b/bar/orange |
|
419 | 419 | $ mkdir b/bar/orange/fly |
|
420 | 420 | $ mkdir b/foo |
|
421 | 421 | $ mkdir b/foo/apple |
|
422 | 422 | $ mkdir b/foo/apple/bees |
|
423 | 423 | |
|
424 | 424 | $ touch .A/one.txt |
|
425 | 425 | $ touch .A/two.txt |
|
426 | 426 | $ touch b/bar/fruits.txt |
|
427 | 427 | $ touch b/bar/orange/fly/gnat.py |
|
428 | 428 | $ touch b/bar/orange/fly/housefly.txt |
|
429 | 429 | $ touch b/foo/apple/bees/flower.py |
|
430 | 430 | $ touch c.txt |
|
431 | 431 | $ touch d.py |
|
432 | 432 | |
|
433 | 433 | $ hg ci -Aqm 'initial' |
|
434 | 434 | |
|
435 | 435 | $ echo >> .A/one.txt |
|
436 | 436 | $ echo >> .A/two.txt |
|
437 | 437 | $ echo >> b/bar/fruits.txt |
|
438 | 438 | $ echo >> b/bar/orange/fly/gnat.py |
|
439 | 439 | $ echo >> b/bar/orange/fly/housefly.txt |
|
440 | 440 | $ echo >> b/foo/apple/bees/flower.py |
|
441 | 441 | $ echo >> c.txt |
|
442 | 442 | $ echo >> d.py |
|
443 | 443 | $ hg ci -Aqm 'second' |
|
444 | 444 | |
|
445 | 445 | We'll see that visitdir works by removing some treemanifest revlogs and running |
|
446 | 446 | the files command with various parameters. |
|
447 | 447 | |
|
448 | 448 | Test files from the root. |
|
449 | 449 | |
|
450 | 450 | $ hg files -r . |
|
451 | 451 | .A/one.txt |
|
452 | 452 | .A/two.txt |
|
453 | 453 | b/bar/fruits.txt |
|
454 | 454 | b/bar/orange/fly/gnat.py |
|
455 | 455 | b/bar/orange/fly/housefly.txt |
|
456 | 456 | b/foo/apple/bees/flower.py |
|
457 | 457 | c.txt |
|
458 | 458 | d.py |
|
459 | 459 | |
|
460 | 460 | Excludes with a glob should not exclude everything from the glob's root |
|
461 | 461 | |
|
462 | 462 | $ hg files -r . -X 'b/fo?' b |
|
463 | 463 | b/bar/fruits.txt |
|
464 | 464 | b/bar/orange/fly/gnat.py |
|
465 | 465 | b/bar/orange/fly/housefly.txt |
|
466 | 466 | $ cp -R .hg/store .hg/store-copy |
|
467 | 467 | |
|
468 | 468 | Test files for a subdirectory. |
|
469 | 469 | |
|
470 | 470 | #if reporevlogstore |
|
471 | 471 | $ rm -r .hg/store/meta/~2e_a |
|
472 | 472 | #endif |
|
473 | 473 | #if reposimplestore |
|
474 | 474 | $ rm -r .hg/store/meta/._a |
|
475 | 475 | #endif |
|
476 | 476 | $ hg files -r . b |
|
477 | 477 | b/bar/fruits.txt |
|
478 | 478 | b/bar/orange/fly/gnat.py |
|
479 | 479 | b/bar/orange/fly/housefly.txt |
|
480 | 480 | b/foo/apple/bees/flower.py |
|
481 | 481 | $ hg diff -r '.^' -r . --stat b |
|
482 | 482 | b/bar/fruits.txt | 1 + |
|
483 | 483 | b/bar/orange/fly/gnat.py | 1 + |
|
484 | 484 | b/bar/orange/fly/housefly.txt | 1 + |
|
485 | 485 | b/foo/apple/bees/flower.py | 1 + |
|
486 | 486 | 4 files changed, 4 insertions(+), 0 deletions(-) |
|
487 | 487 | $ cp -R .hg/store-copy/. .hg/store |
|
488 | 488 | |
|
489 | 489 | Test files with just includes and excludes. |
|
490 | 490 | |
|
491 | 491 | #if reporevlogstore |
|
492 | 492 | $ rm -r .hg/store/meta/~2e_a |
|
493 | 493 | #endif |
|
494 | 494 | #if reposimplestore |
|
495 | 495 | $ rm -r .hg/store/meta/._a |
|
496 | 496 | #endif |
|
497 | 497 | $ rm -r .hg/store/meta/b/bar/orange/fly |
|
498 | 498 | $ rm -r .hg/store/meta/b/foo/apple/bees |
|
499 | 499 | $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees |
|
500 | 500 | b/bar/fruits.txt |
|
501 | 501 | $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees |
|
502 | 502 | b/bar/fruits.txt | 1 + |
|
503 | 503 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
504 | 504 | $ cp -R .hg/store-copy/. .hg/store |
|
505 | 505 | |
|
506 | 506 | Test files for a subdirectory, excluding a directory within it. |
|
507 | 507 | |
|
508 | 508 | #if reporevlogstore |
|
509 | 509 | $ rm -r .hg/store/meta/~2e_a |
|
510 | 510 | #endif |
|
511 | 511 | #if reposimplestore |
|
512 | 512 | $ rm -r .hg/store/meta/._a |
|
513 | 513 | #endif |
|
514 | 514 | $ rm -r .hg/store/meta/b/foo |
|
515 | 515 | $ hg files -r . -X path:b/foo b |
|
516 | 516 | b/bar/fruits.txt |
|
517 | 517 | b/bar/orange/fly/gnat.py |
|
518 | 518 | b/bar/orange/fly/housefly.txt |
|
519 | 519 | $ hg diff -r '.^' -r . --stat -X path:b/foo b |
|
520 | 520 | b/bar/fruits.txt | 1 + |
|
521 | 521 | b/bar/orange/fly/gnat.py | 1 + |
|
522 | 522 | b/bar/orange/fly/housefly.txt | 1 + |
|
523 | 523 | 3 files changed, 3 insertions(+), 0 deletions(-) |
|
524 | 524 | $ cp -R .hg/store-copy/. .hg/store |
|
525 | 525 | |
|
526 | 526 | Test files for a sub directory, including only a directory within it, and |
|
527 | 527 | including an unrelated directory. |
|
528 | 528 | |
|
529 | 529 | #if reporevlogstore |
|
530 | 530 | $ rm -r .hg/store/meta/~2e_a |
|
531 | 531 | #endif |
|
532 | 532 | #if reposimplestore |
|
533 | 533 | $ rm -r .hg/store/meta/._a |
|
534 | 534 | #endif |
|
535 | 535 | $ rm -r .hg/store/meta/b/foo |
|
536 | 536 | $ hg files -r . -I path:b/bar/orange -I path:a b |
|
537 | 537 | b/bar/orange/fly/gnat.py |
|
538 | 538 | b/bar/orange/fly/housefly.txt |
|
539 | 539 | $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b |
|
540 | 540 | b/bar/orange/fly/gnat.py | 1 + |
|
541 | 541 | b/bar/orange/fly/housefly.txt | 1 + |
|
542 | 542 | 2 files changed, 2 insertions(+), 0 deletions(-) |
|
543 | 543 | $ cp -R .hg/store-copy/. .hg/store |
|
544 | 544 | |
|
545 | 545 | Test files for a pattern, including a directory, and excluding a directory |
|
546 | 546 | within that. |
|
547 | 547 | |
|
548 | 548 | #if reporevlogstore |
|
549 | 549 | $ rm -r .hg/store/meta/~2e_a |
|
550 | 550 | #endif |
|
551 | 551 | #if reposimplestore |
|
552 | 552 | $ rm -r .hg/store/meta/._a |
|
553 | 553 | #endif |
|
554 | 554 | $ rm -r .hg/store/meta/b/foo |
|
555 | 555 | $ rm -r .hg/store/meta/b/bar/orange |
|
556 | 556 | $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange |
|
557 | 557 | b/bar/fruits.txt |
|
558 | 558 | $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange |
|
559 | 559 | b/bar/fruits.txt | 1 + |
|
560 | 560 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
561 | 561 | $ cp -R .hg/store-copy/. .hg/store |
|
562 | 562 | |
|
563 | 563 | Add some more changes to the deep repo |
|
564 | 564 | $ echo narf >> b/bar/fruits.txt |
|
565 | 565 | $ hg ci -m narf |
|
566 | 566 | $ echo troz >> b/bar/orange/fly/gnat.py |
|
567 | 567 | $ hg ci -m troz |
|
568 | 568 | |
|
569 | 569 | Verify works |
|
570 | 570 | $ hg verify |
|
571 | 571 | checking changesets |
|
572 | 572 | checking manifests |
|
573 | 573 | checking directory manifests |
|
574 | 574 | crosschecking files in changesets and manifests |
|
575 | 575 | checking files |
|
576 | 576 | checked 4 changesets with 18 changes to 8 files |
|
577 | 577 | |
|
578 | 578 | #if repofncache |
|
579 | 579 | Dirlogs are included in fncache |
|
580 | 580 | $ grep meta/.A/00manifest.i .hg/store/fncache |
|
581 | 581 | meta/.A/00manifest.i |
|
582 | 582 | |
|
583 | 583 | Rebuilt fncache includes dirlogs |
|
584 | 584 | $ rm .hg/store/fncache |
|
585 | 585 | $ hg debugrebuildfncache |
|
586 | 586 | adding data/.A/one.txt.i |
|
587 | 587 | adding data/.A/two.txt.i |
|
588 | 588 | adding data/b/bar/fruits.txt.i |
|
589 | 589 | adding data/b/bar/orange/fly/gnat.py.i |
|
590 | 590 | adding data/b/bar/orange/fly/housefly.txt.i |
|
591 | 591 | adding data/b/foo/apple/bees/flower.py.i |
|
592 | 592 | adding data/c.txt.i |
|
593 | 593 | adding data/d.py.i |
|
594 | 594 | adding meta/.A/00manifest.i |
|
595 | 595 | adding meta/b/00manifest.i |
|
596 | 596 | adding meta/b/bar/00manifest.i |
|
597 | 597 | adding meta/b/bar/orange/00manifest.i |
|
598 | 598 | adding meta/b/bar/orange/fly/00manifest.i |
|
599 | 599 | adding meta/b/foo/00manifest.i |
|
600 | 600 | adding meta/b/foo/apple/00manifest.i |
|
601 | 601 | adding meta/b/foo/apple/bees/00manifest.i |
|
602 | 602 | 16 items added, 0 removed from fncache |
|
603 | 603 | #endif |
|
604 | 604 | |
|
605 | 605 | Finish first server |
|
606 | 606 | $ killdaemons.py |
|
607 | 607 | |
|
608 | 608 | Back up the recently added revlogs |
|
609 | 609 | $ cp -R .hg/store .hg/store-newcopy |
|
610 | 610 | |
|
611 | 611 | Verify reports missing dirlog |
|
612 | 612 | $ rm .hg/store/meta/b/00manifest.* |
|
613 | 613 | $ hg verify |
|
614 | 614 | checking changesets |
|
615 | 615 | checking manifests |
|
616 | 616 | checking directory manifests |
|
617 | 617 | 0: empty or missing b/ |
|
618 | 618 | b/@0: parent-directory manifest refers to unknown revision 67688a370455 |
|
619 | 619 | b/@1: parent-directory manifest refers to unknown revision f065da70369e |
|
620 | 620 | b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b |
|
621 | 621 | b/@3: parent-directory manifest refers to unknown revision 367152e6af28 |
|
622 | 622 | warning: orphan data file 'meta/b/bar/00manifest.i' (reporevlogstore !) |
|
623 | 623 | warning: orphan data file 'meta/b/bar/orange/00manifest.i' (reporevlogstore !) |
|
624 | 624 | warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i' (reporevlogstore !) |
|
625 | 625 | warning: orphan data file 'meta/b/foo/00manifest.i' (reporevlogstore !) |
|
626 | 626 | warning: orphan data file 'meta/b/foo/apple/00manifest.i' (reporevlogstore !) |
|
627 | 627 | warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i' (reporevlogstore !) |
|
628 | 628 | crosschecking files in changesets and manifests |
|
629 | 629 | b/bar/fruits.txt@0: in changeset but not in manifest |
|
630 | 630 | b/bar/orange/fly/gnat.py@0: in changeset but not in manifest |
|
631 | 631 | b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest |
|
632 | 632 | b/foo/apple/bees/flower.py@0: in changeset but not in manifest |
|
633 | 633 | checking files |
|
634 | 634 | checked 4 changesets with 18 changes to 8 files |
|
635 | 635 | 6 warnings encountered! (reporevlogstore !) |
|
636 | 636 | 9 integrity errors encountered! |
|
637 | 637 | (first damaged changeset appears to be 0) |
|
638 | 638 | [1] |
|
639 | 639 | $ cp -R .hg/store-newcopy/. .hg/store |
|
640 | 640 | |
|
641 | 641 | Verify reports missing dirlog entry |
|
642 | 642 | $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/ |
|
643 | 643 | $ hg verify |
|
644 | 644 | checking changesets |
|
645 | 645 | checking manifests |
|
646 | 646 | checking directory manifests |
|
647 | 647 | b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b |
|
648 | 648 | b/@3: parent-directory manifest refers to unknown revision 367152e6af28 |
|
649 | 649 | b/bar/@?: rev 2 points to unexpected changeset 2 |
|
650 | 650 | b/bar/@?: 44d7e1146e0d not in parent-directory manifest |
|
651 | 651 | b/bar/@?: rev 3 points to unexpected changeset 3 |
|
652 | 652 | b/bar/@?: 70b10c6b17b7 not in parent-directory manifest |
|
653 | 653 | b/bar/orange/@?: rev 2 points to unexpected changeset 3 |
|
654 | 654 | (expected None) |
|
655 | 655 | b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3 |
|
656 | 656 | (expected None) |
|
657 | 657 | crosschecking files in changesets and manifests |
|
658 | 658 | checking files |
|
659 | 659 | checked 4 changesets with 18 changes to 8 files |
|
660 | 660 | 2 warnings encountered! |
|
661 | 661 | 8 integrity errors encountered! |
|
662 | 662 | (first damaged changeset appears to be 2) |
|
663 | 663 | [1] |
|
664 | 664 | $ cp -R .hg/store-newcopy/. .hg/store |
|
665 | 665 | |
|
666 | 666 | Test cloning a treemanifest repo over http. |
|
667 | 667 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log |
|
668 | 668 | $ cat hg.pid >> $DAEMON_PIDS |
|
669 | 669 | $ cd .. |
|
670 | 670 | We can clone even with the knob turned off and we'll get a treemanifest repo. |
|
671 | 671 | $ hg clone --config experimental.treemanifest=False \ |
|
672 | 672 | > --config experimental.changegroup3=True \ |
|
673 | 673 | > http://localhost:$HGPORT deepclone |
|
674 | 674 | requesting all changes |
|
675 | 675 | adding changesets |
|
676 | 676 | adding manifests |
|
677 | 677 | adding file changes |
|
678 | 678 | added 4 changesets with 18 changes to 8 files |
|
679 | 679 | new changesets 775704be6f52:523e5c631710 |
|
680 | 680 | updating to branch default |
|
681 | 681 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
682 | 682 | No server errors. |
|
683 | 683 | $ cat deeprepo/errors.log |
|
684 | 684 | requires got updated to include treemanifest |
|
685 |
$ |
|
|
685 | $ hg debugrequires -R deepclone | grep treemanifest | |
|
686 | 686 | treemanifest |
|
687 | 687 | Tree manifest revlogs exist. |
|
688 | 688 | $ find deepclone/.hg/store/meta | sort |
|
689 | 689 | deepclone/.hg/store/meta |
|
690 | 690 | deepclone/.hg/store/meta/._a (reposimplestore !) |
|
691 | 691 | deepclone/.hg/store/meta/._a/00manifest.i (reposimplestore !) |
|
692 | 692 | deepclone/.hg/store/meta/b |
|
693 | 693 | deepclone/.hg/store/meta/b/00manifest.i |
|
694 | 694 | deepclone/.hg/store/meta/b/bar |
|
695 | 695 | deepclone/.hg/store/meta/b/bar/00manifest.i |
|
696 | 696 | deepclone/.hg/store/meta/b/bar/orange |
|
697 | 697 | deepclone/.hg/store/meta/b/bar/orange/00manifest.i |
|
698 | 698 | deepclone/.hg/store/meta/b/bar/orange/fly |
|
699 | 699 | deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i |
|
700 | 700 | deepclone/.hg/store/meta/b/foo |
|
701 | 701 | deepclone/.hg/store/meta/b/foo/00manifest.i |
|
702 | 702 | deepclone/.hg/store/meta/b/foo/apple |
|
703 | 703 | deepclone/.hg/store/meta/b/foo/apple/00manifest.i |
|
704 | 704 | deepclone/.hg/store/meta/b/foo/apple/bees |
|
705 | 705 | deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i |
|
706 | 706 | deepclone/.hg/store/meta/~2e_a (reporevlogstore !) |
|
707 | 707 | deepclone/.hg/store/meta/~2e_a/00manifest.i (reporevlogstore !) |
|
708 | 708 | Verify passes. |
|
709 | 709 | $ cd deepclone |
|
710 | 710 | $ hg verify |
|
711 | 711 | checking changesets |
|
712 | 712 | checking manifests |
|
713 | 713 | checking directory manifests |
|
714 | 714 | crosschecking files in changesets and manifests |
|
715 | 715 | checking files |
|
716 | 716 | checked 4 changesets with 18 changes to 8 files |
|
717 | 717 | $ cd .. |
|
718 | 718 | |
|
719 | 719 | #if reporevlogstore |
|
720 | 720 | Create clones using old repo formats to use in later tests |
|
721 | 721 | $ hg clone --config format.usestore=False \ |
|
722 | 722 | > --config experimental.changegroup3=True \ |
|
723 | 723 | > http://localhost:$HGPORT deeprepo-basicstore |
|
724 | 724 | requesting all changes |
|
725 | 725 | adding changesets |
|
726 | 726 | adding manifests |
|
727 | 727 | adding file changes |
|
728 | 728 | added 4 changesets with 18 changes to 8 files |
|
729 | 729 | new changesets 775704be6f52:523e5c631710 |
|
730 | 730 | updating to branch default |
|
731 | 731 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
732 | 732 | $ cd deeprepo-basicstore |
|
733 | $ grep store .hg/requires | |
|
733 | $ hg debugrequires | grep store | |
|
734 | 734 | [1] |
|
735 | 735 | $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --errorlog=errors.log |
|
736 | 736 | $ cat hg.pid >> $DAEMON_PIDS |
|
737 | 737 | $ cd .. |
|
738 | 738 | $ hg clone --config format.usefncache=False \ |
|
739 | 739 | > --config experimental.changegroup3=True \ |
|
740 | 740 | > http://localhost:$HGPORT deeprepo-encodedstore |
|
741 | 741 | requesting all changes |
|
742 | 742 | adding changesets |
|
743 | 743 | adding manifests |
|
744 | 744 | adding file changes |
|
745 | 745 | added 4 changesets with 18 changes to 8 files |
|
746 | 746 | new changesets 775704be6f52:523e5c631710 |
|
747 | 747 | updating to branch default |
|
748 | 748 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
749 | 749 | $ cd deeprepo-encodedstore |
|
750 | $ grep fncache .hg/requires | |
|
750 | $ hg debugrequires | grep fncache | |
|
751 | 751 | [1] |
|
752 | 752 | $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log |
|
753 | 753 | $ cat hg.pid >> $DAEMON_PIDS |
|
754 | 754 | $ cd .. |
|
755 | 755 | |
|
756 | 756 | Local clone with basicstore |
|
757 | 757 | $ hg clone -U deeprepo-basicstore local-clone-basicstore |
|
758 | 758 | $ hg -R local-clone-basicstore verify |
|
759 | 759 | checking changesets |
|
760 | 760 | checking manifests |
|
761 | 761 | checking directory manifests |
|
762 | 762 | crosschecking files in changesets and manifests |
|
763 | 763 | checking files |
|
764 | 764 | checked 4 changesets with 18 changes to 8 files |
|
765 | 765 | |
|
766 | 766 | Local clone with encodedstore |
|
767 | 767 | $ hg clone -U deeprepo-encodedstore local-clone-encodedstore |
|
768 | 768 | $ hg -R local-clone-encodedstore verify |
|
769 | 769 | checking changesets |
|
770 | 770 | checking manifests |
|
771 | 771 | checking directory manifests |
|
772 | 772 | crosschecking files in changesets and manifests |
|
773 | 773 | checking files |
|
774 | 774 | checked 4 changesets with 18 changes to 8 files |
|
775 | 775 | |
|
776 | 776 | Local clone with fncachestore |
|
777 | 777 | $ hg clone -U deeprepo local-clone-fncachestore |
|
778 | 778 | $ hg -R local-clone-fncachestore verify |
|
779 | 779 | checking changesets |
|
780 | 780 | checking manifests |
|
781 | 781 | checking directory manifests |
|
782 | 782 | crosschecking files in changesets and manifests |
|
783 | 783 | checking files |
|
784 | 784 | checked 4 changesets with 18 changes to 8 files |
|
785 | 785 | |
|
786 | 786 | Stream clone with basicstore |
|
787 | 787 | $ hg clone --config experimental.changegroup3=True --stream -U \ |
|
788 | 788 | > http://localhost:$HGPORT1 stream-clone-basicstore |
|
789 | 789 | streaming all changes |
|
790 | 790 | 28 files to transfer, * of data (glob) |
|
791 | 791 | transferred * in * seconds (*) (glob) |
|
792 | 792 | $ hg -R stream-clone-basicstore verify |
|
793 | 793 | checking changesets |
|
794 | 794 | checking manifests |
|
795 | 795 | checking directory manifests |
|
796 | 796 | crosschecking files in changesets and manifests |
|
797 | 797 | checking files |
|
798 | 798 | checked 4 changesets with 18 changes to 8 files |
|
799 | 799 | |
|
800 | 800 | Stream clone with encodedstore |
|
801 | 801 | $ hg clone --config experimental.changegroup3=True --stream -U \ |
|
802 | 802 | > http://localhost:$HGPORT2 stream-clone-encodedstore |
|
803 | 803 | streaming all changes |
|
804 | 804 | 28 files to transfer, * of data (glob) |
|
805 | 805 | transferred * in * seconds (*) (glob) |
|
806 | 806 | $ hg -R stream-clone-encodedstore verify |
|
807 | 807 | checking changesets |
|
808 | 808 | checking manifests |
|
809 | 809 | checking directory manifests |
|
810 | 810 | crosschecking files in changesets and manifests |
|
811 | 811 | checking files |
|
812 | 812 | checked 4 changesets with 18 changes to 8 files |
|
813 | 813 | |
|
814 | 814 | Stream clone with fncachestore |
|
815 | 815 | $ hg clone --config experimental.changegroup3=True --stream -U \ |
|
816 | 816 | > http://localhost:$HGPORT stream-clone-fncachestore |
|
817 | 817 | streaming all changes |
|
818 | 818 | 22 files to transfer, * of data (glob) |
|
819 | 819 | transferred * in * seconds (*) (glob) |
|
820 | 820 | $ hg -R stream-clone-fncachestore verify |
|
821 | 821 | checking changesets |
|
822 | 822 | checking manifests |
|
823 | 823 | checking directory manifests |
|
824 | 824 | crosschecking files in changesets and manifests |
|
825 | 825 | checking files |
|
826 | 826 | checked 4 changesets with 18 changes to 8 files |
|
827 | 827 | |
|
828 | 828 | Packed bundle |
|
829 | 829 | $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg |
|
830 | 830 | writing 5330 bytes for 18 files (no-zstd !) |
|
831 | 831 | writing 5400 bytes for 18 files (zstd !) |
|
832 | 832 | bundle requirements: generaldelta, revlogv1, sparserevlog, treemanifest (no-rust !) |
|
833 | 833 | bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog, treemanifest (rust !) |
|
834 | 834 | $ hg debugbundle --spec repo-packed.hg |
|
835 | 835 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog%2Ctreemanifest (no-rust !) |
|
836 | 836 | none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog%2Ctreemanifest (rust !) |
|
837 | 837 | |
|
838 | 838 | #endif |
|
839 | 839 | |
|
840 | 840 | Bundle with changegroup2 is not supported |
|
841 | 841 | |
|
842 | 842 | $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle |
|
843 | 843 | abort: repository does not support bundle version 02 |
|
844 | 844 | [255] |
|
845 | 845 | |
|
846 | 846 | Pull does not include changegroup for manifest the client already has from |
|
847 | 847 | other branch |
|
848 | 848 | |
|
849 | 849 | $ mkdir grafted-dir-repo |
|
850 | 850 | $ cd grafted-dir-repo |
|
851 | 851 | $ hg --config experimental.treemanifest=1 init |
|
852 | 852 | $ mkdir dir |
|
853 | 853 | $ echo a > dir/file |
|
854 | 854 | $ echo a > file |
|
855 | 855 | $ hg ci -Am initial |
|
856 | 856 | adding dir/file |
|
857 | 857 | adding file |
|
858 | 858 | $ echo b > dir/file |
|
859 | 859 | $ hg ci -m updated |
|
860 | 860 | $ hg co '.^' |
|
861 | 861 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
862 | 862 | $ hg revert -r tip dir/ |
|
863 | 863 | reverting dir/file |
|
864 | 864 | $ echo b > file # to make sure root manifest is sent |
|
865 | 865 | $ hg ci -m grafted |
|
866 | 866 | created new head |
|
867 | 867 | $ cd .. |
|
868 | 868 | |
|
869 | 869 | $ hg --config experimental.treemanifest=1 clone --pull -r 1 \ |
|
870 | 870 | > grafted-dir-repo grafted-dir-repo-clone |
|
871 | 871 | adding changesets |
|
872 | 872 | adding manifests |
|
873 | 873 | adding file changes |
|
874 | 874 | added 2 changesets with 3 changes to 2 files |
|
875 | 875 | new changesets d84f4c419457:09ab742f3b0f |
|
876 | 876 | updating to branch default |
|
877 | 877 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
878 | 878 | $ cd grafted-dir-repo-clone |
|
879 | 879 | $ hg pull -r 2 |
|
880 | 880 | pulling from $TESTTMP/grafted-dir-repo |
|
881 | 881 | searching for changes |
|
882 | 882 | adding changesets |
|
883 | 883 | adding manifests |
|
884 | 884 | adding file changes |
|
885 | 885 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
886 | 886 | new changesets 73699489fb7c |
|
887 | 887 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
888 | 888 | |
|
889 | 889 | Committing a empty commit does not duplicate root treemanifest |
|
890 | 890 | $ echo z >> z |
|
891 | 891 | $ hg commit -Aqm 'pre-empty commit' |
|
892 | 892 | $ hg rm z |
|
893 | 893 | $ hg commit --amend -m 'empty commit' |
|
894 | 894 | saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg |
|
895 | 895 | $ hg log -r 'tip + tip^' -T '{manifest}\n' |
|
896 | 896 | 1:678d3574b88c |
|
897 | 897 | 1:678d3574b88c |
|
898 | 898 | $ hg --config extensions.strip= strip -r . -q |
@@ -1,1783 +1,1783 b'' | |||
|
1 | 1 | #require no-reposimplestore |
|
2 | 2 | |
|
3 | 3 | $ cat >> $HGRCPATH << EOF |
|
4 | 4 | > [extensions] |
|
5 | 5 | > share = |
|
6 | 6 | > [format] |
|
7 | 7 | > # stabilize test accross variant |
|
8 | 8 | > revlog-compression=zlib |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | store and revlogv1 are required in source |
|
12 | 12 | |
|
13 | 13 | $ hg --config format.usestore=false init no-store |
|
14 | 14 | $ hg -R no-store debugupgraderepo |
|
15 | 15 | abort: cannot upgrade repository; requirement missing: store |
|
16 | 16 | [255] |
|
17 | 17 | |
|
18 | 18 | $ hg init no-revlogv1 |
|
19 | 19 | $ cat > no-revlogv1/.hg/requires << EOF |
|
20 | 20 | > dotencode |
|
21 | 21 | > fncache |
|
22 | 22 | > generaldelta |
|
23 | 23 | > store |
|
24 | 24 | > EOF |
|
25 | 25 | |
|
26 | 26 | $ hg -R no-revlogv1 debugupgraderepo |
|
27 | 27 | abort: cannot upgrade repository; missing a revlog version |
|
28 | 28 | [255] |
|
29 | 29 | |
|
30 | 30 | Cannot upgrade shared repositories |
|
31 | 31 | |
|
32 | 32 | $ hg init share-parent |
|
33 | 33 | $ hg -q share share-parent share-child |
|
34 | 34 | |
|
35 | 35 | $ hg -R share-child debugupgraderepo |
|
36 | 36 | abort: cannot upgrade repository; unsupported source requirement: shared |
|
37 | 37 | [255] |
|
38 | 38 | |
|
39 | 39 | Do not yet support upgrading treemanifest repos |
|
40 | 40 | |
|
41 | 41 | $ hg --config experimental.treemanifest=true init treemanifest |
|
42 | 42 | $ hg -R treemanifest debugupgraderepo |
|
43 | 43 | abort: cannot upgrade repository; unsupported source requirement: treemanifest |
|
44 | 44 | [255] |
|
45 | 45 | |
|
46 | 46 | Cannot add treemanifest requirement during upgrade |
|
47 | 47 | |
|
48 | 48 | $ hg init disallowaddedreq |
|
49 | 49 | $ hg -R disallowaddedreq --config experimental.treemanifest=true debugupgraderepo |
|
50 | 50 | abort: cannot upgrade repository; do not support adding requirement: treemanifest |
|
51 | 51 | [255] |
|
52 | 52 | |
|
53 | 53 | An upgrade of a repository created with recommended settings only suggests optimizations |
|
54 | 54 | |
|
55 | 55 | $ hg init empty |
|
56 | 56 | $ cd empty |
|
57 | 57 | $ hg debugformat |
|
58 | 58 | format-variant repo |
|
59 | 59 | fncache: yes |
|
60 | 60 | dirstate-v2: no |
|
61 | 61 | dotencode: yes |
|
62 | 62 | generaldelta: yes |
|
63 | 63 | share-safe: no |
|
64 | 64 | sparserevlog: yes |
|
65 | 65 | persistent-nodemap: no (no-rust !) |
|
66 | 66 | persistent-nodemap: yes (rust !) |
|
67 | 67 | copies-sdc: no |
|
68 | 68 | revlog-v2: no |
|
69 | 69 | changelog-v2: no |
|
70 | 70 | plain-cl-delta: yes |
|
71 | 71 | compression: zlib |
|
72 | 72 | compression-level: default |
|
73 | 73 | $ hg debugformat --verbose |
|
74 | 74 | format-variant repo config default |
|
75 | 75 | fncache: yes yes yes |
|
76 | 76 | dirstate-v2: no no no |
|
77 | 77 | dotencode: yes yes yes |
|
78 | 78 | generaldelta: yes yes yes |
|
79 | 79 | share-safe: no no no |
|
80 | 80 | sparserevlog: yes yes yes |
|
81 | 81 | persistent-nodemap: no no no (no-rust !) |
|
82 | 82 | persistent-nodemap: yes yes no (rust !) |
|
83 | 83 | copies-sdc: no no no |
|
84 | 84 | revlog-v2: no no no |
|
85 | 85 | changelog-v2: no no no |
|
86 | 86 | plain-cl-delta: yes yes yes |
|
87 | 87 | compression: zlib zlib zlib (no-zstd !) |
|
88 | 88 | compression: zlib zlib zstd (zstd !) |
|
89 | 89 | compression-level: default default default |
|
90 | 90 | $ hg debugformat --verbose --config format.usefncache=no |
|
91 | 91 | format-variant repo config default |
|
92 | 92 | fncache: yes no yes |
|
93 | 93 | dirstate-v2: no no no |
|
94 | 94 | dotencode: yes no yes |
|
95 | 95 | generaldelta: yes yes yes |
|
96 | 96 | share-safe: no no no |
|
97 | 97 | sparserevlog: yes yes yes |
|
98 | 98 | persistent-nodemap: no no no (no-rust !) |
|
99 | 99 | persistent-nodemap: yes yes no (rust !) |
|
100 | 100 | copies-sdc: no no no |
|
101 | 101 | revlog-v2: no no no |
|
102 | 102 | changelog-v2: no no no |
|
103 | 103 | plain-cl-delta: yes yes yes |
|
104 | 104 | compression: zlib zlib zlib (no-zstd !) |
|
105 | 105 | compression: zlib zlib zstd (zstd !) |
|
106 | 106 | compression-level: default default default |
|
107 | 107 | $ hg debugformat --verbose --config format.usefncache=no --color=debug |
|
108 | 108 | format-variant repo config default |
|
109 | 109 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] |
|
110 | 110 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
111 | 111 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| no][formatvariant.default| yes] |
|
112 | 112 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
113 | 113 | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
114 | 114 | [formatvariant.name.uptodate|sparserevlog: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
115 | 115 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) |
|
116 | 116 | [formatvariant.name.mismatchdefault|persistent-nodemap:][formatvariant.repo.mismatchdefault| yes][formatvariant.config.special| yes][formatvariant.default| no] (rust !) |
|
117 | 117 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
118 | 118 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
119 | 119 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
120 | 120 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
121 | 121 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) |
|
122 | 122 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) |
|
123 | 123 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] |
|
124 | 124 | $ hg debugformat -Tjson |
|
125 | 125 | [ |
|
126 | 126 | { |
|
127 | 127 | "config": true, |
|
128 | 128 | "default": true, |
|
129 | 129 | "name": "fncache", |
|
130 | 130 | "repo": true |
|
131 | 131 | }, |
|
132 | 132 | { |
|
133 | 133 | "config": false, |
|
134 | 134 | "default": false, |
|
135 | 135 | "name": "dirstate-v2", |
|
136 | 136 | "repo": false |
|
137 | 137 | }, |
|
138 | 138 | { |
|
139 | 139 | "config": true, |
|
140 | 140 | "default": true, |
|
141 | 141 | "name": "dotencode", |
|
142 | 142 | "repo": true |
|
143 | 143 | }, |
|
144 | 144 | { |
|
145 | 145 | "config": true, |
|
146 | 146 | "default": true, |
|
147 | 147 | "name": "generaldelta", |
|
148 | 148 | "repo": true |
|
149 | 149 | }, |
|
150 | 150 | { |
|
151 | 151 | "config": false, |
|
152 | 152 | "default": false, |
|
153 | 153 | "name": "share-safe", |
|
154 | 154 | "repo": false |
|
155 | 155 | }, |
|
156 | 156 | { |
|
157 | 157 | "config": true, |
|
158 | 158 | "default": true, |
|
159 | 159 | "name": "sparserevlog", |
|
160 | 160 | "repo": true |
|
161 | 161 | }, |
|
162 | 162 | { |
|
163 | 163 | "config": false, (no-rust !) |
|
164 | 164 | "config": true, (rust !) |
|
165 | 165 | "default": false, |
|
166 | 166 | "name": "persistent-nodemap", |
|
167 | 167 | "repo": false (no-rust !) |
|
168 | 168 | "repo": true (rust !) |
|
169 | 169 | }, |
|
170 | 170 | { |
|
171 | 171 | "config": false, |
|
172 | 172 | "default": false, |
|
173 | 173 | "name": "copies-sdc", |
|
174 | 174 | "repo": false |
|
175 | 175 | }, |
|
176 | 176 | { |
|
177 | 177 | "config": false, |
|
178 | 178 | "default": false, |
|
179 | 179 | "name": "revlog-v2", |
|
180 | 180 | "repo": false |
|
181 | 181 | }, |
|
182 | 182 | { |
|
183 | 183 | "config": false, |
|
184 | 184 | "default": false, |
|
185 | 185 | "name": "changelog-v2", |
|
186 | 186 | "repo": false |
|
187 | 187 | }, |
|
188 | 188 | { |
|
189 | 189 | "config": true, |
|
190 | 190 | "default": true, |
|
191 | 191 | "name": "plain-cl-delta", |
|
192 | 192 | "repo": true |
|
193 | 193 | }, |
|
194 | 194 | { |
|
195 | 195 | "config": "zlib", |
|
196 | 196 | "default": "zlib", (no-zstd !) |
|
197 | 197 | "default": "zstd", (zstd !) |
|
198 | 198 | "name": "compression", |
|
199 | 199 | "repo": "zlib" |
|
200 | 200 | }, |
|
201 | 201 | { |
|
202 | 202 | "config": "default", |
|
203 | 203 | "default": "default", |
|
204 | 204 | "name": "compression-level", |
|
205 | 205 | "repo": "default" |
|
206 | 206 | } |
|
207 | 207 | ] |
|
208 | 208 | $ hg debugupgraderepo |
|
209 | 209 | (no format upgrades found in existing repository) |
|
210 | 210 | performing an upgrade with "--run" will make the following changes: |
|
211 | 211 | |
|
212 | 212 | requirements |
|
213 | 213 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
214 | 214 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
215 | 215 | |
|
216 | 216 | no revlogs to process |
|
217 | 217 | |
|
218 | 218 | additional optimizations are available by specifying "--optimize <name>": |
|
219 | 219 | |
|
220 | 220 | re-delta-parent |
|
221 | 221 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
222 | 222 | |
|
223 | 223 | re-delta-multibase |
|
224 | 224 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
225 | 225 | |
|
226 | 226 | re-delta-all |
|
227 | 227 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
228 | 228 | |
|
229 | 229 | re-delta-fulladd |
|
230 | 230 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
231 | 231 | |
|
232 | 232 | |
|
233 | 233 | $ hg debugupgraderepo --quiet |
|
234 | 234 | requirements |
|
235 | 235 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
236 | 236 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
237 | 237 | |
|
238 | 238 | no revlogs to process |
|
239 | 239 | |
|
240 | 240 | |
|
241 | 241 | --optimize can be used to add optimizations |
|
242 | 242 | |
|
243 | 243 | $ hg debugupgrade --optimize 're-delta-parent' |
|
244 | 244 | (no format upgrades found in existing repository) |
|
245 | 245 | performing an upgrade with "--run" will make the following changes: |
|
246 | 246 | |
|
247 | 247 | requirements |
|
248 | 248 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
249 | 249 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
250 | 250 | |
|
251 | 251 | optimisations: re-delta-parent |
|
252 | 252 | |
|
253 | 253 | re-delta-parent |
|
254 | 254 | deltas within internal storage will choose a new base revision if needed |
|
255 | 255 | |
|
256 | 256 | processed revlogs: |
|
257 | 257 | - all-filelogs |
|
258 | 258 | - changelog |
|
259 | 259 | - manifest |
|
260 | 260 | |
|
261 | 261 | additional optimizations are available by specifying "--optimize <name>": |
|
262 | 262 | |
|
263 | 263 | re-delta-multibase |
|
264 | 264 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
265 | 265 | |
|
266 | 266 | re-delta-all |
|
267 | 267 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
268 | 268 | |
|
269 | 269 | re-delta-fulladd |
|
270 | 270 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
271 | 271 | |
|
272 | 272 | |
|
273 | 273 | modern form of the option |
|
274 | 274 | |
|
275 | 275 | $ hg debugupgrade --optimize re-delta-parent |
|
276 | 276 | (no format upgrades found in existing repository) |
|
277 | 277 | performing an upgrade with "--run" will make the following changes: |
|
278 | 278 | |
|
279 | 279 | requirements |
|
280 | 280 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
281 | 281 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
282 | 282 | |
|
283 | 283 | optimisations: re-delta-parent |
|
284 | 284 | |
|
285 | 285 | re-delta-parent |
|
286 | 286 | deltas within internal storage will choose a new base revision if needed |
|
287 | 287 | |
|
288 | 288 | processed revlogs: |
|
289 | 289 | - all-filelogs |
|
290 | 290 | - changelog |
|
291 | 291 | - manifest |
|
292 | 292 | |
|
293 | 293 | additional optimizations are available by specifying "--optimize <name>": |
|
294 | 294 | |
|
295 | 295 | re-delta-multibase |
|
296 | 296 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
297 | 297 | |
|
298 | 298 | re-delta-all |
|
299 | 299 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
300 | 300 | |
|
301 | 301 | re-delta-fulladd |
|
302 | 302 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
303 | 303 | |
|
304 | 304 | $ hg debugupgrade --optimize re-delta-parent --quiet |
|
305 | 305 | requirements |
|
306 | 306 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
307 | 307 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
308 | 308 | |
|
309 | 309 | optimisations: re-delta-parent |
|
310 | 310 | |
|
311 | 311 | processed revlogs: |
|
312 | 312 | - all-filelogs |
|
313 | 313 | - changelog |
|
314 | 314 | - manifest |
|
315 | 315 | |
|
316 | 316 | |
|
317 | 317 | unknown optimization: |
|
318 | 318 | |
|
319 | 319 | $ hg debugupgrade --optimize foobar |
|
320 | 320 | abort: unknown optimization action requested: foobar |
|
321 | 321 | (run without arguments to see valid optimizations) |
|
322 | 322 | [255] |
|
323 | 323 | |
|
324 | 324 | Various sub-optimal detections work |
|
325 | 325 | |
|
326 | 326 | $ cat > .hg/requires << EOF |
|
327 | 327 | > revlogv1 |
|
328 | 328 | > store |
|
329 | 329 | > EOF |
|
330 | 330 | |
|
331 | 331 | $ hg debugformat |
|
332 | 332 | format-variant repo |
|
333 | 333 | fncache: no |
|
334 | 334 | dirstate-v2: no |
|
335 | 335 | dotencode: no |
|
336 | 336 | generaldelta: no |
|
337 | 337 | share-safe: no |
|
338 | 338 | sparserevlog: no |
|
339 | 339 | persistent-nodemap: no |
|
340 | 340 | copies-sdc: no |
|
341 | 341 | revlog-v2: no |
|
342 | 342 | changelog-v2: no |
|
343 | 343 | plain-cl-delta: yes |
|
344 | 344 | compression: zlib |
|
345 | 345 | compression-level: default |
|
346 | 346 | $ hg debugformat --verbose |
|
347 | 347 | format-variant repo config default |
|
348 | 348 | fncache: no yes yes |
|
349 | 349 | dirstate-v2: no no no |
|
350 | 350 | dotencode: no yes yes |
|
351 | 351 | generaldelta: no yes yes |
|
352 | 352 | share-safe: no no no |
|
353 | 353 | sparserevlog: no yes yes |
|
354 | 354 | persistent-nodemap: no no no (no-rust !) |
|
355 | 355 | persistent-nodemap: no yes no (rust !) |
|
356 | 356 | copies-sdc: no no no |
|
357 | 357 | revlog-v2: no no no |
|
358 | 358 | changelog-v2: no no no |
|
359 | 359 | plain-cl-delta: yes yes yes |
|
360 | 360 | compression: zlib zlib zlib (no-zstd !) |
|
361 | 361 | compression: zlib zlib zstd (zstd !) |
|
362 | 362 | compression-level: default default default |
|
363 | 363 | $ hg debugformat --verbose --config format.usegeneraldelta=no |
|
364 | 364 | format-variant repo config default |
|
365 | 365 | fncache: no yes yes |
|
366 | 366 | dirstate-v2: no no no |
|
367 | 367 | dotencode: no yes yes |
|
368 | 368 | generaldelta: no no yes |
|
369 | 369 | share-safe: no no no |
|
370 | 370 | sparserevlog: no no yes |
|
371 | 371 | persistent-nodemap: no no no (no-rust !) |
|
372 | 372 | persistent-nodemap: no yes no (rust !) |
|
373 | 373 | copies-sdc: no no no |
|
374 | 374 | revlog-v2: no no no |
|
375 | 375 | changelog-v2: no no no |
|
376 | 376 | plain-cl-delta: yes yes yes |
|
377 | 377 | compression: zlib zlib zlib (no-zstd !) |
|
378 | 378 | compression: zlib zlib zstd (zstd !) |
|
379 | 379 | compression-level: default default default |
|
380 | 380 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug |
|
381 | 381 | format-variant repo config default |
|
382 | 382 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
383 | 383 | [formatvariant.name.uptodate|dirstate-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
384 | 384 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
385 | 385 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
386 | 386 | [formatvariant.name.uptodate|share-safe: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
387 | 387 | [formatvariant.name.mismatchdefault|sparserevlog: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
388 | 388 | [formatvariant.name.uptodate|persistent-nodemap:][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] (no-rust !) |
|
389 | 389 | [formatvariant.name.mismatchconfig|persistent-nodemap:][formatvariant.repo.mismatchconfig| no][formatvariant.config.special| yes][formatvariant.default| no] (rust !) |
|
390 | 390 | [formatvariant.name.uptodate|copies-sdc: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
391 | 391 | [formatvariant.name.uptodate|revlog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
392 | 392 | [formatvariant.name.uptodate|changelog-v2: ][formatvariant.repo.uptodate| no][formatvariant.config.default| no][formatvariant.default| no] |
|
393 | 393 | [formatvariant.name.uptodate|plain-cl-delta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
394 | 394 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] (no-zstd !) |
|
395 | 395 | [formatvariant.name.mismatchdefault|compression: ][formatvariant.repo.mismatchdefault| zlib][formatvariant.config.special| zlib][formatvariant.default| zstd] (zstd !) |
|
396 | 396 | [formatvariant.name.uptodate|compression-level: ][formatvariant.repo.uptodate| default][formatvariant.config.default| default][formatvariant.default| default] |
|
397 | 397 | $ hg debugupgraderepo |
|
398 | 398 | note: selecting all-filelogs for processing to change: dotencode |
|
399 | 399 | note: selecting all-manifestlogs for processing to change: dotencode |
|
400 | 400 | note: selecting changelog for processing to change: dotencode |
|
401 | 401 | |
|
402 | 402 | repository lacks features recommended by current config options: |
|
403 | 403 | |
|
404 | 404 | fncache |
|
405 | 405 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
406 | 406 | |
|
407 | 407 | dotencode |
|
408 | 408 | storage of filenames beginning with a period or space may not work correctly |
|
409 | 409 | |
|
410 | 410 | generaldelta |
|
411 | 411 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
412 | 412 | |
|
413 | 413 | sparserevlog |
|
414 | 414 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. |
|
415 | 415 | |
|
416 | 416 | persistent-nodemap (rust !) |
|
417 | 417 | persist the node -> rev mapping on disk to speedup lookup (rust !) |
|
418 | 418 | (rust !) |
|
419 | 419 | |
|
420 | 420 | performing an upgrade with "--run" will make the following changes: |
|
421 | 421 | |
|
422 | 422 | requirements |
|
423 | 423 | preserved: revlogv1, store |
|
424 | 424 | added: dotencode, fncache, generaldelta, sparserevlog (no-rust !) |
|
425 | 425 | added: dotencode, fncache, generaldelta, persistent-nodemap, sparserevlog (rust !) |
|
426 | 426 | |
|
427 | 427 | fncache |
|
428 | 428 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
429 | 429 | |
|
430 | 430 | dotencode |
|
431 | 431 | repository will be better able to store files beginning with a space or period |
|
432 | 432 | |
|
433 | 433 | generaldelta |
|
434 | 434 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
435 | 435 | |
|
436 | 436 | sparserevlog |
|
437 | 437 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
438 | 438 | |
|
439 | 439 | persistent-nodemap (rust !) |
|
440 | 440 | Speedup revision lookup by node id. (rust !) |
|
441 | 441 | (rust !) |
|
442 | 442 | processed revlogs: |
|
443 | 443 | - all-filelogs |
|
444 | 444 | - changelog |
|
445 | 445 | - manifest |
|
446 | 446 | |
|
447 | 447 | additional optimizations are available by specifying "--optimize <name>": |
|
448 | 448 | |
|
449 | 449 | re-delta-parent |
|
450 | 450 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
451 | 451 | |
|
452 | 452 | re-delta-multibase |
|
453 | 453 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
454 | 454 | |
|
455 | 455 | re-delta-all |
|
456 | 456 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
457 | 457 | |
|
458 | 458 | re-delta-fulladd |
|
459 | 459 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
460 | 460 | |
|
461 | 461 | $ hg debugupgraderepo --quiet |
|
462 | 462 | requirements |
|
463 | 463 | preserved: revlogv1, store |
|
464 | 464 | added: dotencode, fncache, generaldelta, sparserevlog (no-rust !) |
|
465 | 465 | added: dotencode, fncache, generaldelta, persistent-nodemap, sparserevlog (rust !) |
|
466 | 466 | |
|
467 | 467 | processed revlogs: |
|
468 | 468 | - all-filelogs |
|
469 | 469 | - changelog |
|
470 | 470 | - manifest |
|
471 | 471 | |
|
472 | 472 | |
|
473 | 473 | $ hg --config format.dotencode=false debugupgraderepo |
|
474 | 474 | note: selecting all-filelogs for processing to change: fncache |
|
475 | 475 | note: selecting all-manifestlogs for processing to change: fncache |
|
476 | 476 | note: selecting changelog for processing to change: fncache |
|
477 | 477 | |
|
478 | 478 | repository lacks features recommended by current config options: |
|
479 | 479 | |
|
480 | 480 | fncache |
|
481 | 481 | long and reserved filenames may not work correctly; repository performance is sub-optimal |
|
482 | 482 | |
|
483 | 483 | generaldelta |
|
484 | 484 | deltas within internal storage are unable to choose optimal revisions; repository is larger and slower than it could be; interaction with other repositories may require extra network and CPU resources, making "hg push" and "hg pull" slower |
|
485 | 485 | |
|
486 | 486 | sparserevlog |
|
487 | 487 | in order to limit disk reading and memory usage on older version, the span of a delta chain from its root to its end is limited, whatever the relevant data in this span. This can severly limit Mercurial ability to build good chain of delta resulting is much more storage space being taken and limit reusability of on disk delta during exchange. |
|
488 | 488 | |
|
489 | 489 | persistent-nodemap (rust !) |
|
490 | 490 | persist the node -> rev mapping on disk to speedup lookup (rust !) |
|
491 | 491 | (rust !) |
|
492 | 492 | repository lacks features used by the default config options: |
|
493 | 493 | |
|
494 | 494 | dotencode |
|
495 | 495 | storage of filenames beginning with a period or space may not work correctly |
|
496 | 496 | |
|
497 | 497 | |
|
498 | 498 | performing an upgrade with "--run" will make the following changes: |
|
499 | 499 | |
|
500 | 500 | requirements |
|
501 | 501 | preserved: revlogv1, store |
|
502 | 502 | added: fncache, generaldelta, sparserevlog (no-rust !) |
|
503 | 503 | added: fncache, generaldelta, persistent-nodemap, sparserevlog (rust !) |
|
504 | 504 | |
|
505 | 505 | fncache |
|
506 | 506 | repository will be more resilient to storing certain paths and performance of certain operations should be improved |
|
507 | 507 | |
|
508 | 508 | generaldelta |
|
509 | 509 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
510 | 510 | |
|
511 | 511 | sparserevlog |
|
512 | 512 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
513 | 513 | |
|
514 | 514 | persistent-nodemap (rust !) |
|
515 | 515 | Speedup revision lookup by node id. (rust !) |
|
516 | 516 | (rust !) |
|
517 | 517 | processed revlogs: |
|
518 | 518 | - all-filelogs |
|
519 | 519 | - changelog |
|
520 | 520 | - manifest |
|
521 | 521 | |
|
522 | 522 | additional optimizations are available by specifying "--optimize <name>": |
|
523 | 523 | |
|
524 | 524 | re-delta-parent |
|
525 | 525 | deltas within internal storage will be recalculated to choose an optimal base revision where this was not already done; the size of the repository may shrink and various operations may become faster; the first time this optimization is performed could slow down upgrade execution considerably; subsequent invocations should not run noticeably slower |
|
526 | 526 | |
|
527 | 527 | re-delta-multibase |
|
528 | 528 | deltas within internal storage will be recalculated against multiple base revision and the smallest difference will be used; the size of the repository may shrink significantly when there are many merges; this optimization will slow down execution in proportion to the number of merges in the repository and the amount of files in the repository; this slow down should not be significant unless there are tens of thousands of files and thousands of merges |
|
529 | 529 | |
|
530 | 530 | re-delta-all |
|
531 | 531 | deltas within internal storage will always be recalculated without reusing prior deltas; this will likely make execution run several times slower; this optimization is typically not needed |
|
532 | 532 | |
|
533 | 533 | re-delta-fulladd |
|
534 | 534 | every revision will be re-added as if it was new content. It will go through the full storage mechanism giving extensions a chance to process it (eg. lfs). This is similar to "re-delta-all" but even slower since more logic is involved. |
|
535 | 535 | |
|
536 | 536 | |
|
537 | 537 | $ cd .. |
|
538 | 538 | |
|
539 | 539 | Upgrading a repository that is already modern essentially no-ops |
|
540 | 540 | |
|
541 | 541 | $ hg init modern |
|
542 | 542 | $ hg -R modern debugupgraderepo --run |
|
543 | 543 | nothing to do |
|
544 | 544 | |
|
545 | 545 | Upgrading a repository to generaldelta works |
|
546 | 546 | |
|
547 | 547 | $ hg --config format.usegeneraldelta=false init upgradegd |
|
548 | 548 | $ cd upgradegd |
|
549 | 549 | $ touch f0 |
|
550 | 550 | $ hg -q commit -A -m initial |
|
551 | 551 | $ mkdir FooBarDirectory.d |
|
552 | 552 | $ touch FooBarDirectory.d/f1 |
|
553 | 553 | $ hg -q commit -A -m 'add f1' |
|
554 | 554 | $ hg -q up -r 0 |
|
555 | 555 | >>> from __future__ import absolute_import, print_function |
|
556 | 556 | >>> import random |
|
557 | 557 | >>> random.seed(0) # have a reproducible content |
|
558 | 558 | >>> with open("f2", "wb") as f: |
|
559 | 559 | ... for i in range(100000): |
|
560 | 560 | ... f.write(b"%d\n" % random.randint(1000000000, 9999999999)) and None |
|
561 | 561 | $ hg -q commit -A -m 'add f2' |
|
562 | 562 | |
|
563 | 563 | make sure we have a .d file |
|
564 | 564 | |
|
565 | 565 | $ ls -d .hg/store/data/* |
|
566 | 566 | .hg/store/data/_foo_bar_directory.d.hg |
|
567 | 567 | .hg/store/data/f0.i |
|
568 | 568 | .hg/store/data/f2.d |
|
569 | 569 | .hg/store/data/f2.i |
|
570 | 570 | |
|
571 | 571 | $ hg debugupgraderepo --run --config format.sparse-revlog=false |
|
572 | 572 | note: selecting all-filelogs for processing to change: generaldelta |
|
573 | 573 | note: selecting all-manifestlogs for processing to change: generaldelta |
|
574 | 574 | note: selecting changelog for processing to change: generaldelta |
|
575 | 575 | |
|
576 | 576 | upgrade will perform the following actions: |
|
577 | 577 | |
|
578 | 578 | requirements |
|
579 | 579 | preserved: dotencode, fncache, revlogv1, store (no-rust !) |
|
580 | 580 | preserved: dotencode, fncache, persistent-nodemap, revlogv1, store (rust !) |
|
581 | 581 | added: generaldelta |
|
582 | 582 | |
|
583 | 583 | generaldelta |
|
584 | 584 | repository storage will be able to create optimal deltas; new repository data will be smaller and read times should decrease; interacting with other repositories using this storage model should require less network and CPU resources, making "hg push" and "hg pull" faster |
|
585 | 585 | |
|
586 | 586 | processed revlogs: |
|
587 | 587 | - all-filelogs |
|
588 | 588 | - changelog |
|
589 | 589 | - manifest |
|
590 | 590 | |
|
591 | 591 | beginning upgrade... |
|
592 | 592 | repository locked and read-only |
|
593 | 593 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
594 | 594 | (it is safe to interrupt this process any time before data migration completes) |
|
595 | 595 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
596 | 596 | migrating 519 KB in store; 1.05 MB tracked data |
|
597 | 597 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
598 | 598 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
599 | 599 | migrating 1 manifests containing 3 revisions (384 bytes in store; 238 bytes tracked data) |
|
600 | 600 | finished migrating 3 manifest revisions across 1 manifests; change in size: -17 bytes |
|
601 | 601 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
602 | 602 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
603 | 603 | finished migrating 9 total revisions; total change in store size: -17 bytes |
|
604 | 604 | copying phaseroots |
|
605 | 605 | data fully upgraded in a temporary repository |
|
606 | 606 | marking source repository as being upgraded; clients will be unable to read from repository |
|
607 | 607 | starting in-place swap of repository data |
|
608 | 608 | replaced files will be backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
609 | 609 | replacing store... |
|
610 | 610 | store replacement complete; repository was inconsistent for *s (glob) |
|
611 | 611 | finalizing requirements file and making repository readable again |
|
612 | 612 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
613 | 613 | copy of old repository backed up at $TESTTMP/upgradegd/.hg/upgradebackup.* (glob) |
|
614 | 614 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
615 | 615 | |
|
616 | 616 | Original requirements backed up |
|
617 | 617 | |
|
618 | 618 | $ cat .hg/upgradebackup.*/requires |
|
619 | 619 | dotencode |
|
620 | 620 | fncache |
|
621 | 621 | persistent-nodemap (rust !) |
|
622 | 622 | revlogv1 |
|
623 | 623 | store |
|
624 | 624 | |
|
625 | 625 | generaldelta added to original requirements files |
|
626 | 626 | |
|
627 |
$ |
|
|
627 | $ hg debugrequires | |
|
628 | 628 | dotencode |
|
629 | 629 | fncache |
|
630 | 630 | generaldelta |
|
631 | 631 | persistent-nodemap (rust !) |
|
632 | 632 | revlogv1 |
|
633 | 633 | store |
|
634 | 634 | |
|
635 | 635 | store directory has files we expect |
|
636 | 636 | |
|
637 | 637 | $ ls .hg/store |
|
638 | 638 | 00changelog.i |
|
639 | 639 | 00manifest.i |
|
640 | 640 | data |
|
641 | 641 | fncache |
|
642 | 642 | phaseroots |
|
643 | 643 | undo |
|
644 | 644 | undo.backupfiles |
|
645 | 645 | undo.phaseroots |
|
646 | 646 | |
|
647 | 647 | manifest should be generaldelta |
|
648 | 648 | |
|
649 | 649 | $ hg debugrevlog -m | grep flags |
|
650 | 650 | flags : inline, generaldelta |
|
651 | 651 | |
|
652 | 652 | verify should be happy |
|
653 | 653 | |
|
654 | 654 | $ hg verify |
|
655 | 655 | checking changesets |
|
656 | 656 | checking manifests |
|
657 | 657 | crosschecking files in changesets and manifests |
|
658 | 658 | checking files |
|
659 | 659 | checked 3 changesets with 3 changes to 3 files |
|
660 | 660 | |
|
661 | 661 | old store should be backed up |
|
662 | 662 | |
|
663 | 663 | $ ls -d .hg/upgradebackup.*/ |
|
664 | 664 | .hg/upgradebackup.*/ (glob) |
|
665 | 665 | $ ls .hg/upgradebackup.*/store |
|
666 | 666 | 00changelog.i |
|
667 | 667 | 00manifest.i |
|
668 | 668 | data |
|
669 | 669 | fncache |
|
670 | 670 | phaseroots |
|
671 | 671 | undo |
|
672 | 672 | undo.backup.fncache |
|
673 | 673 | undo.backupfiles |
|
674 | 674 | undo.phaseroots |
|
675 | 675 | |
|
676 | 676 | unless --no-backup is passed |
|
677 | 677 | |
|
678 | 678 | $ rm -rf .hg/upgradebackup.*/ |
|
679 | 679 | $ hg debugupgraderepo --run --no-backup |
|
680 | 680 | note: selecting all-filelogs for processing to change: sparserevlog |
|
681 | 681 | note: selecting all-manifestlogs for processing to change: sparserevlog |
|
682 | 682 | note: selecting changelog for processing to change: sparserevlog |
|
683 | 683 | |
|
684 | 684 | upgrade will perform the following actions: |
|
685 | 685 | |
|
686 | 686 | requirements |
|
687 | 687 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
688 | 688 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
689 | 689 | added: sparserevlog |
|
690 | 690 | |
|
691 | 691 | sparserevlog |
|
692 | 692 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
693 | 693 | |
|
694 | 694 | processed revlogs: |
|
695 | 695 | - all-filelogs |
|
696 | 696 | - changelog |
|
697 | 697 | - manifest |
|
698 | 698 | |
|
699 | 699 | beginning upgrade... |
|
700 | 700 | repository locked and read-only |
|
701 | 701 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
702 | 702 | (it is safe to interrupt this process any time before data migration completes) |
|
703 | 703 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
704 | 704 | migrating 519 KB in store; 1.05 MB tracked data |
|
705 | 705 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
706 | 706 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
707 | 707 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
708 | 708 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
709 | 709 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
710 | 710 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
711 | 711 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
712 | 712 | copying phaseroots |
|
713 | 713 | data fully upgraded in a temporary repository |
|
714 | 714 | marking source repository as being upgraded; clients will be unable to read from repository |
|
715 | 715 | starting in-place swap of repository data |
|
716 | 716 | replacing store... |
|
717 | 717 | store replacement complete; repository was inconsistent for * (glob) |
|
718 | 718 | finalizing requirements file and making repository readable again |
|
719 | 719 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
720 | 720 | $ ls -1 .hg/ | grep upgradebackup |
|
721 | 721 | [1] |
|
722 | 722 | |
|
723 | 723 | We can restrict optimization to some revlog: |
|
724 | 724 | |
|
725 | 725 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
726 | 726 | upgrade will perform the following actions: |
|
727 | 727 | |
|
728 | 728 | requirements |
|
729 | 729 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
730 | 730 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
731 | 731 | |
|
732 | 732 | optimisations: re-delta-parent |
|
733 | 733 | |
|
734 | 734 | re-delta-parent |
|
735 | 735 | deltas within internal storage will choose a new base revision if needed |
|
736 | 736 | |
|
737 | 737 | processed revlogs: |
|
738 | 738 | - manifest |
|
739 | 739 | |
|
740 | 740 | beginning upgrade... |
|
741 | 741 | repository locked and read-only |
|
742 | 742 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
743 | 743 | (it is safe to interrupt this process any time before data migration completes) |
|
744 | 744 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
745 | 745 | migrating 519 KB in store; 1.05 MB tracked data |
|
746 | 746 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
747 | 747 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions |
|
748 | 748 | blindly copying data/f0.i containing 1 revisions |
|
749 | 749 | blindly copying data/f2.i containing 1 revisions |
|
750 | 750 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
751 | 751 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
752 | 752 | cloning 3 revisions from 00manifest.i |
|
753 | 753 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
754 | 754 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
755 | 755 | blindly copying 00changelog.i containing 3 revisions |
|
756 | 756 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
757 | 757 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
758 | 758 | copying phaseroots |
|
759 | 759 | data fully upgraded in a temporary repository |
|
760 | 760 | marking source repository as being upgraded; clients will be unable to read from repository |
|
761 | 761 | starting in-place swap of repository data |
|
762 | 762 | replacing store... |
|
763 | 763 | store replacement complete; repository was inconsistent for *s (glob) |
|
764 | 764 | finalizing requirements file and making repository readable again |
|
765 | 765 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
766 | 766 | |
|
767 | 767 | Check that the repo still works fine |
|
768 | 768 | |
|
769 | 769 | $ hg log -G --stat |
|
770 | 770 | @ changeset: 2:76d4395f5413 (no-py3 !) |
|
771 | 771 | @ changeset: 2:fca376863211 (py3 !) |
|
772 | 772 | | tag: tip |
|
773 | 773 | | parent: 0:ba592bf28da2 |
|
774 | 774 | | user: test |
|
775 | 775 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
776 | 776 | | summary: add f2 |
|
777 | 777 | | |
|
778 | 778 | | f2 | 100000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
779 | 779 | | 1 files changed, 100000 insertions(+), 0 deletions(-) |
|
780 | 780 | | |
|
781 | 781 | | o changeset: 1:2029ce2354e2 |
|
782 | 782 | |/ user: test |
|
783 | 783 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
784 | 784 | | summary: add f1 |
|
785 | 785 | | |
|
786 | 786 | | |
|
787 | 787 | o changeset: 0:ba592bf28da2 |
|
788 | 788 | user: test |
|
789 | 789 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
790 | 790 | summary: initial |
|
791 | 791 | |
|
792 | 792 | |
|
793 | 793 | |
|
794 | 794 | $ hg verify |
|
795 | 795 | checking changesets |
|
796 | 796 | checking manifests |
|
797 | 797 | crosschecking files in changesets and manifests |
|
798 | 798 | checking files |
|
799 | 799 | checked 3 changesets with 3 changes to 3 files |
|
800 | 800 | |
|
801 | 801 | Check we can select negatively |
|
802 | 802 | |
|
803 | 803 | $ hg debugupgrade --optimize re-delta-parent --run --no-manifest --no-backup --debug --traceback |
|
804 | 804 | upgrade will perform the following actions: |
|
805 | 805 | |
|
806 | 806 | requirements |
|
807 | 807 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
808 | 808 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
809 | 809 | |
|
810 | 810 | optimisations: re-delta-parent |
|
811 | 811 | |
|
812 | 812 | re-delta-parent |
|
813 | 813 | deltas within internal storage will choose a new base revision if needed |
|
814 | 814 | |
|
815 | 815 | processed revlogs: |
|
816 | 816 | - all-filelogs |
|
817 | 817 | - changelog |
|
818 | 818 | |
|
819 | 819 | beginning upgrade... |
|
820 | 820 | repository locked and read-only |
|
821 | 821 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
822 | 822 | (it is safe to interrupt this process any time before data migration completes) |
|
823 | 823 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
824 | 824 | migrating 519 KB in store; 1.05 MB tracked data |
|
825 | 825 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
826 | 826 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
827 | 827 | cloning 1 revisions from data/f0.i |
|
828 | 828 | cloning 1 revisions from data/f2.i |
|
829 | 829 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
830 | 830 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
831 | 831 | blindly copying 00manifest.i containing 3 revisions |
|
832 | 832 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
833 | 833 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
834 | 834 | cloning 3 revisions from 00changelog.i |
|
835 | 835 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
836 | 836 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
837 | 837 | copying phaseroots |
|
838 | 838 | data fully upgraded in a temporary repository |
|
839 | 839 | marking source repository as being upgraded; clients will be unable to read from repository |
|
840 | 840 | starting in-place swap of repository data |
|
841 | 841 | replacing store... |
|
842 | 842 | store replacement complete; repository was inconsistent for *s (glob) |
|
843 | 843 | finalizing requirements file and making repository readable again |
|
844 | 844 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
845 | 845 | $ hg verify |
|
846 | 846 | checking changesets |
|
847 | 847 | checking manifests |
|
848 | 848 | crosschecking files in changesets and manifests |
|
849 | 849 | checking files |
|
850 | 850 | checked 3 changesets with 3 changes to 3 files |
|
851 | 851 | |
|
852 | 852 | Check that we can select changelog only |
|
853 | 853 | |
|
854 | 854 | $ hg debugupgrade --optimize re-delta-parent --run --changelog --no-backup --debug --traceback |
|
855 | 855 | upgrade will perform the following actions: |
|
856 | 856 | |
|
857 | 857 | requirements |
|
858 | 858 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
859 | 859 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
860 | 860 | |
|
861 | 861 | optimisations: re-delta-parent |
|
862 | 862 | |
|
863 | 863 | re-delta-parent |
|
864 | 864 | deltas within internal storage will choose a new base revision if needed |
|
865 | 865 | |
|
866 | 866 | processed revlogs: |
|
867 | 867 | - changelog |
|
868 | 868 | |
|
869 | 869 | beginning upgrade... |
|
870 | 870 | repository locked and read-only |
|
871 | 871 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
872 | 872 | (it is safe to interrupt this process any time before data migration completes) |
|
873 | 873 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
874 | 874 | migrating 519 KB in store; 1.05 MB tracked data |
|
875 | 875 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
876 | 876 | blindly copying data/FooBarDirectory.d/f1.i containing 1 revisions |
|
877 | 877 | blindly copying data/f0.i containing 1 revisions |
|
878 | 878 | blindly copying data/f2.i containing 1 revisions |
|
879 | 879 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
880 | 880 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
881 | 881 | blindly copying 00manifest.i containing 3 revisions |
|
882 | 882 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
883 | 883 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
884 | 884 | cloning 3 revisions from 00changelog.i |
|
885 | 885 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
886 | 886 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
887 | 887 | copying phaseroots |
|
888 | 888 | data fully upgraded in a temporary repository |
|
889 | 889 | marking source repository as being upgraded; clients will be unable to read from repository |
|
890 | 890 | starting in-place swap of repository data |
|
891 | 891 | replacing store... |
|
892 | 892 | store replacement complete; repository was inconsistent for *s (glob) |
|
893 | 893 | finalizing requirements file and making repository readable again |
|
894 | 894 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
895 | 895 | $ hg verify |
|
896 | 896 | checking changesets |
|
897 | 897 | checking manifests |
|
898 | 898 | crosschecking files in changesets and manifests |
|
899 | 899 | checking files |
|
900 | 900 | checked 3 changesets with 3 changes to 3 files |
|
901 | 901 | |
|
902 | 902 | Check that we can select filelog only |
|
903 | 903 | |
|
904 | 904 | $ hg debugupgrade --optimize re-delta-parent --run --no-changelog --no-manifest --no-backup --debug --traceback |
|
905 | 905 | upgrade will perform the following actions: |
|
906 | 906 | |
|
907 | 907 | requirements |
|
908 | 908 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
909 | 909 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
910 | 910 | |
|
911 | 911 | optimisations: re-delta-parent |
|
912 | 912 | |
|
913 | 913 | re-delta-parent |
|
914 | 914 | deltas within internal storage will choose a new base revision if needed |
|
915 | 915 | |
|
916 | 916 | processed revlogs: |
|
917 | 917 | - all-filelogs |
|
918 | 918 | |
|
919 | 919 | beginning upgrade... |
|
920 | 920 | repository locked and read-only |
|
921 | 921 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
922 | 922 | (it is safe to interrupt this process any time before data migration completes) |
|
923 | 923 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
924 | 924 | migrating 519 KB in store; 1.05 MB tracked data |
|
925 | 925 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
926 | 926 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
927 | 927 | cloning 1 revisions from data/f0.i |
|
928 | 928 | cloning 1 revisions from data/f2.i |
|
929 | 929 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
930 | 930 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
931 | 931 | blindly copying 00manifest.i containing 3 revisions |
|
932 | 932 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
933 | 933 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
934 | 934 | blindly copying 00changelog.i containing 3 revisions |
|
935 | 935 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
936 | 936 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
937 | 937 | copying phaseroots |
|
938 | 938 | data fully upgraded in a temporary repository |
|
939 | 939 | marking source repository as being upgraded; clients will be unable to read from repository |
|
940 | 940 | starting in-place swap of repository data |
|
941 | 941 | replacing store... |
|
942 | 942 | store replacement complete; repository was inconsistent for *s (glob) |
|
943 | 943 | finalizing requirements file and making repository readable again |
|
944 | 944 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
945 | 945 | $ hg verify |
|
946 | 946 | checking changesets |
|
947 | 947 | checking manifests |
|
948 | 948 | crosschecking files in changesets and manifests |
|
949 | 949 | checking files |
|
950 | 950 | checked 3 changesets with 3 changes to 3 files |
|
951 | 951 | |
|
952 | 952 | |
|
953 | 953 | Check you can't skip revlog clone during important format downgrade |
|
954 | 954 | |
|
955 | 955 | $ echo "[format]" > .hg/hgrc |
|
956 | 956 | $ echo "sparse-revlog=no" >> .hg/hgrc |
|
957 | 957 | $ hg debugupgrade --optimize re-delta-parent --no-manifest --no-backup --quiet |
|
958 | 958 | warning: ignoring --no-manifest, as upgrade is changing: sparserevlog |
|
959 | 959 | |
|
960 | 960 | requirements |
|
961 | 961 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
962 | 962 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
963 | 963 | removed: sparserevlog |
|
964 | 964 | |
|
965 | 965 | optimisations: re-delta-parent |
|
966 | 966 | |
|
967 | 967 | processed revlogs: |
|
968 | 968 | - all-filelogs |
|
969 | 969 | - changelog |
|
970 | 970 | - manifest |
|
971 | 971 | |
|
972 | 972 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
973 | 973 | note: selecting all-filelogs for processing to change: sparserevlog |
|
974 | 974 | note: selecting changelog for processing to change: sparserevlog |
|
975 | 975 | |
|
976 | 976 | upgrade will perform the following actions: |
|
977 | 977 | |
|
978 | 978 | requirements |
|
979 | 979 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
980 | 980 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
981 | 981 | removed: sparserevlog |
|
982 | 982 | |
|
983 | 983 | optimisations: re-delta-parent |
|
984 | 984 | |
|
985 | 985 | re-delta-parent |
|
986 | 986 | deltas within internal storage will choose a new base revision if needed |
|
987 | 987 | |
|
988 | 988 | processed revlogs: |
|
989 | 989 | - all-filelogs |
|
990 | 990 | - changelog |
|
991 | 991 | - manifest |
|
992 | 992 | |
|
993 | 993 | beginning upgrade... |
|
994 | 994 | repository locked and read-only |
|
995 | 995 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
996 | 996 | (it is safe to interrupt this process any time before data migration completes) |
|
997 | 997 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
998 | 998 | migrating 519 KB in store; 1.05 MB tracked data |
|
999 | 999 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1000 | 1000 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1001 | 1001 | cloning 1 revisions from data/f0.i |
|
1002 | 1002 | cloning 1 revisions from data/f2.i |
|
1003 | 1003 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1004 | 1004 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1005 | 1005 | cloning 3 revisions from 00manifest.i |
|
1006 | 1006 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1007 | 1007 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1008 | 1008 | cloning 3 revisions from 00changelog.i |
|
1009 | 1009 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1010 | 1010 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1011 | 1011 | copying phaseroots |
|
1012 | 1012 | data fully upgraded in a temporary repository |
|
1013 | 1013 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1014 | 1014 | starting in-place swap of repository data |
|
1015 | 1015 | replacing store... |
|
1016 | 1016 | store replacement complete; repository was inconsistent for *s (glob) |
|
1017 | 1017 | finalizing requirements file and making repository readable again |
|
1018 | 1018 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1019 | 1019 | $ hg verify |
|
1020 | 1020 | checking changesets |
|
1021 | 1021 | checking manifests |
|
1022 | 1022 | crosschecking files in changesets and manifests |
|
1023 | 1023 | checking files |
|
1024 | 1024 | checked 3 changesets with 3 changes to 3 files |
|
1025 | 1025 | |
|
1026 | 1026 | Check you can't skip revlog clone during important format upgrade |
|
1027 | 1027 | |
|
1028 | 1028 | $ echo "sparse-revlog=yes" >> .hg/hgrc |
|
1029 | 1029 | $ hg debugupgrade --optimize re-delta-parent --run --manifest --no-backup --debug --traceback |
|
1030 | 1030 | note: selecting all-filelogs for processing to change: sparserevlog |
|
1031 | 1031 | note: selecting changelog for processing to change: sparserevlog |
|
1032 | 1032 | |
|
1033 | 1033 | upgrade will perform the following actions: |
|
1034 | 1034 | |
|
1035 | 1035 | requirements |
|
1036 | 1036 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
1037 | 1037 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
1038 | 1038 | added: sparserevlog |
|
1039 | 1039 | |
|
1040 | 1040 | optimisations: re-delta-parent |
|
1041 | 1041 | |
|
1042 | 1042 | sparserevlog |
|
1043 | 1043 | Revlog supports delta chain with more unused data between payload. These gaps will be skipped at read time. This allows for better delta chains, making a better compression and faster exchange with server. |
|
1044 | 1044 | |
|
1045 | 1045 | re-delta-parent |
|
1046 | 1046 | deltas within internal storage will choose a new base revision if needed |
|
1047 | 1047 | |
|
1048 | 1048 | processed revlogs: |
|
1049 | 1049 | - all-filelogs |
|
1050 | 1050 | - changelog |
|
1051 | 1051 | - manifest |
|
1052 | 1052 | |
|
1053 | 1053 | beginning upgrade... |
|
1054 | 1054 | repository locked and read-only |
|
1055 | 1055 | creating temporary repository to stage upgraded data: $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1056 | 1056 | (it is safe to interrupt this process any time before data migration completes) |
|
1057 | 1057 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1058 | 1058 | migrating 519 KB in store; 1.05 MB tracked data |
|
1059 | 1059 | migrating 3 filelogs containing 3 revisions (518 KB in store; 1.05 MB tracked data) |
|
1060 | 1060 | cloning 1 revisions from data/FooBarDirectory.d/f1.i |
|
1061 | 1061 | cloning 1 revisions from data/f0.i |
|
1062 | 1062 | cloning 1 revisions from data/f2.i |
|
1063 | 1063 | finished migrating 3 filelog revisions across 3 filelogs; change in size: 0 bytes |
|
1064 | 1064 | migrating 1 manifests containing 3 revisions (367 bytes in store; 238 bytes tracked data) |
|
1065 | 1065 | cloning 3 revisions from 00manifest.i |
|
1066 | 1066 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1067 | 1067 | migrating changelog containing 3 revisions (394 bytes in store; 199 bytes tracked data) |
|
1068 | 1068 | cloning 3 revisions from 00changelog.i |
|
1069 | 1069 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1070 | 1070 | finished migrating 9 total revisions; total change in store size: 0 bytes |
|
1071 | 1071 | copying phaseroots |
|
1072 | 1072 | data fully upgraded in a temporary repository |
|
1073 | 1073 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1074 | 1074 | starting in-place swap of repository data |
|
1075 | 1075 | replacing store... |
|
1076 | 1076 | store replacement complete; repository was inconsistent for *s (glob) |
|
1077 | 1077 | finalizing requirements file and making repository readable again |
|
1078 | 1078 | removing temporary repository $TESTTMP/upgradegd/.hg/upgrade.* (glob) |
|
1079 | 1079 | $ hg verify |
|
1080 | 1080 | checking changesets |
|
1081 | 1081 | checking manifests |
|
1082 | 1082 | crosschecking files in changesets and manifests |
|
1083 | 1083 | checking files |
|
1084 | 1084 | checked 3 changesets with 3 changes to 3 files |
|
1085 | 1085 | |
|
1086 | 1086 | $ cd .. |
|
1087 | 1087 | |
|
1088 | 1088 | store files with special filenames aren't encoded during copy |
|
1089 | 1089 | |
|
1090 | 1090 | $ hg init store-filenames |
|
1091 | 1091 | $ cd store-filenames |
|
1092 | 1092 | $ touch foo |
|
1093 | 1093 | $ hg -q commit -A -m initial |
|
1094 | 1094 | $ touch .hg/store/.XX_special_filename |
|
1095 | 1095 | |
|
1096 | 1096 | $ hg debugupgraderepo --run |
|
1097 | 1097 | nothing to do |
|
1098 | 1098 | $ hg debugupgraderepo --run --optimize 're-delta-fulladd' |
|
1099 | 1099 | upgrade will perform the following actions: |
|
1100 | 1100 | |
|
1101 | 1101 | requirements |
|
1102 | 1102 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
1103 | 1103 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
1104 | 1104 | |
|
1105 | 1105 | optimisations: re-delta-fulladd |
|
1106 | 1106 | |
|
1107 | 1107 | re-delta-fulladd |
|
1108 | 1108 | each revision will be added as new content to the internal storage; this will likely drastically slow down execution time, but some extensions might need it |
|
1109 | 1109 | |
|
1110 | 1110 | processed revlogs: |
|
1111 | 1111 | - all-filelogs |
|
1112 | 1112 | - changelog |
|
1113 | 1113 | - manifest |
|
1114 | 1114 | |
|
1115 | 1115 | beginning upgrade... |
|
1116 | 1116 | repository locked and read-only |
|
1117 | 1117 | creating temporary repository to stage upgraded data: $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
1118 | 1118 | (it is safe to interrupt this process any time before data migration completes) |
|
1119 | 1119 | migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog) |
|
1120 | 1120 | migrating 301 bytes in store; 107 bytes tracked data |
|
1121 | 1121 | migrating 1 filelogs containing 1 revisions (64 bytes in store; 0 bytes tracked data) |
|
1122 | 1122 | finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes |
|
1123 | 1123 | migrating 1 manifests containing 1 revisions (110 bytes in store; 45 bytes tracked data) |
|
1124 | 1124 | finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1125 | 1125 | migrating changelog containing 1 revisions (127 bytes in store; 62 bytes tracked data) |
|
1126 | 1126 | finished migrating 1 changelog revisions; change in size: 0 bytes |
|
1127 | 1127 | finished migrating 3 total revisions; total change in store size: 0 bytes |
|
1128 | 1128 | copying .XX_special_filename |
|
1129 | 1129 | copying phaseroots |
|
1130 | 1130 | data fully upgraded in a temporary repository |
|
1131 | 1131 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1132 | 1132 | starting in-place swap of repository data |
|
1133 | 1133 | replaced files will be backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
1134 | 1134 | replacing store... |
|
1135 | 1135 | store replacement complete; repository was inconsistent for *s (glob) |
|
1136 | 1136 | finalizing requirements file and making repository readable again |
|
1137 | 1137 | removing temporary repository $TESTTMP/store-filenames/.hg/upgrade.* (glob) |
|
1138 | 1138 | copy of old repository backed up at $TESTTMP/store-filenames/.hg/upgradebackup.* (glob) |
|
1139 | 1139 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
1140 | 1140 | |
|
1141 | 1141 | fncache is valid after upgrade |
|
1142 | 1142 | |
|
1143 | 1143 | $ hg debugrebuildfncache |
|
1144 | 1144 | fncache already up to date |
|
1145 | 1145 | |
|
1146 | 1146 | $ cd .. |
|
1147 | 1147 | |
|
1148 | 1148 | Check upgrading a large file repository |
|
1149 | 1149 | --------------------------------------- |
|
1150 | 1150 | |
|
1151 | 1151 | $ hg init largefilesrepo |
|
1152 | 1152 | $ cat << EOF >> largefilesrepo/.hg/hgrc |
|
1153 | 1153 | > [extensions] |
|
1154 | 1154 | > largefiles = |
|
1155 | 1155 | > EOF |
|
1156 | 1156 | |
|
1157 | 1157 | $ cd largefilesrepo |
|
1158 | 1158 | $ touch foo |
|
1159 | 1159 | $ hg add --large foo |
|
1160 | 1160 | $ hg -q commit -m initial |
|
1161 | 1161 | $ cat .hg/requires |
|
1162 | 1162 | dotencode |
|
1163 | 1163 | fncache |
|
1164 | 1164 | generaldelta |
|
1165 | 1165 | largefiles |
|
1166 | 1166 | persistent-nodemap (rust !) |
|
1167 | 1167 | revlogv1 |
|
1168 | 1168 | sparserevlog |
|
1169 | 1169 | store |
|
1170 | 1170 | |
|
1171 | 1171 | $ hg debugupgraderepo --run |
|
1172 | 1172 | nothing to do |
|
1173 | 1173 | $ cat .hg/requires |
|
1174 | 1174 | dotencode |
|
1175 | 1175 | fncache |
|
1176 | 1176 | generaldelta |
|
1177 | 1177 | largefiles |
|
1178 | 1178 | persistent-nodemap (rust !) |
|
1179 | 1179 | revlogv1 |
|
1180 | 1180 | sparserevlog |
|
1181 | 1181 | store |
|
1182 | 1182 | |
|
1183 | 1183 | $ cat << EOF >> .hg/hgrc |
|
1184 | 1184 | > [extensions] |
|
1185 | 1185 | > lfs = |
|
1186 | 1186 | > [lfs] |
|
1187 | 1187 | > threshold = 10 |
|
1188 | 1188 | > EOF |
|
1189 | 1189 | $ echo '123456789012345' > lfs.bin |
|
1190 | 1190 | $ hg ci -Am 'lfs.bin' |
|
1191 | 1191 | adding lfs.bin |
|
1192 | 1192 | $ grep lfs .hg/requires |
|
1193 | 1193 | lfs |
|
1194 | 1194 | $ find .hg/store/lfs -type f |
|
1195 | 1195 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1196 | 1196 | |
|
1197 | 1197 | $ hg debugupgraderepo --run |
|
1198 | 1198 | nothing to do |
|
1199 | 1199 | |
|
1200 | 1200 | $ grep lfs .hg/requires |
|
1201 | 1201 | lfs |
|
1202 | 1202 | $ find .hg/store/lfs -type f |
|
1203 | 1203 | .hg/store/lfs/objects/d0/beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1204 | 1204 | $ hg verify |
|
1205 | 1205 | checking changesets |
|
1206 | 1206 | checking manifests |
|
1207 | 1207 | crosschecking files in changesets and manifests |
|
1208 | 1208 | checking files |
|
1209 | 1209 | checked 2 changesets with 2 changes to 2 files |
|
1210 | 1210 | $ hg debugdata lfs.bin 0 |
|
1211 | 1211 | version https://git-lfs.github.com/spec/v1 |
|
1212 | 1212 | oid sha256:d0beab232adff5ba365880366ad30b1edb85c4c5372442b5d2fe27adc96d653f |
|
1213 | 1213 | size 16 |
|
1214 | 1214 | x-is-binary 0 |
|
1215 | 1215 | |
|
1216 | 1216 | $ cd .. |
|
1217 | 1217 | |
|
1218 | 1218 | repository config is taken in account |
|
1219 | 1219 | ------------------------------------- |
|
1220 | 1220 | |
|
1221 | 1221 | $ cat << EOF >> $HGRCPATH |
|
1222 | 1222 | > [format] |
|
1223 | 1223 | > maxchainlen = 1 |
|
1224 | 1224 | > EOF |
|
1225 | 1225 | |
|
1226 | 1226 | $ hg init localconfig |
|
1227 | 1227 | $ cd localconfig |
|
1228 | 1228 | $ cat << EOF > file |
|
1229 | 1229 | > some content |
|
1230 | 1230 | > with some length |
|
1231 | 1231 | > to make sure we get a delta |
|
1232 | 1232 | > after changes |
|
1233 | 1233 | > very long |
|
1234 | 1234 | > very long |
|
1235 | 1235 | > very long |
|
1236 | 1236 | > very long |
|
1237 | 1237 | > very long |
|
1238 | 1238 | > very long |
|
1239 | 1239 | > very long |
|
1240 | 1240 | > very long |
|
1241 | 1241 | > very long |
|
1242 | 1242 | > very long |
|
1243 | 1243 | > very long |
|
1244 | 1244 | > EOF |
|
1245 | 1245 | $ hg -q commit -A -m A |
|
1246 | 1246 | $ echo "new line" >> file |
|
1247 | 1247 | $ hg -q commit -m B |
|
1248 | 1248 | $ echo "new line" >> file |
|
1249 | 1249 | $ hg -q commit -m C |
|
1250 | 1250 | |
|
1251 | 1251 | $ cat << EOF >> .hg/hgrc |
|
1252 | 1252 | > [format] |
|
1253 | 1253 | > maxchainlen = 9001 |
|
1254 | 1254 | > EOF |
|
1255 | 1255 | $ hg config format |
|
1256 | 1256 | format.revlog-compression=$BUNDLE2_COMPRESSIONS$ |
|
1257 | 1257 | format.maxchainlen=9001 |
|
1258 | 1258 | $ hg debugdeltachain file |
|
1259 | 1259 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
1260 | 1260 | 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 |
|
1261 | 1261 | 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 |
|
1262 | 1262 | 2 1 2 0 other 30 200 107 0.53500 128 21 0.19626 128 128 0.83594 1 |
|
1263 | 1263 | |
|
1264 | 1264 | $ hg debugupgraderepo --run --optimize 're-delta-all' |
|
1265 | 1265 | upgrade will perform the following actions: |
|
1266 | 1266 | |
|
1267 | 1267 | requirements |
|
1268 | 1268 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
1269 | 1269 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
1270 | 1270 | |
|
1271 | 1271 | optimisations: re-delta-all |
|
1272 | 1272 | |
|
1273 | 1273 | re-delta-all |
|
1274 | 1274 | deltas within internal storage will be fully recomputed; this will likely drastically slow down execution time |
|
1275 | 1275 | |
|
1276 | 1276 | processed revlogs: |
|
1277 | 1277 | - all-filelogs |
|
1278 | 1278 | - changelog |
|
1279 | 1279 | - manifest |
|
1280 | 1280 | |
|
1281 | 1281 | beginning upgrade... |
|
1282 | 1282 | repository locked and read-only |
|
1283 | 1283 | creating temporary repository to stage upgraded data: $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
1284 | 1284 | (it is safe to interrupt this process any time before data migration completes) |
|
1285 | 1285 | migrating 9 total revisions (3 in filelogs, 3 in manifests, 3 in changelog) |
|
1286 | 1286 | migrating 1019 bytes in store; 882 bytes tracked data |
|
1287 | 1287 | migrating 1 filelogs containing 3 revisions (320 bytes in store; 573 bytes tracked data) |
|
1288 | 1288 | finished migrating 3 filelog revisions across 1 filelogs; change in size: -9 bytes |
|
1289 | 1289 | migrating 1 manifests containing 3 revisions (333 bytes in store; 138 bytes tracked data) |
|
1290 | 1290 | finished migrating 3 manifest revisions across 1 manifests; change in size: 0 bytes |
|
1291 | 1291 | migrating changelog containing 3 revisions (366 bytes in store; 171 bytes tracked data) |
|
1292 | 1292 | finished migrating 3 changelog revisions; change in size: 0 bytes |
|
1293 | 1293 | finished migrating 9 total revisions; total change in store size: -9 bytes |
|
1294 | 1294 | copying phaseroots |
|
1295 | 1295 | data fully upgraded in a temporary repository |
|
1296 | 1296 | marking source repository as being upgraded; clients will be unable to read from repository |
|
1297 | 1297 | starting in-place swap of repository data |
|
1298 | 1298 | replaced files will be backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
1299 | 1299 | replacing store... |
|
1300 | 1300 | store replacement complete; repository was inconsistent for *s (glob) |
|
1301 | 1301 | finalizing requirements file and making repository readable again |
|
1302 | 1302 | removing temporary repository $TESTTMP/localconfig/.hg/upgrade.* (glob) |
|
1303 | 1303 | copy of old repository backed up at $TESTTMP/localconfig/.hg/upgradebackup.* (glob) |
|
1304 | 1304 | the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified |
|
1305 | 1305 | $ hg debugdeltachain file |
|
1306 | 1306 | rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio readsize largestblk rddensity srchunks |
|
1307 | 1307 | 0 1 1 -1 base 77 182 77 0.42308 77 0 0.00000 77 77 1.00000 1 |
|
1308 | 1308 | 1 1 2 0 p1 21 191 98 0.51309 98 0 0.00000 98 98 1.00000 1 |
|
1309 | 1309 | 2 1 3 1 p1 21 200 119 0.59500 119 0 0.00000 119 119 1.00000 1 |
|
1310 | 1310 | $ cd .. |
|
1311 | 1311 | |
|
1312 | 1312 | $ cat << EOF >> $HGRCPATH |
|
1313 | 1313 | > [format] |
|
1314 | 1314 | > maxchainlen = 9001 |
|
1315 | 1315 | > EOF |
|
1316 | 1316 | |
|
1317 | 1317 | Check upgrading a sparse-revlog repository |
|
1318 | 1318 | --------------------------------------- |
|
1319 | 1319 | |
|
1320 | 1320 | $ hg init sparserevlogrepo --config format.sparse-revlog=no |
|
1321 | 1321 | $ cd sparserevlogrepo |
|
1322 | 1322 | $ touch foo |
|
1323 | 1323 | $ hg add foo |
|
1324 | 1324 | $ hg -q commit -m "foo" |
|
1325 | 1325 | $ cat .hg/requires |
|
1326 | 1326 | dotencode |
|
1327 | 1327 | fncache |
|
1328 | 1328 | generaldelta |
|
1329 | 1329 | persistent-nodemap (rust !) |
|
1330 | 1330 | revlogv1 |
|
1331 | 1331 | store |
|
1332 | 1332 | |
|
1333 | 1333 | Check that we can add the sparse-revlog format requirement |
|
1334 | 1334 | $ hg --config format.sparse-revlog=yes debugupgraderepo --run --quiet |
|
1335 | 1335 | upgrade will perform the following actions: |
|
1336 | 1336 | |
|
1337 | 1337 | requirements |
|
1338 | 1338 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
1339 | 1339 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
1340 | 1340 | added: sparserevlog |
|
1341 | 1341 | |
|
1342 | 1342 | processed revlogs: |
|
1343 | 1343 | - all-filelogs |
|
1344 | 1344 | - changelog |
|
1345 | 1345 | - manifest |
|
1346 | 1346 | |
|
1347 | 1347 | $ cat .hg/requires |
|
1348 | 1348 | dotencode |
|
1349 | 1349 | fncache |
|
1350 | 1350 | generaldelta |
|
1351 | 1351 | persistent-nodemap (rust !) |
|
1352 | 1352 | revlogv1 |
|
1353 | 1353 | sparserevlog |
|
1354 | 1354 | store |
|
1355 | 1355 | |
|
1356 | 1356 | Check that we can remove the sparse-revlog format requirement |
|
1357 | 1357 | $ hg --config format.sparse-revlog=no debugupgraderepo --run --quiet |
|
1358 | 1358 | upgrade will perform the following actions: |
|
1359 | 1359 | |
|
1360 | 1360 | requirements |
|
1361 | 1361 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
1362 | 1362 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
1363 | 1363 | removed: sparserevlog |
|
1364 | 1364 | |
|
1365 | 1365 | processed revlogs: |
|
1366 | 1366 | - all-filelogs |
|
1367 | 1367 | - changelog |
|
1368 | 1368 | - manifest |
|
1369 | 1369 | |
|
1370 | 1370 | $ cat .hg/requires |
|
1371 | 1371 | dotencode |
|
1372 | 1372 | fncache |
|
1373 | 1373 | generaldelta |
|
1374 | 1374 | persistent-nodemap (rust !) |
|
1375 | 1375 | revlogv1 |
|
1376 | 1376 | store |
|
1377 | 1377 | |
|
1378 | 1378 | #if zstd |
|
1379 | 1379 | |
|
1380 | 1380 | Check upgrading to a zstd revlog |
|
1381 | 1381 | -------------------------------- |
|
1382 | 1382 | |
|
1383 | 1383 | upgrade |
|
1384 | 1384 | |
|
1385 | 1385 | $ hg --config format.revlog-compression=zstd debugupgraderepo --run --no-backup --quiet |
|
1386 | 1386 | upgrade will perform the following actions: |
|
1387 | 1387 | |
|
1388 | 1388 | requirements |
|
1389 | 1389 | preserved: dotencode, fncache, generaldelta, revlogv1, store (no-rust !) |
|
1390 | 1390 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, store (rust !) |
|
1391 | 1391 | added: revlog-compression-zstd, sparserevlog |
|
1392 | 1392 | |
|
1393 | 1393 | processed revlogs: |
|
1394 | 1394 | - all-filelogs |
|
1395 | 1395 | - changelog |
|
1396 | 1396 | - manifest |
|
1397 | 1397 | |
|
1398 | 1398 | $ hg debugformat -v |
|
1399 | 1399 | format-variant repo config default |
|
1400 | 1400 | fncache: yes yes yes |
|
1401 | 1401 | dirstate-v2: no no no |
|
1402 | 1402 | dotencode: yes yes yes |
|
1403 | 1403 | generaldelta: yes yes yes |
|
1404 | 1404 | share-safe: no no no |
|
1405 | 1405 | sparserevlog: yes yes yes |
|
1406 | 1406 | persistent-nodemap: no no no (no-rust !) |
|
1407 | 1407 | persistent-nodemap: yes yes no (rust !) |
|
1408 | 1408 | copies-sdc: no no no |
|
1409 | 1409 | revlog-v2: no no no |
|
1410 | 1410 | changelog-v2: no no no |
|
1411 | 1411 | plain-cl-delta: yes yes yes |
|
1412 | 1412 | compression: zlib zlib zlib (no-zstd !) |
|
1413 | 1413 | compression: zstd zlib zstd (zstd !) |
|
1414 | 1414 | compression-level: default default default |
|
1415 | 1415 | $ cat .hg/requires |
|
1416 | 1416 | dotencode |
|
1417 | 1417 | fncache |
|
1418 | 1418 | generaldelta |
|
1419 | 1419 | persistent-nodemap (rust !) |
|
1420 | 1420 | revlog-compression-zstd |
|
1421 | 1421 | revlogv1 |
|
1422 | 1422 | sparserevlog |
|
1423 | 1423 | store |
|
1424 | 1424 | |
|
1425 | 1425 | downgrade |
|
1426 | 1426 | |
|
1427 | 1427 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1428 | 1428 | upgrade will perform the following actions: |
|
1429 | 1429 | |
|
1430 | 1430 | requirements |
|
1431 | 1431 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
1432 | 1432 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
1433 | 1433 | removed: revlog-compression-zstd |
|
1434 | 1434 | |
|
1435 | 1435 | processed revlogs: |
|
1436 | 1436 | - all-filelogs |
|
1437 | 1437 | - changelog |
|
1438 | 1438 | - manifest |
|
1439 | 1439 | |
|
1440 | 1440 | $ hg debugformat -v |
|
1441 | 1441 | format-variant repo config default |
|
1442 | 1442 | fncache: yes yes yes |
|
1443 | 1443 | dirstate-v2: no no no |
|
1444 | 1444 | dotencode: yes yes yes |
|
1445 | 1445 | generaldelta: yes yes yes |
|
1446 | 1446 | share-safe: no no no |
|
1447 | 1447 | sparserevlog: yes yes yes |
|
1448 | 1448 | persistent-nodemap: no no no (no-rust !) |
|
1449 | 1449 | persistent-nodemap: yes yes no (rust !) |
|
1450 | 1450 | copies-sdc: no no no |
|
1451 | 1451 | revlog-v2: no no no |
|
1452 | 1452 | changelog-v2: no no no |
|
1453 | 1453 | plain-cl-delta: yes yes yes |
|
1454 | 1454 | compression: zlib zlib zlib (no-zstd !) |
|
1455 | 1455 | compression: zlib zlib zstd (zstd !) |
|
1456 | 1456 | compression-level: default default default |
|
1457 | 1457 | $ cat .hg/requires |
|
1458 | 1458 | dotencode |
|
1459 | 1459 | fncache |
|
1460 | 1460 | generaldelta |
|
1461 | 1461 | persistent-nodemap (rust !) |
|
1462 | 1462 | revlogv1 |
|
1463 | 1463 | sparserevlog |
|
1464 | 1464 | store |
|
1465 | 1465 | |
|
1466 | 1466 | upgrade from hgrc |
|
1467 | 1467 | |
|
1468 | 1468 | $ cat >> .hg/hgrc << EOF |
|
1469 | 1469 | > [format] |
|
1470 | 1470 | > revlog-compression=zstd |
|
1471 | 1471 | > EOF |
|
1472 | 1472 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1473 | 1473 | upgrade will perform the following actions: |
|
1474 | 1474 | |
|
1475 | 1475 | requirements |
|
1476 | 1476 | preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store (no-rust !) |
|
1477 | 1477 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlogv1, sparserevlog, store (rust !) |
|
1478 | 1478 | added: revlog-compression-zstd |
|
1479 | 1479 | |
|
1480 | 1480 | processed revlogs: |
|
1481 | 1481 | - all-filelogs |
|
1482 | 1482 | - changelog |
|
1483 | 1483 | - manifest |
|
1484 | 1484 | |
|
1485 | 1485 | $ hg debugformat -v |
|
1486 | 1486 | format-variant repo config default |
|
1487 | 1487 | fncache: yes yes yes |
|
1488 | 1488 | dirstate-v2: no no no |
|
1489 | 1489 | dotencode: yes yes yes |
|
1490 | 1490 | generaldelta: yes yes yes |
|
1491 | 1491 | share-safe: no no no |
|
1492 | 1492 | sparserevlog: yes yes yes |
|
1493 | 1493 | persistent-nodemap: no no no (no-rust !) |
|
1494 | 1494 | persistent-nodemap: yes yes no (rust !) |
|
1495 | 1495 | copies-sdc: no no no |
|
1496 | 1496 | revlog-v2: no no no |
|
1497 | 1497 | changelog-v2: no no no |
|
1498 | 1498 | plain-cl-delta: yes yes yes |
|
1499 | 1499 | compression: zlib zlib zlib (no-zstd !) |
|
1500 | 1500 | compression: zstd zstd zstd (zstd !) |
|
1501 | 1501 | compression-level: default default default |
|
1502 | 1502 | $ cat .hg/requires |
|
1503 | 1503 | dotencode |
|
1504 | 1504 | fncache |
|
1505 | 1505 | generaldelta |
|
1506 | 1506 | persistent-nodemap (rust !) |
|
1507 | 1507 | revlog-compression-zstd |
|
1508 | 1508 | revlogv1 |
|
1509 | 1509 | sparserevlog |
|
1510 | 1510 | store |
|
1511 | 1511 | |
|
1512 | 1512 | #endif |
|
1513 | 1513 | |
|
1514 | 1514 | Check upgrading to a revlog format supporting sidedata |
|
1515 | 1515 | ------------------------------------------------------ |
|
1516 | 1516 | |
|
1517 | 1517 | upgrade |
|
1518 | 1518 | |
|
1519 | 1519 | $ hg debugsidedata -c 0 |
|
1520 | 1520 | $ hg --config experimental.revlogv2=enable-unstable-format-and-corrupt-my-data debugupgraderepo --run --no-backup --config "extensions.sidedata=$TESTDIR/testlib/ext-sidedata.py" --quiet |
|
1521 | 1521 | upgrade will perform the following actions: |
|
1522 | 1522 | |
|
1523 | 1523 | requirements |
|
1524 | 1524 | preserved: dotencode, fncache, generaldelta, store (no-zstd !) |
|
1525 | 1525 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) |
|
1526 | 1526 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) |
|
1527 | 1527 | removed: revlogv1 |
|
1528 | 1528 | added: exp-revlogv2.2 (zstd !) |
|
1529 | 1529 | added: exp-revlogv2.2, sparserevlog (no-zstd !) |
|
1530 | 1530 | |
|
1531 | 1531 | processed revlogs: |
|
1532 | 1532 | - all-filelogs |
|
1533 | 1533 | - changelog |
|
1534 | 1534 | - manifest |
|
1535 | 1535 | |
|
1536 | 1536 | $ hg debugformat -v |
|
1537 | 1537 | format-variant repo config default |
|
1538 | 1538 | fncache: yes yes yes |
|
1539 | 1539 | dirstate-v2: no no no |
|
1540 | 1540 | dotencode: yes yes yes |
|
1541 | 1541 | generaldelta: yes yes yes |
|
1542 | 1542 | share-safe: no no no |
|
1543 | 1543 | sparserevlog: yes yes yes |
|
1544 | 1544 | persistent-nodemap: no no no (no-rust !) |
|
1545 | 1545 | persistent-nodemap: yes yes no (rust !) |
|
1546 | 1546 | copies-sdc: no no no |
|
1547 | 1547 | revlog-v2: yes no no |
|
1548 | 1548 | changelog-v2: no no no |
|
1549 | 1549 | plain-cl-delta: yes yes yes |
|
1550 | 1550 | compression: zlib zlib zlib (no-zstd !) |
|
1551 | 1551 | compression: zstd zstd zstd (zstd !) |
|
1552 | 1552 | compression-level: default default default |
|
1553 | 1553 | $ cat .hg/requires |
|
1554 | 1554 | dotencode |
|
1555 | 1555 | exp-revlogv2.2 |
|
1556 | 1556 | fncache |
|
1557 | 1557 | generaldelta |
|
1558 | 1558 | persistent-nodemap (rust !) |
|
1559 | 1559 | revlog-compression-zstd (zstd !) |
|
1560 | 1560 | sparserevlog |
|
1561 | 1561 | store |
|
1562 | 1562 | $ hg debugsidedata -c 0 |
|
1563 | 1563 | 2 sidedata entries |
|
1564 | 1564 | entry-0001 size 4 |
|
1565 | 1565 | entry-0002 size 32 |
|
1566 | 1566 | |
|
1567 | 1567 | downgrade |
|
1568 | 1568 | |
|
1569 | 1569 | $ hg debugupgraderepo --config experimental.revlogv2=no --run --no-backup --quiet |
|
1570 | 1570 | upgrade will perform the following actions: |
|
1571 | 1571 | |
|
1572 | 1572 | requirements |
|
1573 | 1573 | preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !) |
|
1574 | 1574 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) |
|
1575 | 1575 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) |
|
1576 | 1576 | removed: exp-revlogv2.2 |
|
1577 | 1577 | added: revlogv1 |
|
1578 | 1578 | |
|
1579 | 1579 | processed revlogs: |
|
1580 | 1580 | - all-filelogs |
|
1581 | 1581 | - changelog |
|
1582 | 1582 | - manifest |
|
1583 | 1583 | |
|
1584 | 1584 | $ hg debugformat -v |
|
1585 | 1585 | format-variant repo config default |
|
1586 | 1586 | fncache: yes yes yes |
|
1587 | 1587 | dirstate-v2: no no no |
|
1588 | 1588 | dotencode: yes yes yes |
|
1589 | 1589 | generaldelta: yes yes yes |
|
1590 | 1590 | share-safe: no no no |
|
1591 | 1591 | sparserevlog: yes yes yes |
|
1592 | 1592 | persistent-nodemap: no no no (no-rust !) |
|
1593 | 1593 | persistent-nodemap: yes yes no (rust !) |
|
1594 | 1594 | copies-sdc: no no no |
|
1595 | 1595 | revlog-v2: no no no |
|
1596 | 1596 | changelog-v2: no no no |
|
1597 | 1597 | plain-cl-delta: yes yes yes |
|
1598 | 1598 | compression: zlib zlib zlib (no-zstd !) |
|
1599 | 1599 | compression: zstd zstd zstd (zstd !) |
|
1600 | 1600 | compression-level: default default default |
|
1601 | 1601 | $ cat .hg/requires |
|
1602 | 1602 | dotencode |
|
1603 | 1603 | fncache |
|
1604 | 1604 | generaldelta |
|
1605 | 1605 | persistent-nodemap (rust !) |
|
1606 | 1606 | revlog-compression-zstd (zstd !) |
|
1607 | 1607 | revlogv1 |
|
1608 | 1608 | sparserevlog |
|
1609 | 1609 | store |
|
1610 | 1610 | $ hg debugsidedata -c 0 |
|
1611 | 1611 | |
|
1612 | 1612 | upgrade from hgrc |
|
1613 | 1613 | |
|
1614 | 1614 | $ cat >> .hg/hgrc << EOF |
|
1615 | 1615 | > [experimental] |
|
1616 | 1616 | > revlogv2=enable-unstable-format-and-corrupt-my-data |
|
1617 | 1617 | > EOF |
|
1618 | 1618 | $ hg debugupgraderepo --run --no-backup --quiet |
|
1619 | 1619 | upgrade will perform the following actions: |
|
1620 | 1620 | |
|
1621 | 1621 | requirements |
|
1622 | 1622 | preserved: dotencode, fncache, generaldelta, sparserevlog, store (no-zstd !) |
|
1623 | 1623 | preserved: dotencode, fncache, generaldelta, revlog-compression-zstd, sparserevlog, store (zstd no-rust !) |
|
1624 | 1624 | preserved: dotencode, fncache, generaldelta, persistent-nodemap, revlog-compression-zstd, sparserevlog, store (rust !) |
|
1625 | 1625 | removed: revlogv1 |
|
1626 | 1626 | added: exp-revlogv2.2 |
|
1627 | 1627 | |
|
1628 | 1628 | processed revlogs: |
|
1629 | 1629 | - all-filelogs |
|
1630 | 1630 | - changelog |
|
1631 | 1631 | - manifest |
|
1632 | 1632 | |
|
1633 | 1633 | $ hg debugformat -v |
|
1634 | 1634 | format-variant repo config default |
|
1635 | 1635 | fncache: yes yes yes |
|
1636 | 1636 | dirstate-v2: no no no |
|
1637 | 1637 | dotencode: yes yes yes |
|
1638 | 1638 | generaldelta: yes yes yes |
|
1639 | 1639 | share-safe: no no no |
|
1640 | 1640 | sparserevlog: yes yes yes |
|
1641 | 1641 | persistent-nodemap: no no no (no-rust !) |
|
1642 | 1642 | persistent-nodemap: yes yes no (rust !) |
|
1643 | 1643 | copies-sdc: no no no |
|
1644 | 1644 | revlog-v2: yes yes no |
|
1645 | 1645 | changelog-v2: no no no |
|
1646 | 1646 | plain-cl-delta: yes yes yes |
|
1647 | 1647 | compression: zlib zlib zlib (no-zstd !) |
|
1648 | 1648 | compression: zstd zstd zstd (zstd !) |
|
1649 | 1649 | compression-level: default default default |
|
1650 | 1650 | $ cat .hg/requires |
|
1651 | 1651 | dotencode |
|
1652 | 1652 | exp-revlogv2.2 |
|
1653 | 1653 | fncache |
|
1654 | 1654 | generaldelta |
|
1655 | 1655 | persistent-nodemap (rust !) |
|
1656 | 1656 | revlog-compression-zstd (zstd !) |
|
1657 | 1657 | sparserevlog |
|
1658 | 1658 | store |
|
1659 | 1659 | $ hg debugsidedata -c 0 |
|
1660 | 1660 | |
|
1661 | 1661 | Demonstrate that nothing to perform upgrade will still run all the way through |
|
1662 | 1662 | |
|
1663 | 1663 | $ hg debugupgraderepo --run |
|
1664 | 1664 | nothing to do |
|
1665 | 1665 | |
|
1666 | 1666 | #if no-rust |
|
1667 | 1667 | |
|
1668 | 1668 | $ cat << EOF >> $HGRCPATH |
|
1669 | 1669 | > [storage] |
|
1670 | 1670 | > dirstate-v2.slow-path = allow |
|
1671 | 1671 | > EOF |
|
1672 | 1672 | |
|
1673 | 1673 | #endif |
|
1674 | 1674 | |
|
1675 | 1675 | Upgrade to dirstate-v2 |
|
1676 | 1676 | |
|
1677 | 1677 | $ hg debugformat -v --config format.exp-rc-dirstate-v2=1 | grep dirstate-v2 |
|
1678 | 1678 | dirstate-v2: no yes no |
|
1679 | 1679 | $ hg debugupgraderepo --config format.exp-rc-dirstate-v2=1 --run |
|
1680 | 1680 | upgrade will perform the following actions: |
|
1681 | 1681 | |
|
1682 | 1682 | requirements |
|
1683 | 1683 | preserved: * (glob) |
|
1684 | 1684 | added: dirstate-v2 |
|
1685 | 1685 | |
|
1686 | 1686 | dirstate-v2 |
|
1687 | 1687 | "hg status" will be faster |
|
1688 | 1688 | |
|
1689 | 1689 | no revlogs to process |
|
1690 | 1690 | |
|
1691 | 1691 | beginning upgrade... |
|
1692 | 1692 | repository locked and read-only |
|
1693 | 1693 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1694 | 1694 | (it is safe to interrupt this process any time before data migration completes) |
|
1695 | 1695 | upgrading to dirstate-v2 from v1 |
|
1696 | 1696 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) |
|
1697 | 1697 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1698 | 1698 | $ ls .hg/upgradebackup.*/dirstate |
|
1699 | 1699 | .hg/upgradebackup.*/dirstate (glob) |
|
1700 | 1700 | $ hg debugformat -v | grep dirstate-v2 |
|
1701 | 1701 | dirstate-v2: yes no no |
|
1702 | 1702 | $ hg status |
|
1703 | 1703 | $ dd bs=12 count=1 if=.hg/dirstate 2> /dev/null |
|
1704 | 1704 | dirstate-v2 |
|
1705 | 1705 | |
|
1706 | 1706 | Downgrade from dirstate-v2 |
|
1707 | 1707 | |
|
1708 | 1708 | $ hg debugupgraderepo --run |
|
1709 | 1709 | upgrade will perform the following actions: |
|
1710 | 1710 | |
|
1711 | 1711 | requirements |
|
1712 | 1712 | preserved: * (glob) |
|
1713 | 1713 | removed: dirstate-v2 |
|
1714 | 1714 | |
|
1715 | 1715 | no revlogs to process |
|
1716 | 1716 | |
|
1717 | 1717 | beginning upgrade... |
|
1718 | 1718 | repository locked and read-only |
|
1719 | 1719 | creating temporary repository to stage upgraded data: $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1720 | 1720 | (it is safe to interrupt this process any time before data migration completes) |
|
1721 | 1721 | downgrading from dirstate-v2 to v1 |
|
1722 | 1722 | replaced files will be backed up at $TESTTMP/sparserevlogrepo/.hg/upgradebackup.* (glob) |
|
1723 | 1723 | removing temporary repository $TESTTMP/sparserevlogrepo/.hg/upgrade.* (glob) |
|
1724 | 1724 | $ hg debugformat -v | grep dirstate-v2 |
|
1725 | 1725 | dirstate-v2: no no no |
|
1726 | 1726 | $ hg status |
|
1727 | 1727 | |
|
1728 | 1728 | $ cd .. |
|
1729 | 1729 | |
|
1730 | 1730 | dirstate-v2: upgrade and downgrade from and empty repository: |
|
1731 | 1731 | ------------------------------------------------------------- |
|
1732 | 1732 | |
|
1733 | 1733 | $ hg init --config format.exp-rc-dirstate-v2=no dirstate-v2-empty |
|
1734 | 1734 | $ cd dirstate-v2-empty |
|
1735 | 1735 | $ hg debugformat | grep dirstate-v2 |
|
1736 | 1736 | dirstate-v2: no |
|
1737 | 1737 | |
|
1738 | 1738 | upgrade |
|
1739 | 1739 | |
|
1740 | 1740 | $ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=yes |
|
1741 | 1741 | upgrade will perform the following actions: |
|
1742 | 1742 | |
|
1743 | 1743 | requirements |
|
1744 | 1744 | preserved: * (glob) |
|
1745 | 1745 | added: dirstate-v2 |
|
1746 | 1746 | |
|
1747 | 1747 | dirstate-v2 |
|
1748 | 1748 | "hg status" will be faster |
|
1749 | 1749 | |
|
1750 | 1750 | no revlogs to process |
|
1751 | 1751 | |
|
1752 | 1752 | beginning upgrade... |
|
1753 | 1753 | repository locked and read-only |
|
1754 | 1754 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1755 | 1755 | (it is safe to interrupt this process any time before data migration completes) |
|
1756 | 1756 | upgrading to dirstate-v2 from v1 |
|
1757 | 1757 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) |
|
1758 | 1758 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1759 | 1759 | $ hg debugformat | grep dirstate-v2 |
|
1760 | 1760 | dirstate-v2: yes |
|
1761 | 1761 | |
|
1762 | 1762 | downgrade |
|
1763 | 1763 | |
|
1764 | 1764 | $ hg debugupgraderepo --run --config format.exp-rc-dirstate-v2=no |
|
1765 | 1765 | upgrade will perform the following actions: |
|
1766 | 1766 | |
|
1767 | 1767 | requirements |
|
1768 | 1768 | preserved: * (glob) |
|
1769 | 1769 | removed: dirstate-v2 |
|
1770 | 1770 | |
|
1771 | 1771 | no revlogs to process |
|
1772 | 1772 | |
|
1773 | 1773 | beginning upgrade... |
|
1774 | 1774 | repository locked and read-only |
|
1775 | 1775 | creating temporary repository to stage upgraded data: $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1776 | 1776 | (it is safe to interrupt this process any time before data migration completes) |
|
1777 | 1777 | downgrading from dirstate-v2 to v1 |
|
1778 | 1778 | replaced files will be backed up at $TESTTMP/dirstate-v2-empty/.hg/upgradebackup.* (glob) |
|
1779 | 1779 | removing temporary repository $TESTTMP/dirstate-v2-empty/.hg/upgrade.* (glob) |
|
1780 | 1780 | $ hg debugformat | grep dirstate-v2 |
|
1781 | 1781 | dirstate-v2: no |
|
1782 | 1782 | |
|
1783 | 1783 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now