comparison tests/test-sparse-profiles.t @ 33293:c9cbf4de27ba

sparse: rename command to debugsparse Sparse checkout is still highly experimental and not protected by BC guarantees yet. We also haven't had a discussion on the UX. To discourage use, we rename the sparse command to debugsparse.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 01 Jul 2017 10:29:27 -0700
parents abd7dedbaa36
children de324547c751
comparison
equal deleted inserted replaced
33292:1e9fd2c35ae3 33293:c9cbf4de27ba
23 > [include] 23 > [include]
24 > *.py 24 > *.py
25 > EOF 25 > EOF
26 $ hg ci -Aqm 'initial' 26 $ hg ci -Aqm 'initial'
27 27
28 $ hg sparse --include '*.sparse' 28 $ hg debugsparse --include '*.sparse'
29 29
30 Verify enabling a single profile works 30 Verify enabling a single profile works
31 31
32 $ hg sparse --enable-profile webpage.sparse 32 $ hg debugsparse --enable-profile webpage.sparse
33 $ ls 33 $ ls
34 backend.sparse 34 backend.sparse
35 index.html 35 index.html
36 webpage.sparse 36 webpage.sparse
37 37
38 Verify enabling two profiles works 38 Verify enabling two profiles works
39 39
40 $ hg sparse --enable-profile backend.sparse 40 $ hg debugsparse --enable-profile backend.sparse
41 $ ls 41 $ ls
42 backend.sparse 42 backend.sparse
43 data.py 43 data.py
44 index.html 44 index.html
45 webpage.sparse 45 webpage.sparse
46 46
47 Verify disabling a profile works 47 Verify disabling a profile works
48 48
49 $ hg sparse --disable-profile webpage.sparse 49 $ hg debugsparse --disable-profile webpage.sparse
50 $ ls 50 $ ls
51 backend.sparse 51 backend.sparse
52 data.py 52 data.py
53 webpage.sparse 53 webpage.sparse
54 54
218 218
219 Test checking out a commit that does not contain the sparse profile. The 219 Test checking out a commit that does not contain the sparse profile. The
220 warning message can be suppressed by setting missingwarning = false in 220 warning message can be suppressed by setting missingwarning = false in
221 [sparse] section of your config: 221 [sparse] section of your config:
222 222
223 $ hg sparse --reset 223 $ hg debugsparse --reset
224 $ hg rm *.sparse 224 $ hg rm *.sparse
225 $ hg commit -m "delete profiles" 225 $ hg commit -m "delete profiles"
226 $ hg up -q ".^" 226 $ hg up -q ".^"
227 $ hg sparse --enable-profile backend.sparse 227 $ hg debugsparse --enable-profile backend.sparse
228 $ ls 228 $ ls
229 index.html 229 index.html
230 readme.txt 230 readme.txt
231 $ hg up tip | grep warning 231 $ hg up tip | grep warning
232 warning: sparse profile 'backend.sparse' not found in rev bfcb76de99cc - ignoring it 232 warning: sparse profile 'backend.sparse' not found in rev bfcb76de99cc - ignoring it
233 [1] 233 [1]
234 $ ls 234 $ ls
235 data.py 235 data.py
236 index.html 236 index.html
237 readme.txt 237 readme.txt
238 $ hg sparse --disable-profile backend.sparse | grep warning 238 $ hg debugsparse --disable-profile backend.sparse | grep warning
239 warning: sparse profile 'backend.sparse' not found in rev bfcb76de99cc - ignoring it 239 warning: sparse profile 'backend.sparse' not found in rev bfcb76de99cc - ignoring it
240 [1] 240 [1]
241 $ cat >> .hg/hgrc <<EOF 241 $ cat >> .hg/hgrc <<EOF
242 > [sparse] 242 > [sparse]
243 > missingwarning = false 243 > missingwarning = false
244 > EOF 244 > EOF
245 $ hg sparse --enable-profile backend.sparse 245 $ hg debugsparse --enable-profile backend.sparse
246 246
247 $ cd .. 247 $ cd ..
248 248
249 Test file permissions changing across a sparse profile change 249 Test file permissions changing across a sparse profile change
250 $ hg init sparseperm 250 $ hg init sparseperm
263 $ cat >> .hgsparse <<EOF 263 $ cat >> .hgsparse <<EOF
264 > b 264 > b
265 > EOF 265 > EOF
266 $ hg commit -qm 'update profile' 266 $ hg commit -qm 'update profile'
267 $ hg up -q 0 267 $ hg up -q 0
268 $ hg sparse --enable-profile .hgsparse 268 $ hg debugsparse --enable-profile .hgsparse
269 $ hg up -q 2 269 $ hg up -q 2
270 $ ls -l b 270 $ ls -l b
271 -rwxr-xr-x* b (glob) 271 -rwxr-xr-x* b (glob)
272 272