##// END OF EJS Templates
test-treemanifest: add globs for Windows
Matt Harbison -
r25398:633d0704 default
parent child Browse files
Show More
@@ -1,386 +1,386
1
1
2 Set up repo
2 Set up repo
3
3
4 $ hg --config experimental.treemanifest=True init repo
4 $ hg --config experimental.treemanifest=True init repo
5 $ cd repo
5 $ cd repo
6
6
7 Requirements get set on init
7 Requirements get set on init
8
8
9 $ grep treemanifest .hg/requires
9 $ grep treemanifest .hg/requires
10 treemanifest
10 treemanifest
11
11
12 Without directories, looks like any other repo
12 Without directories, looks like any other repo
13
13
14 $ echo 0 > a
14 $ echo 0 > a
15 $ echo 0 > b
15 $ echo 0 > b
16 $ hg ci -Aqm initial
16 $ hg ci -Aqm initial
17 $ hg debugdata -m 0
17 $ hg debugdata -m 0
18 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
18 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
19 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
19 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
20
20
21 Submanifest is stored in separate revlog
21 Submanifest is stored in separate revlog
22
22
23 $ mkdir dir1
23 $ mkdir dir1
24 $ echo 1 > dir1/a
24 $ echo 1 > dir1/a
25 $ echo 1 > dir1/b
25 $ echo 1 > dir1/b
26 $ echo 1 > e
26 $ echo 1 > e
27 $ hg ci -Aqm 'add dir1'
27 $ hg ci -Aqm 'add dir1'
28 $ hg debugdata -m 1
28 $ hg debugdata -m 1
29 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
29 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
30 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
30 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
31 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44ed (esc)
31 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44ed (esc)
32 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
32 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
33 $ hg debugdata --dir dir1 0
33 $ hg debugdata --dir dir1 0
34 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
34 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
35 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
35 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
36
36
37 Can add nested directories
37 Can add nested directories
38
38
39 $ mkdir dir1/dir1
39 $ mkdir dir1/dir1
40 $ echo 2 > dir1/dir1/a
40 $ echo 2 > dir1/dir1/a
41 $ echo 2 > dir1/dir1/b
41 $ echo 2 > dir1/dir1/b
42 $ mkdir dir1/dir2
42 $ mkdir dir1/dir2
43 $ echo 2 > dir1/dir2/a
43 $ echo 2 > dir1/dir2/a
44 $ echo 2 > dir1/dir2/b
44 $ echo 2 > dir1/dir2/b
45 $ hg ci -Aqm 'add dir1/dir1'
45 $ hg ci -Aqm 'add dir1/dir1'
46 $ hg files -r .
46 $ hg files -r .
47 a
47 a
48 b
48 b
49 dir1/a (glob)
49 dir1/a (glob)
50 dir1/b (glob)
50 dir1/b (glob)
51 dir1/dir1/a (glob)
51 dir1/dir1/a (glob)
52 dir1/dir1/b (glob)
52 dir1/dir1/b (glob)
53 dir1/dir2/a (glob)
53 dir1/dir2/a (glob)
54 dir1/dir2/b (glob)
54 dir1/dir2/b (glob)
55 e
55 e
56
56
57 Revision is not created for unchanged directory
57 Revision is not created for unchanged directory
58
58
59 $ mkdir dir2
59 $ mkdir dir2
60 $ echo 3 > dir2/a
60 $ echo 3 > dir2/a
61 $ hg add dir2
61 $ hg add dir2
62 adding dir2/a (glob)
62 adding dir2/a (glob)
63 $ hg debugindex --dir dir1 > before
63 $ hg debugindex --dir dir1 > before
64 $ hg ci -qm 'add dir2'
64 $ hg ci -qm 'add dir2'
65 $ hg debugindex --dir dir1 > after
65 $ hg debugindex --dir dir1 > after
66 $ diff before after
66 $ diff before after
67 $ rm before after
67 $ rm before after
68
68
69 Removing directory does not create an revlog entry
69 Removing directory does not create an revlog entry
70
70
71 $ hg rm dir1/dir1
71 $ hg rm dir1/dir1
72 removing dir1/dir1/a (glob)
72 removing dir1/dir1/a (glob)
73 removing dir1/dir1/b (glob)
73 removing dir1/dir1/b (glob)
74 $ hg debugindex --dir dir1/dir1 > before
74 $ hg debugindex --dir dir1/dir1 > before
75 $ hg ci -qm 'remove dir1/dir1'
75 $ hg ci -qm 'remove dir1/dir1'
76 $ hg debugindex --dir dir1/dir1 > after
76 $ hg debugindex --dir dir1/dir1 > after
77 $ diff before after
77 $ diff before after
78 $ rm before after
78 $ rm before after
79
79
80 Check that hg files (calls treemanifest.walk()) works
80 Check that hg files (calls treemanifest.walk()) works
81 without loading all directory revlogs
81 without loading all directory revlogs
82
82
83 $ hg co 'desc("add dir2")'
83 $ hg co 'desc("add dir2")'
84 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
85 $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
86 $ hg files -r . dir1
86 $ hg files -r . dir1
87 dir1/a (glob)
87 dir1/a (glob)
88 dir1/b (glob)
88 dir1/b (glob)
89 dir1/dir1/a (glob)
89 dir1/dir1/a (glob)
90 dir1/dir1/b (glob)
90 dir1/dir1/b (glob)
91 dir1/dir2/a (glob)
91 dir1/dir2/a (glob)
92 dir1/dir2/b (glob)
92 dir1/dir2/b (glob)
93
93
94 Check that status between revisions works (calls treemanifest.matches())
94 Check that status between revisions works (calls treemanifest.matches())
95 without loading all directory revlogs
95 without loading all directory revlogs
96
96
97 $ hg status --rev 'desc("add dir1")' --rev . dir1
97 $ hg status --rev 'desc("add dir1")' --rev . dir1
98 A dir1/dir1/a
98 A dir1/dir1/a
99 A dir1/dir1/b
99 A dir1/dir1/b
100 A dir1/dir2/a
100 A dir1/dir2/a
101 A dir1/dir2/b
101 A dir1/dir2/b
102 $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
102 $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
103
103
104 Merge creates 2-parent revision of directory revlog
104 Merge creates 2-parent revision of directory revlog
105
105
106 $ echo 5 > dir1/a
106 $ echo 5 > dir1/a
107 $ hg ci -Aqm 'modify dir1/a'
107 $ hg ci -Aqm 'modify dir1/a'
108 $ hg co '.^'
108 $ hg co '.^'
109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
110 $ echo 6 > dir1/b
110 $ echo 6 > dir1/b
111 $ hg ci -Aqm 'modify dir1/b'
111 $ hg ci -Aqm 'modify dir1/b'
112 $ hg merge 'desc("modify dir1/a")'
112 $ hg merge 'desc("modify dir1/a")'
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
114 (branch merge, don't forget to commit)
114 (branch merge, don't forget to commit)
115 $ hg ci -m 'conflict-free merge involving dir1/'
115 $ hg ci -m 'conflict-free merge involving dir1/'
116 $ cat dir1/a
116 $ cat dir1/a
117 5
117 5
118 $ cat dir1/b
118 $ cat dir1/b
119 6
119 6
120 $ hg debugindex --dir dir1
120 $ hg debugindex --dir dir1
121 rev offset length base linkrev nodeid p1 p2
121 rev offset length base linkrev nodeid p1 p2
122 0 0 54 0 1 8b3ffd73f901 000000000000 000000000000
122 0 0 54 0 1 8b3ffd73f901 000000000000 000000000000
123 1 54 68 0 2 b66d046c644f 8b3ffd73f901 000000000000
123 1 54 68 0 2 b66d046c644f 8b3ffd73f901 000000000000
124 2 122 12 0 4 b87265673c8a b66d046c644f 000000000000
124 2 122 12 0 4 b87265673c8a b66d046c644f 000000000000
125 3 134 95 0 5 aa5d3adcec72 b66d046c644f 000000000000
125 3 134 95 0 5 aa5d3adcec72 b66d046c644f 000000000000
126 4 229 81 0 6 e29b066b91ad b66d046c644f 000000000000
126 4 229 81 0 6 e29b066b91ad b66d046c644f 000000000000
127 5 310 107 5 7 a120ce2b83f5 e29b066b91ad aa5d3adcec72
127 5 310 107 5 7 a120ce2b83f5 e29b066b91ad aa5d3adcec72
128
128
129 Merge keeping directory from parent 1 does not create revlog entry. (Note that
129 Merge keeping directory from parent 1 does not create revlog entry. (Note that
130 dir1's manifest does change, but only because dir1/a's filelog changes.)
130 dir1's manifest does change, but only because dir1/a's filelog changes.)
131
131
132 $ hg co 'desc("add dir2")'
132 $ hg co 'desc("add dir2")'
133 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
134 $ echo 8 > dir2/a
134 $ echo 8 > dir2/a
135 $ hg ci -m 'modify dir2/a'
135 $ hg ci -m 'modify dir2/a'
136 created new head
136 created new head
137
137
138 $ hg debugindex --dir dir2 > before
138 $ hg debugindex --dir dir2 > before
139 $ hg merge 'desc("modify dir1/a")'
139 $ hg merge 'desc("modify dir1/a")'
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 (branch merge, don't forget to commit)
141 (branch merge, don't forget to commit)
142 $ hg revert -r 'desc("modify dir2/a")' .
142 $ hg revert -r 'desc("modify dir2/a")' .
143 reverting dir1/a (glob)
143 reverting dir1/a (glob)
144 $ hg ci -m 'merge, keeping parent 1'
144 $ hg ci -m 'merge, keeping parent 1'
145 $ hg debugindex --dir dir2 > after
145 $ hg debugindex --dir dir2 > after
146 $ diff before after
146 $ diff before after
147 $ rm before after
147 $ rm before after
148
148
149 Merge keeping directory from parent 2 does not create revlog entry. (Note that
149 Merge keeping directory from parent 2 does not create revlog entry. (Note that
150 dir2's manifest does change, but only because dir2/a's filelog changes.)
150 dir2's manifest does change, but only because dir2/a's filelog changes.)
151
151
152 $ hg co 'desc("modify dir2/a")'
152 $ hg co 'desc("modify dir2/a")'
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
154 $ hg debugindex --dir dir1 > before
154 $ hg debugindex --dir dir1 > before
155 $ hg merge 'desc("modify dir1/a")'
155 $ hg merge 'desc("modify dir1/a")'
156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
157 (branch merge, don't forget to commit)
157 (branch merge, don't forget to commit)
158 $ hg revert -r 'desc("modify dir1/a")' .
158 $ hg revert -r 'desc("modify dir1/a")' .
159 reverting dir2/a (glob)
159 reverting dir2/a (glob)
160 $ hg ci -m 'merge, keeping parent 2'
160 $ hg ci -m 'merge, keeping parent 2'
161 created new head
161 created new head
162 $ hg debugindex --dir dir1 > after
162 $ hg debugindex --dir dir1 > after
163 $ diff before after
163 $ diff before after
164 $ rm before after
164 $ rm before after
165
165
166 Create flat source repo for tests with mixed flat/tree manifests
166 Create flat source repo for tests with mixed flat/tree manifests
167
167
168 $ cd ..
168 $ cd ..
169 $ hg init repo-flat
169 $ hg init repo-flat
170 $ cd repo-flat
170 $ cd repo-flat
171
171
172 Create a few commits with flat manifest
172 Create a few commits with flat manifest
173
173
174 $ echo 0 > a
174 $ echo 0 > a
175 $ echo 0 > b
175 $ echo 0 > b
176 $ echo 0 > e
176 $ echo 0 > e
177 $ for d in dir1 dir1/dir1 dir1/dir2 dir2
177 $ for d in dir1 dir1/dir1 dir1/dir2 dir2
178 > do
178 > do
179 > mkdir $d
179 > mkdir $d
180 > echo 0 > $d/a
180 > echo 0 > $d/a
181 > echo 0 > $d/b
181 > echo 0 > $d/b
182 > done
182 > done
183 $ hg ci -Aqm initial
183 $ hg ci -Aqm initial
184
184
185 $ echo 1 > a
185 $ echo 1 > a
186 $ echo 1 > dir1/a
186 $ echo 1 > dir1/a
187 $ echo 1 > dir1/dir1/a
187 $ echo 1 > dir1/dir1/a
188 $ hg ci -Aqm 'modify on branch 1'
188 $ hg ci -Aqm 'modify on branch 1'
189
189
190 $ hg co 0
190 $ hg co 0
191 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 $ echo 2 > b
192 $ echo 2 > b
193 $ echo 2 > dir1/b
193 $ echo 2 > dir1/b
194 $ echo 2 > dir1/dir1/b
194 $ echo 2 > dir1/dir1/b
195 $ hg ci -Aqm 'modify on branch 2'
195 $ hg ci -Aqm 'modify on branch 2'
196
196
197 $ hg merge 1
197 $ hg merge 1
198 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
198 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
199 (branch merge, don't forget to commit)
199 (branch merge, don't forget to commit)
200 $ hg ci -m 'merge of flat manifests to new flat manifest'
200 $ hg ci -m 'merge of flat manifests to new flat manifest'
201
201
202 Create clone with tree manifests enabled
202 Create clone with tree manifests enabled
203
203
204 $ cd ..
204 $ cd ..
205 $ hg clone --pull --config experimental.treemanifest=1 repo-flat repo-mixed
205 $ hg clone --pull --config experimental.treemanifest=1 repo-flat repo-mixed
206 requesting all changes
206 requesting all changes
207 adding changesets
207 adding changesets
208 adding manifests
208 adding manifests
209 adding file changes
209 adding file changes
210 added 4 changesets with 17 changes to 11 files
210 added 4 changesets with 17 changes to 11 files
211 updating to branch default
211 updating to branch default
212 11 files updated, 0 files merged, 0 files removed, 0 files unresolved
212 11 files updated, 0 files merged, 0 files removed, 0 files unresolved
213 $ cd repo-mixed
213 $ cd repo-mixed
214 $ test -f .hg/store/meta
214 $ test -f .hg/store/meta
215 [1]
215 [1]
216 $ grep treemanifest .hg/requires
216 $ grep treemanifest .hg/requires
217 treemanifest
217 treemanifest
218
218
219 Commit should store revlog per directory
219 Commit should store revlog per directory
220
220
221 $ hg co 1
221 $ hg co 1
222 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
222 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
223 $ echo 3 > a
223 $ echo 3 > a
224 $ echo 3 > dir1/a
224 $ echo 3 > dir1/a
225 $ echo 3 > dir1/dir1/a
225 $ echo 3 > dir1/dir1/a
226 $ hg ci -m 'first tree'
226 $ hg ci -m 'first tree'
227 created new head
227 created new head
228 $ find .hg/store/meta | sort
228 $ find .hg/store/meta | sort
229 .hg/store/meta
229 .hg/store/meta
230 .hg/store/meta/dir1
230 .hg/store/meta/dir1
231 .hg/store/meta/dir1/00manifest.i
231 .hg/store/meta/dir1/00manifest.i
232 .hg/store/meta/dir1/dir1
232 .hg/store/meta/dir1/dir1
233 .hg/store/meta/dir1/dir1/00manifest.i
233 .hg/store/meta/dir1/dir1/00manifest.i
234 .hg/store/meta/dir1/dir2
234 .hg/store/meta/dir1/dir2
235 .hg/store/meta/dir1/dir2/00manifest.i
235 .hg/store/meta/dir1/dir2/00manifest.i
236 .hg/store/meta/dir2
236 .hg/store/meta/dir2
237 .hg/store/meta/dir2/00manifest.i
237 .hg/store/meta/dir2/00manifest.i
238
238
239 Merge of two trees
239 Merge of two trees
240
240
241 $ hg co 2
241 $ hg co 2
242 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
242 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
243 $ hg merge 1
243 $ hg merge 1
244 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
245 (branch merge, don't forget to commit)
245 (branch merge, don't forget to commit)
246 $ hg ci -m 'merge of flat manifests to new tree manifest'
246 $ hg ci -m 'merge of flat manifests to new tree manifest'
247 created new head
247 created new head
248 $ hg diff -r 3
248 $ hg diff -r 3
249
249
250 Parent of tree root manifest should be flat manifest, and two for merge
250 Parent of tree root manifest should be flat manifest, and two for merge
251
251
252 $ hg debugindex -m
252 $ hg debugindex -m
253 rev offset length base linkrev nodeid p1 p2
253 rev offset length base linkrev nodeid p1 p2
254 0 0 80 0 0 40536115ed9e 000000000000 000000000000
254 0 0 80 0 0 40536115ed9e 000000000000 000000000000
255 1 80 83 0 1 f3376063c255 40536115ed9e 000000000000
255 1 80 83 0 1 f3376063c255 40536115ed9e 000000000000
256 2 163 103 0 2 5d9b9da231a2 40536115ed9e 000000000000
256 2 163 103 0 2 5d9b9da231a2 40536115ed9e 000000000000
257 3 266 83 0 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
257 3 266 83 0 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
258 4 349 132 4 4 c05a51345f86 f3376063c255 000000000000
258 4 349 132 4 4 c05a51345f86 f3376063c255 000000000000
259 5 481 110 4 5 82594b1f557d 5d9b9da231a2 f3376063c255
259 5 481 110 4 5 82594b1f557d 5d9b9da231a2 f3376063c255
260
260
261
261
262 Status across flat/tree boundary should work
262 Status across flat/tree boundary should work
263
263
264 $ hg status --rev '.^' --rev .
264 $ hg status --rev '.^' --rev .
265 M a
265 M a
266 M dir1/a
266 M dir1/a
267 M dir1/dir1/a
267 M dir1/dir1/a
268
268
269
269
270 Turning off treemanifest config has no effect
270 Turning off treemanifest config has no effect
271
271
272 $ hg debugindex .hg/store/meta/dir1/00manifest.i
272 $ hg debugindex .hg/store/meta/dir1/00manifest.i
273 rev offset length base linkrev nodeid p1 p2
273 rev offset length base linkrev nodeid p1 p2
274 0 0 125 0 4 63c9c0557d24 000000000000 000000000000
274 0 0 125 0 4 63c9c0557d24 000000000000 000000000000
275 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
275 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
276 $ echo 2 > dir1/a
276 $ echo 2 > dir1/a
277 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
277 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
278 $ hg debugindex .hg/store/meta/dir1/00manifest.i
278 $ hg debugindex .hg/store/meta/dir1/00manifest.i
279 rev offset length base linkrev nodeid p1 p2
279 rev offset length base linkrev nodeid p1 p2
280 0 0 125 0 4 63c9c0557d24 000000000000 000000000000
280 0 0 125 0 4 63c9c0557d24 000000000000 000000000000
281 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
281 1 125 109 0 5 23d12a1f6e0e 000000000000 000000000000
282 2 234 55 0 6 3cb2d87b4250 23d12a1f6e0e 000000000000
282 2 234 55 0 6 3cb2d87b4250 23d12a1f6e0e 000000000000
283
283
284 Create deeper repo with tree manifests.
284 Create deeper repo with tree manifests.
285
285
286 $ cd ..
286 $ cd ..
287 $ hg --config experimental.treemanifest=True init deeprepo
287 $ hg --config experimental.treemanifest=True init deeprepo
288 $ cd deeprepo
288 $ cd deeprepo
289
289
290 $ mkdir a
290 $ mkdir a
291 $ mkdir b
291 $ mkdir b
292 $ mkdir b/bar
292 $ mkdir b/bar
293 $ mkdir b/bar/orange
293 $ mkdir b/bar/orange
294 $ mkdir b/bar/orange/fly
294 $ mkdir b/bar/orange/fly
295 $ mkdir b/foo
295 $ mkdir b/foo
296 $ mkdir b/foo/apple
296 $ mkdir b/foo/apple
297 $ mkdir b/foo/apple/bees
297 $ mkdir b/foo/apple/bees
298
298
299 $ touch a/one.txt
299 $ touch a/one.txt
300 $ touch a/two.txt
300 $ touch a/two.txt
301 $ touch b/bar/fruits.txt
301 $ touch b/bar/fruits.txt
302 $ touch b/bar/orange/fly/gnat.py
302 $ touch b/bar/orange/fly/gnat.py
303 $ touch b/bar/orange/fly/housefly.txt
303 $ touch b/bar/orange/fly/housefly.txt
304 $ touch b/foo/apple/bees/flower.py
304 $ touch b/foo/apple/bees/flower.py
305 $ touch c.txt
305 $ touch c.txt
306 $ touch d.py
306 $ touch d.py
307
307
308 $ hg ci -Aqm 'initial'
308 $ hg ci -Aqm 'initial'
309
309
310 We'll see that visitdir works by removing some treemanifest revlogs and running
310 We'll see that visitdir works by removing some treemanifest revlogs and running
311 the files command with various parameters.
311 the files command with various parameters.
312
312
313 Test files from the root.
313 Test files from the root.
314
314
315 $ hg files -r .
315 $ hg files -r .
316 a/one.txt (glob)
316 a/one.txt (glob)
317 a/two.txt (glob)
317 a/two.txt (glob)
318 b/bar/fruits.txt (glob)
318 b/bar/fruits.txt (glob)
319 b/bar/orange/fly/gnat.py (glob)
319 b/bar/orange/fly/gnat.py (glob)
320 b/bar/orange/fly/housefly.txt (glob)
320 b/bar/orange/fly/housefly.txt (glob)
321 b/foo/apple/bees/flower.py (glob)
321 b/foo/apple/bees/flower.py (glob)
322 c.txt
322 c.txt
323 d.py
323 d.py
324
324
325 Excludes with a glob should not exclude everything from the glob's root
325 Excludes with a glob should not exclude everything from the glob's root
326
326
327 $ hg files -r . -X 'b/fo?' b
327 $ hg files -r . -X 'b/fo?' b
328 b/bar/fruits.txt
328 b/bar/fruits.txt (glob)
329 b/bar/orange/fly/gnat.py
329 b/bar/orange/fly/gnat.py (glob)
330 b/bar/orange/fly/housefly.txt
330 b/bar/orange/fly/housefly.txt (glob)
331
331
332 Test files for a subdirectory.
332 Test files for a subdirectory.
333
333
334 $ mv .hg/store/meta/a oldmf
334 $ mv .hg/store/meta/a oldmf
335 $ hg files -r . b
335 $ hg files -r . b
336 b/bar/fruits.txt (glob)
336 b/bar/fruits.txt (glob)
337 b/bar/orange/fly/gnat.py (glob)
337 b/bar/orange/fly/gnat.py (glob)
338 b/bar/orange/fly/housefly.txt (glob)
338 b/bar/orange/fly/housefly.txt (glob)
339 b/foo/apple/bees/flower.py (glob)
339 b/foo/apple/bees/flower.py (glob)
340 $ mv oldmf .hg/store/meta/a
340 $ mv oldmf .hg/store/meta/a
341
341
342 Test files with just includes and excludes.
342 Test files with just includes and excludes.
343
343
344 $ mv .hg/store/meta/a oldmf
344 $ mv .hg/store/meta/a oldmf
345 $ mv .hg/store/meta/b/bar/orange/fly oldmf2
345 $ mv .hg/store/meta/b/bar/orange/fly oldmf2
346 $ mv .hg/store/meta/b/foo/apple/bees oldmf3
346 $ mv .hg/store/meta/b/foo/apple/bees oldmf3
347 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
347 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
348 b/bar/fruits.txt (glob)
348 b/bar/fruits.txt (glob)
349 $ mv oldmf .hg/store/meta/a
349 $ mv oldmf .hg/store/meta/a
350 $ mv oldmf2 .hg/store/meta/b/bar/orange/fly
350 $ mv oldmf2 .hg/store/meta/b/bar/orange/fly
351 $ mv oldmf3 .hg/store/meta/b/foo/apple/bees
351 $ mv oldmf3 .hg/store/meta/b/foo/apple/bees
352
352
353 Test files for a subdirectory, excluding a directory within it.
353 Test files for a subdirectory, excluding a directory within it.
354
354
355 $ mv .hg/store/meta/a oldmf
355 $ mv .hg/store/meta/a oldmf
356 $ mv .hg/store/meta/b/foo oldmf2
356 $ mv .hg/store/meta/b/foo oldmf2
357 $ hg files -r . -X path:b/foo b
357 $ hg files -r . -X path:b/foo b
358 b/bar/fruits.txt (glob)
358 b/bar/fruits.txt (glob)
359 b/bar/orange/fly/gnat.py (glob)
359 b/bar/orange/fly/gnat.py (glob)
360 b/bar/orange/fly/housefly.txt (glob)
360 b/bar/orange/fly/housefly.txt (glob)
361 $ mv oldmf .hg/store/meta/a
361 $ mv oldmf .hg/store/meta/a
362 $ mv oldmf2 .hg/store/meta/b/foo
362 $ mv oldmf2 .hg/store/meta/b/foo
363
363
364 Test files for a sub directory, including only a directory within it, and
364 Test files for a sub directory, including only a directory within it, and
365 including an unrelated directory.
365 including an unrelated directory.
366
366
367 $ mv .hg/store/meta/a oldmf
367 $ mv .hg/store/meta/a oldmf
368 $ mv .hg/store/meta/b/foo oldmf2
368 $ mv .hg/store/meta/b/foo oldmf2
369 $ hg files -r . -I path:b/bar/orange -I path:a b
369 $ hg files -r . -I path:b/bar/orange -I path:a b
370 b/bar/orange/fly/gnat.py (glob)
370 b/bar/orange/fly/gnat.py (glob)
371 b/bar/orange/fly/housefly.txt (glob)
371 b/bar/orange/fly/housefly.txt (glob)
372 $ mv oldmf .hg/store/meta/a
372 $ mv oldmf .hg/store/meta/a
373 $ mv oldmf2 .hg/store/meta/b/foo
373 $ mv oldmf2 .hg/store/meta/b/foo
374
374
375 Test files for a pattern, including a directory, and excluding a directory
375 Test files for a pattern, including a directory, and excluding a directory
376 within that.
376 within that.
377
377
378 $ mv .hg/store/meta/a oldmf
378 $ mv .hg/store/meta/a oldmf
379 $ mv .hg/store/meta/b/foo oldmf2
379 $ mv .hg/store/meta/b/foo oldmf2
380 $ mv .hg/store/meta/b/bar/orange oldmf3
380 $ mv .hg/store/meta/b/bar/orange oldmf3
381 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
381 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
382 b/bar/fruits.txt (glob)
382 b/bar/fruits.txt (glob)
383 $ mv oldmf .hg/store/meta/a
383 $ mv oldmf .hg/store/meta/a
384 $ mv oldmf2 .hg/store/meta/b/foo
384 $ mv oldmf2 .hg/store/meta/b/foo
385 $ mv oldmf3 .hg/store/meta/b/bar/orange
385 $ mv oldmf3 .hg/store/meta/b/bar/orange
386
386
General Comments 0
You need to be logged in to leave comments. Login now