Show More
@@ -335,7 +335,7 b' def _setupdirstate(ui):' | |||||
335 |
|
335 | |||
336 | # Prevent adding files that are outside the sparse checkout |
|
336 | # Prevent adding files that are outside the sparse checkout | |
337 | editfuncs = ['normal', 'add', 'normallookup', 'copy', 'remove', 'merge'] |
|
337 | editfuncs = ['normal', 'add', 'normallookup', 'copy', 'remove', 'merge'] | |
338 | hint = _('include file with `hg sparse --include <pattern>` or use ' + |
|
338 | hint = _('include file with `hg debugsparse --include <pattern>` or use ' + | |
339 | '`hg add -s <file>` to include file directory while adding') |
|
339 | '`hg add -s <file>` to include file directory while adding') | |
340 | for func in editfuncs: |
|
340 | for func in editfuncs: | |
341 | def _wrapper(orig, self, *args): |
|
341 | def _wrapper(orig, self, *args): | |
@@ -622,7 +622,7 b' def _wraprepo(ui, repo):' | |||||
622 | repo.signaturecache = {} |
|
622 | repo.signaturecache = {} | |
623 | repo.__class__ = SparseRepo |
|
623 | repo.__class__ = SparseRepo | |
624 |
|
624 | |||
625 | @command('^sparse', [ |
|
625 | @command('^debugsparse', [ | |
626 | ('I', 'include', False, _('include files in the sparse checkout')), |
|
626 | ('I', 'include', False, _('include files in the sparse checkout')), | |
627 | ('X', 'exclude', False, _('exclude files in the sparse checkout')), |
|
627 | ('X', 'exclude', False, _('exclude files in the sparse checkout')), | |
628 | ('d', 'delete', False, _('delete an include/exclude rule')), |
|
628 | ('d', 'delete', False, _('delete an include/exclude rule')), | |
@@ -635,7 +635,7 b' def _wraprepo(ui, repo):' | |||||
635 | ('', 'reset', False, _('makes the repo full again')), |
|
635 | ('', 'reset', False, _('makes the repo full again')), | |
636 | ] + commands.templateopts, |
|
636 | ] + commands.templateopts, | |
637 | _('[--OPTION] PATTERN...')) |
|
637 | _('[--OPTION] PATTERN...')) | |
638 | def sparse(ui, repo, *pats, **opts): |
|
638 | def debugsparse(ui, repo, *pats, **opts): | |
639 | """make the current checkout sparse, or edit the existing checkout |
|
639 | """make the current checkout sparse, or edit the existing checkout | |
640 |
|
640 | |||
641 | The sparse command is used to make the current checkout sparse. |
|
641 | The sparse command is used to make the current checkout sparse. |
@@ -27,10 +27,10 b' test sparse' | |||||
27 |
|
27 | |||
28 | Clear rules when there are includes |
|
28 | Clear rules when there are includes | |
29 |
|
29 | |||
30 | $ hg sparse --include *.py |
|
30 | $ hg debugsparse --include *.py | |
31 | $ ls |
|
31 | $ ls | |
32 | data.py |
|
32 | data.py | |
33 | $ hg sparse --clear-rules |
|
33 | $ hg debugsparse --clear-rules | |
34 | $ ls |
|
34 | $ ls | |
35 | base.sparse |
|
35 | base.sparse | |
36 | data.py |
|
36 | data.py | |
@@ -40,12 +40,12 b' Clear rules when there are includes' | |||||
40 |
|
40 | |||
41 | Clear rules when there are excludes |
|
41 | Clear rules when there are excludes | |
42 |
|
42 | |||
43 | $ hg sparse --exclude *.sparse |
|
43 | $ hg debugsparse --exclude *.sparse | |
44 | $ ls |
|
44 | $ ls | |
45 | data.py |
|
45 | data.py | |
46 | index.html |
|
46 | index.html | |
47 | readme.txt |
|
47 | readme.txt | |
48 | $ hg sparse --clear-rules |
|
48 | $ hg debugsparse --clear-rules | |
49 | $ ls |
|
49 | $ ls | |
50 | base.sparse |
|
50 | base.sparse | |
51 | data.py |
|
51 | data.py | |
@@ -55,18 +55,18 b' Clear rules when there are excludes' | |||||
55 |
|
55 | |||
56 | Clearing rules should not alter profiles |
|
56 | Clearing rules should not alter profiles | |
57 |
|
57 | |||
58 | $ hg sparse --enable-profile webpage.sparse |
|
58 | $ hg debugsparse --enable-profile webpage.sparse | |
59 | $ ls |
|
59 | $ ls | |
60 | base.sparse |
|
60 | base.sparse | |
61 | index.html |
|
61 | index.html | |
62 | webpage.sparse |
|
62 | webpage.sparse | |
63 | $ hg sparse --include *.py |
|
63 | $ hg debugsparse --include *.py | |
64 | $ ls |
|
64 | $ ls | |
65 | base.sparse |
|
65 | base.sparse | |
66 | data.py |
|
66 | data.py | |
67 | index.html |
|
67 | index.html | |
68 | webpage.sparse |
|
68 | webpage.sparse | |
69 | $ hg sparse --clear-rules |
|
69 | $ hg debugsparse --clear-rules | |
70 | $ ls |
|
70 | $ ls | |
71 | base.sparse |
|
71 | base.sparse | |
72 | index.html |
|
72 | index.html |
@@ -31,11 +31,11 b" Import a rules file against a 'blank' sp" | |||||
31 | > [include] |
|
31 | > [include] | |
32 | > *.py |
|
32 | > *.py | |
33 | > EOF |
|
33 | > EOF | |
34 | $ hg sparse --import-rules $TESTTMP/rules_to_import |
|
34 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import | |
35 | $ ls |
|
35 | $ ls | |
36 | data.py |
|
36 | data.py | |
37 |
|
37 | |||
38 | $ hg sparse --reset |
|
38 | $ hg debugsparse --reset | |
39 | $ rm .hg/sparse |
|
39 | $ rm .hg/sparse | |
40 |
|
40 | |||
41 | $ cat > $TESTTMP/rules_to_import <<EOF |
|
41 | $ cat > $TESTTMP/rules_to_import <<EOF | |
@@ -43,19 +43,19 b" Import a rules file against a 'blank' sp" | |||||
43 | > [include] |
|
43 | > [include] | |
44 | > *.py |
|
44 | > *.py | |
45 | > EOF |
|
45 | > EOF | |
46 | $ hg sparse --import-rules $TESTTMP/rules_to_import |
|
46 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import | |
47 | $ ls |
|
47 | $ ls | |
48 | base.sparse |
|
48 | base.sparse | |
49 | data.py |
|
49 | data.py | |
50 | webpage.sparse |
|
50 | webpage.sparse | |
51 |
|
51 | |||
52 | $ hg sparse --reset |
|
52 | $ hg debugsparse --reset | |
53 | $ rm .hg/sparse |
|
53 | $ rm .hg/sparse | |
54 |
|
54 | |||
55 | Start against an existing profile; rules *already active* should be ignored |
|
55 | Start against an existing profile; rules *already active* should be ignored | |
56 |
|
56 | |||
57 | $ hg sparse --enable-profile webpage.sparse |
|
57 | $ hg debugsparse --enable-profile webpage.sparse | |
58 | $ hg sparse --include *.py |
|
58 | $ hg debugsparse --include *.py | |
59 | $ cat > $TESTTMP/rules_to_import <<EOF |
|
59 | $ cat > $TESTTMP/rules_to_import <<EOF | |
60 | > %include base.sparse |
|
60 | > %include base.sparse | |
61 | > [include] |
|
61 | > [include] | |
@@ -64,7 +64,7 b' Start against an existing profile; rules' | |||||
64 | > [exclude] |
|
64 | > [exclude] | |
65 | > *.py |
|
65 | > *.py | |
66 | > EOF |
|
66 | > EOF | |
67 | $ hg sparse --import-rules $TESTTMP/rules_to_import |
|
67 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import | |
68 | $ ls |
|
68 | $ ls | |
69 | base.sparse |
|
69 | base.sparse | |
70 | index.html |
|
70 | index.html | |
@@ -78,7 +78,7 b' Start against an existing profile; rules' | |||||
78 | [exclude] |
|
78 | [exclude] | |
79 | *.py |
|
79 | *.py | |
80 |
|
80 | |||
81 | $ hg sparse --reset |
|
81 | $ hg debugsparse --reset | |
82 | $ rm .hg/sparse |
|
82 | $ rm .hg/sparse | |
83 |
|
83 | |||
84 | Same tests, with -Tjson enabled to output summaries |
|
84 | Same tests, with -Tjson enabled to output summaries | |
@@ -87,7 +87,7 b' Same tests, with -Tjson enabled to outpu' | |||||
87 | > [include] |
|
87 | > [include] | |
88 | > *.py |
|
88 | > *.py | |
89 | > EOF |
|
89 | > EOF | |
90 | $ hg sparse --import-rules $TESTTMP/rules_to_import -Tjson |
|
90 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import -Tjson | |
91 | [ |
|
91 | [ | |
92 | { |
|
92 | { | |
93 | "exclude_rules_added": 0, |
|
93 | "exclude_rules_added": 0, | |
@@ -99,7 +99,7 b' Same tests, with -Tjson enabled to outpu' | |||||
99 | } |
|
99 | } | |
100 | ] |
|
100 | ] | |
101 |
|
101 | |||
102 | $ hg sparse --reset |
|
102 | $ hg debugsparse --reset | |
103 | $ rm .hg/sparse |
|
103 | $ rm .hg/sparse | |
104 |
|
104 | |||
105 | $ cat > $TESTTMP/rules_to_import <<EOF |
|
105 | $ cat > $TESTTMP/rules_to_import <<EOF | |
@@ -107,7 +107,7 b' Same tests, with -Tjson enabled to outpu' | |||||
107 | > [include] |
|
107 | > [include] | |
108 | > *.py |
|
108 | > *.py | |
109 | > EOF |
|
109 | > EOF | |
110 | $ hg sparse --import-rules $TESTTMP/rules_to_import -Tjson |
|
110 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import -Tjson | |
111 | [ |
|
111 | [ | |
112 | { |
|
112 | { | |
113 | "exclude_rules_added": 0, |
|
113 | "exclude_rules_added": 0, | |
@@ -119,11 +119,11 b' Same tests, with -Tjson enabled to outpu' | |||||
119 | } |
|
119 | } | |
120 | ] |
|
120 | ] | |
121 |
|
121 | |||
122 | $ hg sparse --reset |
|
122 | $ hg debugsparse --reset | |
123 | $ rm .hg/sparse |
|
123 | $ rm .hg/sparse | |
124 |
|
124 | |||
125 | $ hg sparse --enable-profile webpage.sparse |
|
125 | $ hg debugsparse --enable-profile webpage.sparse | |
126 | $ hg sparse --include *.py |
|
126 | $ hg debugsparse --include *.py | |
127 | $ cat > $TESTTMP/rules_to_import <<EOF |
|
127 | $ cat > $TESTTMP/rules_to_import <<EOF | |
128 | > %include base.sparse |
|
128 | > %include base.sparse | |
129 | > [include] |
|
129 | > [include] | |
@@ -132,7 +132,7 b' Same tests, with -Tjson enabled to outpu' | |||||
132 | > [exclude] |
|
132 | > [exclude] | |
133 | > *.py |
|
133 | > *.py | |
134 | > EOF |
|
134 | > EOF | |
135 | $ hg sparse --import-rules $TESTTMP/rules_to_import -Tjson |
|
135 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import -Tjson | |
136 | [ |
|
136 | [ | |
137 | { |
|
137 | { | |
138 | "exclude_rules_added": 1, |
|
138 | "exclude_rules_added": 1, | |
@@ -166,7 +166,7 b' If importing results in no new rules bei' | |||||
166 | > [include] |
|
166 | > [include] | |
167 | > *.py |
|
167 | > *.py | |
168 | > EOF |
|
168 | > EOF | |
169 | $ hg sparse --import-rules $TESTTMP/rules_to_import |
|
169 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import | |
170 |
|
170 | |||
171 | If an exception is raised during refresh, restore the existing rules again. |
|
171 | If an exception is raised during refresh, restore the existing rules again. | |
172 |
|
172 | |||
@@ -174,7 +174,7 b' If an exception is raised during refresh' | |||||
174 | > [exclude] |
|
174 | > [exclude] | |
175 | > *.html |
|
175 | > *.html | |
176 | > EOF |
|
176 | > EOF | |
177 | $ hg sparse --import-rules $TESTTMP/rules_to_import |
|
177 | $ hg debugsparse --import-rules $TESTTMP/rules_to_import | |
178 | abort: sparse._refresh called! |
|
178 | abort: sparse._refresh called! | |
179 | [255] |
|
179 | [255] | |
180 | $ cat .hg/sparse |
|
180 | $ cat .hg/sparse |
@@ -19,7 +19,7 b' test merging things outside of the spars' | |||||
19 | $ hg commit -m 'feature - bar2' |
|
19 | $ hg commit -m 'feature - bar2' | |
20 |
|
20 | |||
21 | $ hg update -q default |
|
21 | $ hg update -q default | |
22 | $ hg sparse --exclude 'bar**' |
|
22 | $ hg debugsparse --exclude 'bar**' | |
23 |
|
23 | |||
24 | $ hg merge feature |
|
24 | $ hg merge feature | |
25 | temporarily included 1 file(s) in the sparse checkout for merging |
|
25 | temporarily included 1 file(s) in the sparse checkout for merging | |
@@ -55,7 +55,7 b' copy' | |||||
55 | $ hg ci -Aqm 'add branchonly' |
|
55 | $ hg ci -Aqm 'add branchonly' | |
56 |
|
56 | |||
57 | $ hg up -q default |
|
57 | $ hg up -q default | |
58 | $ hg sparse -X branchonly |
|
58 | $ hg debugsparse -X branchonly | |
59 | $ hg merge feature |
|
59 | $ hg merge feature | |
60 | temporarily included 2 file(s) in the sparse checkout for merging |
|
60 | temporarily included 2 file(s) in the sparse checkout for merging | |
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -25,11 +25,11 b' test sparse' | |||||
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 | |
@@ -37,7 +37,7 b' Verify enabling a single profile works' | |||||
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 | |
@@ -46,7 +46,7 b' Verify enabling two profiles works' | |||||
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 | |
@@ -220,11 +220,11 b' Test checking out a commit that does not' | |||||
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 | |
@@ -235,14 +235,14 b' warning message can be suppressed by set' | |||||
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 | |||
@@ -265,7 +265,7 b' Test file permissions changing across a ' | |||||
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) |
@@ -21,7 +21,7 b' test sparse with --verbose and -T json' | |||||
21 | Verify basic --include and --reset |
|
21 | Verify basic --include and --reset | |
22 |
|
22 | |||
23 | $ hg up -q 0 |
|
23 | $ hg up -q 0 | |
24 | $ hg sparse --include 'hide' -Tjson |
|
24 | $ hg debugsparse --include 'hide' -Tjson | |
25 | [ |
|
25 | [ | |
26 | { |
|
26 | { | |
27 | "exclude_rules_added": 0, |
|
27 | "exclude_rules_added": 0, | |
@@ -32,14 +32,14 b' Verify basic --include and --reset' | |||||
32 | "profiles_added": 0 |
|
32 | "profiles_added": 0 | |
33 | } |
|
33 | } | |
34 | ] |
|
34 | ] | |
35 | $ hg sparse --clear-rules |
|
35 | $ hg debugsparse --clear-rules | |
36 | $ hg sparse --include 'hide' --verbose |
|
36 | $ hg debugsparse --include 'hide' --verbose | |
37 | removing show |
|
37 | removing show | |
38 | Profile # change: 0 |
|
38 | Profile # change: 0 | |
39 | Include rule # change: 1 |
|
39 | Include rule # change: 1 | |
40 | Exclude rule # change: 0 |
|
40 | Exclude rule # change: 0 | |
41 |
|
41 | |||
42 | $ hg sparse --reset -Tjson |
|
42 | $ hg debugsparse --reset -Tjson | |
43 | [ |
|
43 | [ | |
44 | { |
|
44 | { | |
45 | "exclude_rules_added": 0, |
|
45 | "exclude_rules_added": 0, | |
@@ -50,8 +50,8 b' Verify basic --include and --reset' | |||||
50 | "profiles_added": 0 |
|
50 | "profiles_added": 0 | |
51 | } |
|
51 | } | |
52 | ] |
|
52 | ] | |
53 | $ hg sparse --include 'hide' |
|
53 | $ hg debugsparse --include 'hide' | |
54 | $ hg sparse --reset --verbose |
|
54 | $ hg debugsparse --reset --verbose | |
55 | getting show |
|
55 | getting show | |
56 | Profile # change: 0 |
|
56 | Profile # change: 0 | |
57 | Include rule # change: -1 |
|
57 | Include rule # change: -1 | |
@@ -59,9 +59,9 b' Verify basic --include and --reset' | |||||
59 |
|
59 | |||
60 | Verifying that problematic files still allow us to see the deltas when forcing: |
|
60 | Verifying that problematic files still allow us to see the deltas when forcing: | |
61 |
|
61 | |||
62 | $ hg sparse --include 'show*' |
|
62 | $ hg debugsparse --include 'show*' | |
63 | $ touch hide |
|
63 | $ touch hide | |
64 | $ hg sparse --delete 'show*' --force -Tjson |
|
64 | $ hg debugsparse --delete 'show*' --force -Tjson | |
65 | pending changes to 'hide' |
|
65 | pending changes to 'hide' | |
66 | [ |
|
66 | [ | |
67 | { |
|
67 | { | |
@@ -73,9 +73,9 b' Verifying that problematic files still a' | |||||
73 | "profiles_added": 0 |
|
73 | "profiles_added": 0 | |
74 | } |
|
74 | } | |
75 | ] |
|
75 | ] | |
76 | $ hg sparse --include 'show*' --force |
|
76 | $ hg debugsparse --include 'show*' --force | |
77 | pending changes to 'hide' |
|
77 | pending changes to 'hide' | |
78 | $ hg sparse --delete 'show*' --force --verbose |
|
78 | $ hg debugsparse --delete 'show*' --force --verbose | |
79 | pending changes to 'hide' |
|
79 | pending changes to 'hide' | |
80 | Profile # change: 0 |
|
80 | Profile # change: 0 | |
81 | Include rule # change: -1 |
|
81 | Include rule # change: -1 |
@@ -21,17 +21,17 b' test sparse' | |||||
21 | Verify basic --include |
|
21 | Verify basic --include | |
22 |
|
22 | |||
23 | $ hg up -q 0 |
|
23 | $ hg up -q 0 | |
24 | $ hg sparse --include 'hide' |
|
24 | $ hg debugsparse --include 'hide' | |
25 | $ ls |
|
25 | $ ls | |
26 | hide |
|
26 | hide | |
27 |
|
27 | |||
28 | Absolute paths outside the repo should just be rejected |
|
28 | Absolute paths outside the repo should just be rejected | |
29 |
|
29 | |||
30 | $ hg sparse --include /foo/bar |
|
30 | $ hg debugsparse --include /foo/bar | |
31 | warning: paths cannot start with /, ignoring: ['/foo/bar'] |
|
31 | warning: paths cannot start with /, ignoring: ['/foo/bar'] | |
32 | $ hg sparse --include '$TESTTMP/myrepo/hide' |
|
32 | $ hg debugsparse --include '$TESTTMP/myrepo/hide' | |
33 |
|
33 | |||
34 | $ hg sparse --include '/root' |
|
34 | $ hg debugsparse --include '/root' | |
35 | warning: paths cannot start with /, ignoring: ['/root'] |
|
35 | warning: paths cannot start with /, ignoring: ['/root'] | |
36 |
|
36 | |||
37 | Verify commiting while sparse includes other files |
|
37 | Verify commiting while sparse includes other files | |
@@ -46,7 +46,7 b' Verify commiting while sparse includes o' | |||||
46 |
|
46 | |||
47 | Verify --reset brings files back |
|
47 | Verify --reset brings files back | |
48 |
|
48 | |||
49 | $ hg sparse --reset |
|
49 | $ hg debugsparse --reset | |
50 | $ ls |
|
50 | $ ls | |
51 | hide |
|
51 | hide | |
52 | show |
|
52 | show | |
@@ -55,12 +55,12 b' Verify --reset brings files back' | |||||
55 | $ cat show |
|
55 | $ cat show | |
56 | a |
|
56 | a | |
57 |
|
57 | |||
58 | Verify 'hg sparse' default output |
|
58 | Verify 'hg debugsparse' default output | |
59 |
|
59 | |||
60 | $ hg up -q null |
|
60 | $ hg up -q null | |
61 | $ hg sparse --include 'show*' |
|
61 | $ hg debugsparse --include 'show*' | |
62 |
|
62 | |||
63 | $ hg sparse |
|
63 | $ hg debugsparse | |
64 | [include] |
|
64 | [include] | |
65 | show* |
|
65 | show* | |
66 | [exclude] |
|
66 | [exclude] | |
@@ -89,19 +89,19 b' Adding an excluded file should fail' | |||||
89 |
|
89 | |||
90 | $ hg add hide3 |
|
90 | $ hg add hide3 | |
91 | abort: cannot add 'hide3' - it is outside the sparse checkout |
|
91 | abort: cannot add 'hide3' - it is outside the sparse checkout | |
92 | (include file with `hg sparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding) |
|
92 | (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding) | |
93 | [255] |
|
93 | [255] | |
94 |
|
94 | |||
95 | Verify deleting sparseness while a file has changes fails |
|
95 | Verify deleting sparseness while a file has changes fails | |
96 |
|
96 | |||
97 | $ hg sparse --delete 'show*' |
|
97 | $ hg debugsparse --delete 'show*' | |
98 | pending changes to 'hide' |
|
98 | pending changes to 'hide' | |
99 | abort: cannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty) |
|
99 | abort: cannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty) | |
100 | [255] |
|
100 | [255] | |
101 |
|
101 | |||
102 | Verify deleting sparseness with --force brings back files |
|
102 | Verify deleting sparseness with --force brings back files | |
103 |
|
103 | |||
104 | $ hg sparse --delete -f 'show*' |
|
104 | $ hg debugsparse --delete -f 'show*' | |
105 | pending changes to 'hide' |
|
105 | pending changes to 'hide' | |
106 | $ ls |
|
106 | $ ls | |
107 | hide |
|
107 | hide | |
@@ -116,14 +116,14 b' Verify deleting sparseness with --force ' | |||||
116 |
|
116 | |||
117 | Verify editing sparseness fails if pending changes |
|
117 | Verify editing sparseness fails if pending changes | |
118 |
|
118 | |||
119 | $ hg sparse --include 'show*' |
|
119 | $ hg debugsparse --include 'show*' | |
120 | pending changes to 'hide' |
|
120 | pending changes to 'hide' | |
121 | abort: could not update sparseness due to pending changes |
|
121 | abort: could not update sparseness due to pending changes | |
122 | [255] |
|
122 | [255] | |
123 |
|
123 | |||
124 | Verify adding sparseness hides files |
|
124 | Verify adding sparseness hides files | |
125 |
|
125 | |||
126 | $ hg sparse --exclude -f 'hide*' |
|
126 | $ hg debugsparse --exclude -f 'hide*' | |
127 | pending changes to 'hide' |
|
127 | pending changes to 'hide' | |
128 | $ ls |
|
128 | $ ls | |
129 | hide |
|
129 | hide | |
@@ -149,7 +149,7 b' Verify rebase temporarily includes exclu' | |||||
149 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
149 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
150 | [1] |
|
150 | [1] | |
151 |
|
151 | |||
152 | $ hg sparse |
|
152 | $ hg debugsparse | |
153 | [include] |
|
153 | [include] | |
154 |
|
154 | |||
155 | [exclude] |
|
155 | [exclude] | |
@@ -186,7 +186,7 b' Verify merge fails if merging excluded f' | |||||
186 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
186 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
187 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon |
|
187 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
188 | [1] |
|
188 | [1] | |
189 | $ hg sparse |
|
189 | $ hg debugsparse | |
190 | [include] |
|
190 | [include] | |
191 |
|
191 | |||
192 | [exclude] |
|
192 | [exclude] | |
@@ -198,7 +198,7 b' Verify merge fails if merging excluded f' | |||||
198 | $ hg up -C . |
|
198 | $ hg up -C . | |
199 | cleaned up 1 temporarily added file(s) from the sparse checkout |
|
199 | cleaned up 1 temporarily added file(s) from the sparse checkout | |
200 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
200 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
201 | $ hg sparse |
|
201 | $ hg debugsparse | |
202 | [include] |
|
202 | [include] | |
203 |
|
203 | |||
204 | [exclude] |
|
204 | [exclude] | |
@@ -208,7 +208,7 b' Verify merge fails if merging excluded f' | |||||
208 | Verify strip -k resets dirstate correctly |
|
208 | Verify strip -k resets dirstate correctly | |
209 |
|
209 | |||
210 | $ hg status |
|
210 | $ hg status | |
211 | $ hg sparse |
|
211 | $ hg debugsparse | |
212 | [include] |
|
212 | [include] | |
213 |
|
213 | |||
214 | [exclude] |
|
214 | [exclude] | |
@@ -246,15 +246,15 b' Test status on a file in a subdir' | |||||
246 |
|
246 | |||
247 | $ mkdir -p dir1/dir2 |
|
247 | $ mkdir -p dir1/dir2 | |
248 | $ touch dir1/dir2/file |
|
248 | $ touch dir1/dir2/file | |
249 | $ hg sparse -I dir1/dir2 |
|
249 | $ hg debugsparse -I dir1/dir2 | |
250 | $ hg status |
|
250 | $ hg status | |
251 | ? dir1/dir2/file |
|
251 | ? dir1/dir2/file | |
252 |
|
252 | |||
253 | Test that add -s adds dirs to sparse profile |
|
253 | Test that add -s adds dirs to sparse profile | |
254 |
|
254 | |||
255 | $ hg sparse --reset |
|
255 | $ hg debugsparse --reset | |
256 | $ hg sparse --include empty |
|
256 | $ hg debugsparse --include empty | |
257 | $ hg sparse |
|
257 | $ hg debugsparse | |
258 | [include] |
|
258 | [include] | |
259 | empty |
|
259 | empty | |
260 | [exclude] |
|
260 | [exclude] | |
@@ -266,13 +266,13 b' Test that add -s adds dirs to sparse pro' | |||||
266 | $ touch add/bar |
|
266 | $ touch add/bar | |
267 | $ hg add add/foo |
|
267 | $ hg add add/foo | |
268 | abort: cannot add 'add/foo' - it is outside the sparse checkout |
|
268 | abort: cannot add 'add/foo' - it is outside the sparse checkout | |
269 | (include file with `hg sparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding) |
|
269 | (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding) | |
270 | [255] |
|
270 | [255] | |
271 | $ hg add -s add/foo |
|
271 | $ hg add -s add/foo | |
272 | $ hg st |
|
272 | $ hg st | |
273 | A add/foo |
|
273 | A add/foo | |
274 | ? add/bar |
|
274 | ? add/bar | |
275 | $ hg sparse |
|
275 | $ hg debugsparse | |
276 | [include] |
|
276 | [include] | |
277 | add |
|
277 | add | |
278 | empty |
|
278 | empty | |
@@ -284,7 +284,7 b' Test that add -s adds dirs to sparse pro' | |||||
284 | $ hg st |
|
284 | $ hg st | |
285 | A add/bar |
|
285 | A add/bar | |
286 | A add/foo |
|
286 | A add/foo | |
287 | $ hg sparse |
|
287 | $ hg debugsparse | |
288 | [include] |
|
288 | [include] | |
289 | add |
|
289 | add | |
290 | empty |
|
290 | empty | |
@@ -316,7 +316,7 b' Test debugrebuilddirstate' | |||||
316 | $ hg add included excluded |
|
316 | $ hg add included excluded | |
317 | $ hg commit -m 'a commit' -q |
|
317 | $ hg commit -m 'a commit' -q | |
318 | $ cp .hg/dirstate ../dirstateboth |
|
318 | $ cp .hg/dirstate ../dirstateboth | |
319 | $ hg sparse -X excluded |
|
319 | $ hg debugsparse -X excluded | |
320 | $ cp ../dirstateboth .hg/dirstate |
|
320 | $ cp ../dirstateboth .hg/dirstate | |
321 | $ hg debugrebuilddirstate |
|
321 | $ hg debugrebuilddirstate | |
322 | $ hg debugdirstate |
|
322 | $ hg debugdirstate | |
@@ -324,11 +324,11 b' Test debugrebuilddirstate' | |||||
324 |
|
324 | |||
325 | Test debugdirstate --minimal where file is in the parent manifest but not the |
|
325 | Test debugdirstate --minimal where file is in the parent manifest but not the | |
326 | dirstate |
|
326 | dirstate | |
327 | $ hg sparse -X included |
|
327 | $ hg debugsparse -X included | |
328 | $ hg debugdirstate |
|
328 | $ hg debugdirstate | |
329 | $ cp .hg/dirstate ../dirstateallexcluded |
|
329 | $ cp .hg/dirstate ../dirstateallexcluded | |
330 | $ hg sparse --reset |
|
330 | $ hg debugsparse --reset | |
331 | $ hg sparse -X excluded |
|
331 | $ hg debugsparse -X excluded | |
332 | $ cp ../dirstateallexcluded .hg/dirstate |
|
332 | $ cp ../dirstateallexcluded .hg/dirstate | |
333 | $ touch includedadded |
|
333 | $ touch includedadded | |
334 | $ hg add includedadded |
|
334 | $ hg add includedadded | |
@@ -350,7 +350,7 b' manifest' | |||||
350 | $ cp .hg/dirstate ../moreexcluded |
|
350 | $ cp .hg/dirstate ../moreexcluded | |
351 | $ hg forget excludednomanifest |
|
351 | $ hg forget excludednomanifest | |
352 | $ rm excludednomanifest |
|
352 | $ rm excludednomanifest | |
353 | $ hg sparse -X excludednomanifest |
|
353 | $ hg debugsparse -X excludednomanifest | |
354 | $ cp ../moreexcluded .hg/dirstate |
|
354 | $ cp ../moreexcluded .hg/dirstate | |
355 | $ hg manifest |
|
355 | $ hg manifest | |
356 | excluded |
|
356 | excluded |
General Comments 0
You need to be logged in to leave comments.
Login now