Show More
@@ -2125,6 +2125,7 b' def debugupgraderepo(ui, repo, run=False' | |||||
2125 | def debugwalk(ui, repo, *pats, **opts): |
|
2125 | def debugwalk(ui, repo, *pats, **opts): | |
2126 | """show how files match on given patterns""" |
|
2126 | """show how files match on given patterns""" | |
2127 | m = scmutil.match(repo[None], pats, opts) |
|
2127 | m = scmutil.match(repo[None], pats, opts) | |
|
2128 | ui.write(('matcher: %r\n' % m)) | |||
2128 | items = list(repo[None].walk(m)) |
|
2129 | items = list(repo[None].walk(m)) | |
2129 | if not items: |
|
2130 | if not items: | |
2130 | return |
|
2131 | return |
@@ -33,6 +33,7 b' test issue352' | |||||
33 | [255] |
|
33 | [255] | |
34 | $ echo foo > "$A" |
|
34 | $ echo foo > "$A" | |
35 | $ hg debugwalk |
|
35 | $ hg debugwalk | |
|
36 | matcher: <matcher files=[], patterns=None, includes=None, excludes=None> | |||
36 | f he\r (no-eol) (esc) |
|
37 | f he\r (no-eol) (esc) | |
37 | llo he\r (no-eol) (esc) |
|
38 | llo he\r (no-eol) (esc) | |
38 | llo |
|
39 | llo |
@@ -29,6 +29,7 b'' | |||||
29 | $ hg commit -m "commit #0" |
|
29 | $ hg commit -m "commit #0" | |
30 |
|
30 | |||
31 | $ hg debugwalk |
|
31 | $ hg debugwalk | |
|
32 | matcher: <matcher files=[], patterns=None, includes=None, excludes=None> | |||
32 |
|
|
33 | f beans/black beans/black | |
33 | f beans/borlotti beans/borlotti |
|
34 | f beans/borlotti beans/borlotti | |
34 | f beans/kidney beans/kidney |
|
35 | f beans/kidney beans/kidney | |
@@ -43,6 +44,7 b'' | |||||
43 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
44 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
44 | f mammals/skunk mammals/skunk |
|
45 | f mammals/skunk mammals/skunk | |
45 | $ hg debugwalk -I. |
|
46 | $ hg debugwalk -I. | |
|
47 | matcher: <matcher files=[], patterns=None, includes='(?:)', excludes=None> | |||
46 | f beans/black beans/black |
|
48 | f beans/black beans/black | |
47 | f beans/borlotti beans/borlotti |
|
49 | f beans/borlotti beans/borlotti | |
48 | f beans/kidney beans/kidney |
|
50 | f beans/kidney beans/kidney | |
@@ -59,6 +61,7 b'' | |||||
59 |
|
61 | |||
60 | $ cd mammals |
|
62 | $ cd mammals | |
61 | $ hg debugwalk |
|
63 | $ hg debugwalk | |
|
64 | matcher: <matcher files=[], patterns=None, includes=None, excludes=None> | |||
62 |
|
|
65 | f beans/black ../beans/black | |
63 | f beans/borlotti ../beans/borlotti |
|
66 | f beans/borlotti ../beans/borlotti | |
64 | f beans/kidney ../beans/kidney |
|
67 | f beans/kidney ../beans/kidney | |
@@ -73,6 +76,7 b'' | |||||
73 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
76 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
74 | f mammals/skunk skunk |
|
77 | f mammals/skunk skunk | |
75 | $ hg debugwalk -X ../beans |
|
78 | $ hg debugwalk -X ../beans | |
|
79 | matcher: <matcher files=[], patterns=None, includes=None, excludes='(?:beans(?:/|$))'> | |||
76 |
|
|
80 | f fennel ../fennel | |
77 | f fenugreek ../fenugreek |
|
81 | f fenugreek ../fenugreek | |
78 | f fiddlehead ../fiddlehead |
|
82 | f fiddlehead ../fiddlehead | |
@@ -81,24 +85,31 b'' | |||||
81 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
85 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
82 | f mammals/skunk skunk |
|
86 | f mammals/skunk skunk | |
83 | $ hg debugwalk -I '*k' |
|
87 | $ hg debugwalk -I '*k' | |
|
88 | matcher: <matcher files=[], patterns=None, includes='(?:mammals\\/[^/]*k(?:/|$))', excludes=None> | |||
84 |
|
|
89 | f mammals/skunk skunk | |
85 | $ hg debugwalk -I 'glob:*k' |
|
90 | $ hg debugwalk -I 'glob:*k' | |
|
91 | matcher: <matcher files=[], patterns=None, includes='(?:mammals\\/[^/]*k(?:/|$))', excludes=None> | |||
86 |
|
|
92 | f mammals/skunk skunk | |
87 | $ hg debugwalk -I 'relglob:*k' |
|
93 | $ hg debugwalk -I 'relglob:*k' | |
|
94 | matcher: <matcher files=[], patterns=None, includes='(?:(?:|.*/)[^/]*k(?:/|$))', excludes=None> | |||
88 |
|
|
95 | f beans/black ../beans/black | |
89 | f fenugreek ../fenugreek |
|
96 | f fenugreek ../fenugreek | |
90 | f mammals/skunk skunk |
|
97 | f mammals/skunk skunk | |
91 | $ hg debugwalk -I 'relglob:*k' . |
|
98 | $ hg debugwalk -I 'relglob:*k' . | |
|
99 | matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes='(?:(?:|.*/)[^/]*k(?:/|$))', excludes=None> | |||
92 | f mammals/skunk skunk |
|
100 | f mammals/skunk skunk | |
93 | $ hg debugwalk -I 're:.*k$' |
|
101 | $ hg debugwalk -I 're:.*k$' | |
|
102 | matcher: <matcher files=[], patterns=None, includes='(?:.*k$)', excludes=None> | |||
94 |
|
|
103 | f beans/black ../beans/black | |
95 | f fenugreek ../fenugreek |
|
104 | f fenugreek ../fenugreek | |
96 | f mammals/skunk skunk |
|
105 | f mammals/skunk skunk | |
97 | $ hg debugwalk -I 'relre:.*k$' |
|
106 | $ hg debugwalk -I 'relre:.*k$' | |
|
107 | matcher: <matcher files=[], patterns=None, includes='(?:.*.*k$)', excludes=None> | |||
98 |
|
|
108 | f beans/black ../beans/black | |
99 | f fenugreek ../fenugreek |
|
109 | f fenugreek ../fenugreek | |
100 | f mammals/skunk skunk |
|
110 | f mammals/skunk skunk | |
101 | $ hg debugwalk -I 'path:beans' |
|
111 | $ hg debugwalk -I 'path:beans' | |
|
112 | matcher: <matcher files=[], patterns=None, includes='(?:^beans(?:/|$))', excludes=None> | |||
102 |
|
|
113 | f beans/black ../beans/black | |
103 | f beans/borlotti ../beans/borlotti |
|
114 | f beans/borlotti ../beans/borlotti | |
104 | f beans/kidney ../beans/kidney |
|
115 | f beans/kidney ../beans/kidney | |
@@ -106,6 +117,7 b'' | |||||
106 | f beans/pinto ../beans/pinto |
|
117 | f beans/pinto ../beans/pinto | |
107 | f beans/turtle ../beans/turtle |
|
118 | f beans/turtle ../beans/turtle | |
108 | $ hg debugwalk -I 'relpath:detour/../../beans' |
|
119 | $ hg debugwalk -I 'relpath:detour/../../beans' | |
|
120 | matcher: <matcher files=[], patterns=None, includes='(?:beans(?:/|$))', excludes=None> | |||
109 |
|
|
121 | f beans/black ../beans/black | |
110 | f beans/borlotti ../beans/borlotti |
|
122 | f beans/borlotti ../beans/borlotti | |
111 | f beans/kidney ../beans/kidney |
|
123 | f beans/kidney ../beans/kidney | |
@@ -114,22 +126,27 b'' | |||||
114 | f beans/turtle ../beans/turtle |
|
126 | f beans/turtle ../beans/turtle | |
115 |
|
127 | |||
116 | $ hg debugwalk 'rootfilesin:' |
|
128 | $ hg debugwalk 'rootfilesin:' | |
|
129 | matcher: <matcher files=[], patterns='(?:^[^/]+$)', includes=None, excludes=None> | |||
117 |
|
|
130 | f fennel ../fennel | |
118 | f fenugreek ../fenugreek |
|
131 | f fenugreek ../fenugreek | |
119 | f fiddlehead ../fiddlehead |
|
132 | f fiddlehead ../fiddlehead | |
120 | $ hg debugwalk -I 'rootfilesin:' |
|
133 | $ hg debugwalk -I 'rootfilesin:' | |
|
134 | matcher: <matcher files=[], patterns=None, includes='(?:^[^/]+$)', excludes=None> | |||
121 |
|
|
135 | f fennel ../fennel | |
122 | f fenugreek ../fenugreek |
|
136 | f fenugreek ../fenugreek | |
123 | f fiddlehead ../fiddlehead |
|
137 | f fiddlehead ../fiddlehead | |
124 | $ hg debugwalk 'rootfilesin:.' |
|
138 | $ hg debugwalk 'rootfilesin:.' | |
|
139 | matcher: <matcher files=[], patterns='(?:^[^/]+$)', includes=None, excludes=None> | |||
125 |
|
|
140 | f fennel ../fennel | |
126 | f fenugreek ../fenugreek |
|
141 | f fenugreek ../fenugreek | |
127 | f fiddlehead ../fiddlehead |
|
142 | f fiddlehead ../fiddlehead | |
128 | $ hg debugwalk -I 'rootfilesin:.' |
|
143 | $ hg debugwalk -I 'rootfilesin:.' | |
|
144 | matcher: <matcher files=[], patterns=None, includes='(?:^[^/]+$)', excludes=None> | |||
129 |
|
|
145 | f fennel ../fennel | |
130 | f fenugreek ../fenugreek |
|
146 | f fenugreek ../fenugreek | |
131 | f fiddlehead ../fiddlehead |
|
147 | f fiddlehead ../fiddlehead | |
132 | $ hg debugwalk -X 'rootfilesin:' |
|
148 | $ hg debugwalk -X 'rootfilesin:' | |
|
149 | matcher: <matcher files=[], patterns=None, includes=None, excludes='(?:^[^/]+$)'> | |||
133 |
|
|
150 | f beans/black ../beans/black | |
134 | f beans/borlotti ../beans/borlotti |
|
151 | f beans/borlotti ../beans/borlotti | |
135 | f beans/kidney ../beans/kidney |
|
152 | f beans/kidney ../beans/kidney | |
@@ -141,10 +158,15 b'' | |||||
141 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
158 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
142 | f mammals/skunk skunk |
|
159 | f mammals/skunk skunk | |
143 | $ hg debugwalk 'rootfilesin:fennel' |
|
160 | $ hg debugwalk 'rootfilesin:fennel' | |
|
161 | matcher: <matcher files=[], patterns='(?:^fennel/[^/]+$)', includes=None, excludes=None> | |||
144 | $ hg debugwalk -I 'rootfilesin:fennel' |
|
162 | $ hg debugwalk -I 'rootfilesin:fennel' | |
|
163 | matcher: <matcher files=[], patterns=None, includes='(?:^fennel/[^/]+$)', excludes=None> | |||
145 | $ hg debugwalk 'rootfilesin:skunk' |
|
164 | $ hg debugwalk 'rootfilesin:skunk' | |
|
165 | matcher: <matcher files=[], patterns='(?:^skunk/[^/]+$)', includes=None, excludes=None> | |||
146 | $ hg debugwalk -I 'rootfilesin:skunk' |
|
166 | $ hg debugwalk -I 'rootfilesin:skunk' | |
|
167 | matcher: <matcher files=[], patterns=None, includes='(?:^skunk/[^/]+$)', excludes=None> | |||
147 | $ hg debugwalk 'rootfilesin:beans' |
|
168 | $ hg debugwalk 'rootfilesin:beans' | |
|
169 | matcher: <matcher files=[], patterns='(?:^beans/[^/]+$)', includes=None, excludes=None> | |||
148 |
|
|
170 | f beans/black ../beans/black | |
149 | f beans/borlotti ../beans/borlotti |
|
171 | f beans/borlotti ../beans/borlotti | |
150 | f beans/kidney ../beans/kidney |
|
172 | f beans/kidney ../beans/kidney | |
@@ -152,6 +174,7 b'' | |||||
152 | f beans/pinto ../beans/pinto |
|
174 | f beans/pinto ../beans/pinto | |
153 | f beans/turtle ../beans/turtle |
|
175 | f beans/turtle ../beans/turtle | |
154 | $ hg debugwalk -I 'rootfilesin:beans' |
|
176 | $ hg debugwalk -I 'rootfilesin:beans' | |
|
177 | matcher: <matcher files=[], patterns=None, includes='(?:^beans/[^/]+$)', excludes=None> | |||
155 |
|
|
178 | f beans/black ../beans/black | |
156 | f beans/borlotti ../beans/borlotti |
|
179 | f beans/borlotti ../beans/borlotti | |
157 | f beans/kidney ../beans/kidney |
|
180 | f beans/kidney ../beans/kidney | |
@@ -159,14 +182,19 b'' | |||||
159 | f beans/pinto ../beans/pinto |
|
182 | f beans/pinto ../beans/pinto | |
160 | f beans/turtle ../beans/turtle |
|
183 | f beans/turtle ../beans/turtle | |
161 | $ hg debugwalk 'rootfilesin:mammals' |
|
184 | $ hg debugwalk 'rootfilesin:mammals' | |
|
185 | matcher: <matcher files=[], patterns='(?:^mammals/[^/]+$)', includes=None, excludes=None> | |||
162 |
|
|
186 | f mammals/skunk skunk | |
163 | $ hg debugwalk -I 'rootfilesin:mammals' |
|
187 | $ hg debugwalk -I 'rootfilesin:mammals' | |
|
188 | matcher: <matcher files=[], patterns=None, includes='(?:^mammals/[^/]+$)', excludes=None> | |||
164 |
|
|
189 | f mammals/skunk skunk | |
165 | $ hg debugwalk 'rootfilesin:mammals/' |
|
190 | $ hg debugwalk 'rootfilesin:mammals/' | |
|
191 | matcher: <matcher files=[], patterns='(?:^mammals/[^/]+$)', includes=None, excludes=None> | |||
166 |
|
|
192 | f mammals/skunk skunk | |
167 | $ hg debugwalk -I 'rootfilesin:mammals/' |
|
193 | $ hg debugwalk -I 'rootfilesin:mammals/' | |
|
194 | matcher: <matcher files=[], patterns=None, includes='(?:^mammals/[^/]+$)', excludes=None> | |||
168 |
|
|
195 | f mammals/skunk skunk | |
169 | $ hg debugwalk -X 'rootfilesin:mammals' |
|
196 | $ hg debugwalk -X 'rootfilesin:mammals' | |
|
197 | matcher: <matcher files=[], patterns=None, includes=None, excludes='(?:^mammals/[^/]+$)'> | |||
170 |
|
|
198 | f beans/black ../beans/black | |
171 | f beans/borlotti ../beans/borlotti |
|
199 | f beans/borlotti ../beans/borlotti | |
172 | f beans/kidney ../beans/kidney |
|
200 | f beans/kidney ../beans/kidney | |
@@ -181,26 +209,31 b'' | |||||
181 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
209 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
182 |
|
210 | |||
183 | $ hg debugwalk . |
|
211 | $ hg debugwalk . | |
|
212 | matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes=None> | |||
184 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
213 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
185 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
214 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
186 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
215 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
187 | f mammals/skunk skunk |
|
216 | f mammals/skunk skunk | |
188 | $ hg debugwalk -I. |
|
217 | $ hg debugwalk -I. | |
|
218 | matcher: <matcher files=[], patterns=None, includes='(?:mammals(?:/|$))', excludes=None> | |||
189 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
219 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
190 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
220 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
191 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
221 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
192 | f mammals/skunk skunk |
|
222 | f mammals/skunk skunk | |
193 | $ hg debugwalk Procyonidae |
|
223 | $ hg debugwalk Procyonidae | |
|
224 | matcher: <matcher files=['mammals/Procyonidae'], patterns='(?:mammals\\/Procyonidae(?:/|$))', includes=None, excludes=None> | |||
194 |
|
|
225 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
195 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
226 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
196 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
227 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
197 |
|
228 | |||
198 | $ cd Procyonidae |
|
229 | $ cd Procyonidae | |
199 | $ hg debugwalk . |
|
230 | $ hg debugwalk . | |
|
231 | matcher: <matcher files=['mammals/Procyonidae'], patterns='(?:mammals\\/Procyonidae(?:/|$))', includes=None, excludes=None> | |||
200 | f mammals/Procyonidae/cacomistle cacomistle |
|
232 | f mammals/Procyonidae/cacomistle cacomistle | |
201 | f mammals/Procyonidae/coatimundi coatimundi |
|
233 | f mammals/Procyonidae/coatimundi coatimundi | |
202 | f mammals/Procyonidae/raccoon raccoon |
|
234 | f mammals/Procyonidae/raccoon raccoon | |
203 | $ hg debugwalk .. |
|
235 | $ hg debugwalk .. | |
|
236 | matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes=None> | |||
204 | f mammals/Procyonidae/cacomistle cacomistle |
|
237 | f mammals/Procyonidae/cacomistle cacomistle | |
205 | f mammals/Procyonidae/coatimundi coatimundi |
|
238 | f mammals/Procyonidae/coatimundi coatimundi | |
206 | f mammals/Procyonidae/raccoon raccoon |
|
239 | f mammals/Procyonidae/raccoon raccoon | |
@@ -208,6 +241,7 b'' | |||||
208 | $ cd .. |
|
241 | $ cd .. | |
209 |
|
242 | |||
210 | $ hg debugwalk ../beans |
|
243 | $ hg debugwalk ../beans | |
|
244 | matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes=None, excludes=None> | |||
211 |
|
|
245 | f beans/black ../beans/black | |
212 | f beans/borlotti ../beans/borlotti |
|
246 | f beans/borlotti ../beans/borlotti | |
213 | f beans/kidney ../beans/kidney |
|
247 | f beans/kidney ../beans/kidney | |
@@ -215,6 +249,7 b'' | |||||
215 | f beans/pinto ../beans/pinto |
|
249 | f beans/pinto ../beans/pinto | |
216 | f beans/turtle ../beans/turtle |
|
250 | f beans/turtle ../beans/turtle | |
217 | $ hg debugwalk . |
|
251 | $ hg debugwalk . | |
|
252 | matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes=None> | |||
218 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle |
|
253 | f mammals/Procyonidae/cacomistle Procyonidae/cacomistle | |
219 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi |
|
254 | f mammals/Procyonidae/coatimundi Procyonidae/coatimundi | |
220 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
255 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
@@ -228,6 +263,7 b'' | |||||
228 | $ cd .. |
|
263 | $ cd .. | |
229 |
|
264 | |||
230 | $ hg debugwalk -Ibeans |
|
265 | $ hg debugwalk -Ibeans | |
|
266 | matcher: <matcher files=[], patterns=None, includes='(?:beans(?:/|$))', excludes=None> | |||
231 |
|
|
267 | f beans/black beans/black | |
232 | f beans/borlotti beans/borlotti |
|
268 | f beans/borlotti beans/borlotti | |
233 | f beans/kidney beans/kidney |
|
269 | f beans/kidney beans/kidney | |
@@ -235,41 +271,56 b'' | |||||
235 | f beans/pinto beans/pinto |
|
271 | f beans/pinto beans/pinto | |
236 | f beans/turtle beans/turtle |
|
272 | f beans/turtle beans/turtle | |
237 | $ hg debugwalk -I '{*,{b,m}*/*}k' |
|
273 | $ hg debugwalk -I '{*,{b,m}*/*}k' | |
|
274 | matcher: <matcher files=[], patterns=None, includes='(?:(?:[^/]*|(?:b|m)[^/]*\\/[^/]*)k(?:/|$))', excludes=None> | |||
238 |
|
|
275 | f beans/black beans/black | |
239 | f fenugreek fenugreek |
|
276 | f fenugreek fenugreek | |
240 | f mammals/skunk mammals/skunk |
|
277 | f mammals/skunk mammals/skunk | |
241 | $ hg debugwalk -Ibeans mammals |
|
278 | $ hg debugwalk -Ibeans mammals | |
|
279 | matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes='(?:beans(?:/|$))', excludes=None> | |||
242 | $ hg debugwalk -Inon-existent |
|
280 | $ hg debugwalk -Inon-existent | |
|
281 | matcher: <matcher files=[], patterns=None, includes='(?:non\\-existent(?:/|$))', excludes=None> | |||
243 | $ hg debugwalk -Inon-existent -Ibeans/black |
|
282 | $ hg debugwalk -Inon-existent -Ibeans/black | |
|
283 | matcher: <matcher files=[], patterns=None, includes='(?:non\\-existent(?:/|$)|beans\\/black(?:/|$))', excludes=None> | |||
244 |
|
|
284 | f beans/black beans/black | |
245 | $ hg debugwalk -Ibeans beans/black |
|
285 | $ hg debugwalk -Ibeans beans/black | |
|
286 | matcher: <matcher files=['beans/black'], patterns='(?:beans\\/black(?:/|$))', includes='(?:beans(?:/|$))', excludes=None> | |||
246 |
|
|
287 | f beans/black beans/black exact | |
247 | $ hg debugwalk -Ibeans/black beans |
|
288 | $ hg debugwalk -Ibeans/black beans | |
|
289 | matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes='(?:beans\\/black(?:/|$))', excludes=None> | |||
248 |
|
|
290 | f beans/black beans/black | |
249 | $ hg debugwalk -Xbeans/black beans |
|
291 | $ hg debugwalk -Xbeans/black beans | |
|
292 | matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes=None, excludes='(?:beans\\/black(?:/|$))'> | |||
250 |
|
|
293 | f beans/borlotti beans/borlotti | |
251 | f beans/kidney beans/kidney |
|
294 | f beans/kidney beans/kidney | |
252 | f beans/navy beans/navy |
|
295 | f beans/navy beans/navy | |
253 | f beans/pinto beans/pinto |
|
296 | f beans/pinto beans/pinto | |
254 | f beans/turtle beans/turtle |
|
297 | f beans/turtle beans/turtle | |
255 | $ hg debugwalk -Xbeans/black -Ibeans |
|
298 | $ hg debugwalk -Xbeans/black -Ibeans | |
|
299 | matcher: <matcher files=[], patterns=None, includes='(?:beans(?:/|$))', excludes='(?:beans\\/black(?:/|$))'> | |||
256 |
|
|
300 | f beans/borlotti beans/borlotti | |
257 | f beans/kidney beans/kidney |
|
301 | f beans/kidney beans/kidney | |
258 | f beans/navy beans/navy |
|
302 | f beans/navy beans/navy | |
259 | f beans/pinto beans/pinto |
|
303 | f beans/pinto beans/pinto | |
260 | f beans/turtle beans/turtle |
|
304 | f beans/turtle beans/turtle | |
261 | $ hg debugwalk -Xbeans/black beans/black |
|
305 | $ hg debugwalk -Xbeans/black beans/black | |
|
306 | matcher: <matcher files=['beans/black'], patterns='(?:beans\\/black(?:/|$))', includes=None, excludes='(?:beans\\/black(?:/|$))'> | |||
262 |
|
|
307 | f beans/black beans/black exact | |
263 | $ hg debugwalk -Xbeans/black -Ibeans/black |
|
308 | $ hg debugwalk -Xbeans/black -Ibeans/black | |
|
309 | matcher: <matcher files=[], patterns=None, includes='(?:beans\\/black(?:/|$))', excludes='(?:beans\\/black(?:/|$))'> | |||
264 | $ hg debugwalk -Xbeans beans/black |
|
310 | $ hg debugwalk -Xbeans beans/black | |
|
311 | matcher: <matcher files=['beans/black'], patterns='(?:beans\\/black(?:/|$))', includes=None, excludes='(?:beans(?:/|$))'> | |||
265 |
|
|
312 | f beans/black beans/black exact | |
266 | $ hg debugwalk -Xbeans -Ibeans/black |
|
313 | $ hg debugwalk -Xbeans -Ibeans/black | |
|
314 | matcher: <matcher files=[], patterns=None, includes='(?:beans\\/black(?:/|$))', excludes='(?:beans(?:/|$))'> | |||
267 | $ hg debugwalk 'glob:mammals/../beans/b*' |
|
315 | $ hg debugwalk 'glob:mammals/../beans/b*' | |
|
316 | matcher: <matcher files=['beans'], patterns='(?:beans\\/b[^/]*$)', includes=None, excludes=None> | |||
268 |
|
|
317 | f beans/black beans/black | |
269 | f beans/borlotti beans/borlotti |
|
318 | f beans/borlotti beans/borlotti | |
270 | $ hg debugwalk '-X*/Procyonidae' mammals |
|
319 | $ hg debugwalk '-X*/Procyonidae' mammals | |
|
320 | matcher: <matcher files=['mammals'], patterns='(?:mammals(?:/|$))', includes=None, excludes='(?:[^/]*\\/Procyonidae(?:/|$))'> | |||
271 |
|
|
321 | f mammals/skunk mammals/skunk | |
272 | $ hg debugwalk path:mammals |
|
322 | $ hg debugwalk path:mammals | |
|
323 | matcher: <matcher files=['mammals'], patterns='(?:^mammals(?:/|$))', includes=None, excludes=None> | |||
273 |
|
|
324 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
274 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
325 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
275 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
326 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
@@ -296,6 +347,7 b'' | |||||
296 | Test absolute paths: |
|
347 | Test absolute paths: | |
297 |
|
348 | |||
298 | $ hg debugwalk `pwd`/beans |
|
349 | $ hg debugwalk `pwd`/beans | |
|
350 | matcher: <matcher files=['beans'], patterns='(?:beans(?:/|$))', includes=None, excludes=None> | |||
299 |
|
|
351 | f beans/black beans/black | |
300 | f beans/borlotti beans/borlotti |
|
352 | f beans/borlotti beans/borlotti | |
301 | f beans/kidney beans/kidney |
|
353 | f beans/kidney beans/kidney | |
@@ -309,6 +361,7 b' Test absolute paths:' | |||||
309 | Test patterns: |
|
361 | Test patterns: | |
310 |
|
362 | |||
311 | $ hg debugwalk glob:\* |
|
363 | $ hg debugwalk glob:\* | |
|
364 | matcher: <matcher files=['.'], patterns='(?:[^/]*$)', includes=None, excludes=None> | |||
312 |
|
|
365 | f fennel fennel | |
313 | f fenugreek fenugreek |
|
366 | f fenugreek fenugreek | |
314 | f fiddlehead fiddlehead |
|
367 | f fiddlehead fiddlehead | |
@@ -318,15 +371,19 b' Test patterns:' | |||||
318 | adding glob:glob |
|
371 | adding glob:glob | |
319 | warning: filename contains ':', which is reserved on Windows: 'glob:glob' |
|
372 | warning: filename contains ':', which is reserved on Windows: 'glob:glob' | |
320 | $ hg debugwalk glob:\* |
|
373 | $ hg debugwalk glob:\* | |
|
374 | matcher: <matcher files=['.'], patterns='(?:[^/]*$)', includes=None, excludes=None> | |||
321 |
|
|
375 | f fennel fennel | |
322 | f fenugreek fenugreek |
|
376 | f fenugreek fenugreek | |
323 | f fiddlehead fiddlehead |
|
377 | f fiddlehead fiddlehead | |
324 | f glob:glob glob:glob |
|
378 | f glob:glob glob:glob | |
325 | $ hg debugwalk glob:glob |
|
379 | $ hg debugwalk glob:glob | |
|
380 | matcher: <matcher files=['glob'], patterns='(?:glob$)', includes=None, excludes=None> | |||
326 | glob: No such file or directory |
|
381 | glob: No such file or directory | |
327 | $ hg debugwalk glob:glob:glob |
|
382 | $ hg debugwalk glob:glob:glob | |
|
383 | matcher: <matcher files=['glob:glob'], patterns='(?:glob\\:glob$)', includes=None, excludes=None> | |||
328 |
|
|
384 | f glob:glob glob:glob exact | |
329 | $ hg debugwalk path:glob:glob |
|
385 | $ hg debugwalk path:glob:glob | |
|
386 | matcher: <matcher files=['glob:glob'], patterns='(?:^glob\\:glob(?:/|$))', includes=None, excludes=None> | |||
330 |
|
|
387 | f glob:glob glob:glob exact | |
331 | $ rm glob:glob |
|
388 | $ rm glob:glob | |
332 | $ hg addremove |
|
389 | $ hg addremove | |
@@ -334,30 +391,38 b' Test patterns:' | |||||
334 | #endif |
|
391 | #endif | |
335 |
|
392 | |||
336 | $ hg debugwalk 'glob:**e' |
|
393 | $ hg debugwalk 'glob:**e' | |
|
394 | matcher: <matcher files=['.'], patterns='(?:.*e$)', includes=None, excludes=None> | |||
337 |
|
|
395 | f beans/turtle beans/turtle | |
338 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
396 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
339 |
|
397 | |||
340 | $ hg debugwalk 're:.*[kb]$' |
|
398 | $ hg debugwalk 're:.*[kb]$' | |
|
399 | matcher: <matcher files=['.'], patterns='(?:.*[kb]$)', includes=None, excludes=None> | |||
341 |
|
|
400 | f beans/black beans/black | |
342 | f fenugreek fenugreek |
|
401 | f fenugreek fenugreek | |
343 | f mammals/skunk mammals/skunk |
|
402 | f mammals/skunk mammals/skunk | |
344 |
|
403 | |||
345 | $ hg debugwalk path:beans/black |
|
404 | $ hg debugwalk path:beans/black | |
|
405 | matcher: <matcher files=['beans/black'], patterns='(?:^beans\\/black(?:/|$))', includes=None, excludes=None> | |||
346 |
|
|
406 | f beans/black beans/black exact | |
347 | $ hg debugwalk path:beans//black |
|
407 | $ hg debugwalk path:beans//black | |
|
408 | matcher: <matcher files=['beans/black'], patterns='(?:^beans\\/black(?:/|$))', includes=None, excludes=None> | |||
348 |
|
|
409 | f beans/black beans/black exact | |
349 |
|
410 | |||
350 | $ hg debugwalk relglob:Procyonidae |
|
411 | $ hg debugwalk relglob:Procyonidae | |
|
412 | matcher: <matcher files=['.'], patterns='(?:(?:|.*/)Procyonidae$)', includes=None, excludes=None> | |||
351 | $ hg debugwalk 'relglob:Procyonidae/**' |
|
413 | $ hg debugwalk 'relglob:Procyonidae/**' | |
|
414 | matcher: <matcher files=['.'], patterns='(?:(?:|.*/)Procyonidae\\/.*$)', includes=None, excludes=None> | |||
352 |
|
|
415 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
353 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
416 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
354 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
417 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
355 | $ hg debugwalk 'relglob:Procyonidae/**' fennel |
|
418 | $ hg debugwalk 'relglob:Procyonidae/**' fennel | |
|
419 | matcher: <matcher files=['.', 'fennel'], patterns='(?:(?:|.*/)Procyonidae\\/.*$|fennel(?:/|$))', includes=None, excludes=None> | |||
356 |
|
|
420 | f fennel fennel exact | |
357 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
421 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
358 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
422 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
359 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
423 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
360 | $ hg debugwalk beans 'glob:beans/*' |
|
424 | $ hg debugwalk beans 'glob:beans/*' | |
|
425 | matcher: <matcher files=['beans', 'beans'], patterns='(?:beans(?:/|$)|beans\\/[^/]*$)', includes=None, excludes=None> | |||
361 |
|
|
426 | f beans/black beans/black | |
362 | f beans/borlotti beans/borlotti |
|
427 | f beans/borlotti beans/borlotti | |
363 | f beans/kidney beans/kidney |
|
428 | f beans/kidney beans/kidney | |
@@ -365,63 +430,78 b' Test patterns:' | |||||
365 | f beans/pinto beans/pinto |
|
430 | f beans/pinto beans/pinto | |
366 | f beans/turtle beans/turtle |
|
431 | f beans/turtle beans/turtle | |
367 | $ hg debugwalk 'glob:mamm**' |
|
432 | $ hg debugwalk 'glob:mamm**' | |
|
433 | matcher: <matcher files=['.'], patterns='(?:mamm.*$)', includes=None, excludes=None> | |||
368 |
|
|
434 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
369 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
435 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
370 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
436 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
371 | f mammals/skunk mammals/skunk |
|
437 | f mammals/skunk mammals/skunk | |
372 | $ hg debugwalk 'glob:mamm**' fennel |
|
438 | $ hg debugwalk 'glob:mamm**' fennel | |
|
439 | matcher: <matcher files=['.', 'fennel'], patterns='(?:mamm.*$|fennel(?:/|$))', includes=None, excludes=None> | |||
373 |
|
|
440 | f fennel fennel exact | |
374 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
441 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
375 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
442 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
376 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
443 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
377 | f mammals/skunk mammals/skunk |
|
444 | f mammals/skunk mammals/skunk | |
378 | $ hg debugwalk 'glob:j*' |
|
445 | $ hg debugwalk 'glob:j*' | |
|
446 | matcher: <matcher files=['.'], patterns='(?:j[^/]*$)', includes=None, excludes=None> | |||
379 | $ hg debugwalk NOEXIST |
|
447 | $ hg debugwalk NOEXIST | |
|
448 | matcher: <matcher files=['NOEXIST'], patterns='(?:NOEXIST(?:/|$))', includes=None, excludes=None> | |||
380 | NOEXIST: * (glob) |
|
449 | NOEXIST: * (glob) | |
381 |
|
450 | |||
382 | #if fifo |
|
451 | #if fifo | |
383 | $ mkfifo fifo |
|
452 | $ mkfifo fifo | |
384 | $ hg debugwalk fifo |
|
453 | $ hg debugwalk fifo | |
|
454 | matcher: <matcher files=['fifo'], patterns='(?:fifo(?:/|$))', includes=None, excludes=None> | |||
385 | fifo: unsupported file type (type is fifo) |
|
455 | fifo: unsupported file type (type is fifo) | |
386 | #endif |
|
456 | #endif | |
387 |
|
457 | |||
388 | $ rm fenugreek |
|
458 | $ rm fenugreek | |
389 | $ hg debugwalk fenugreek |
|
459 | $ hg debugwalk fenugreek | |
|
460 | matcher: <matcher files=['fenugreek'], patterns='(?:fenugreek(?:/|$))', includes=None, excludes=None> | |||
390 |
|
|
461 | f fenugreek fenugreek exact | |
391 | $ hg rm fenugreek |
|
462 | $ hg rm fenugreek | |
392 | $ hg debugwalk fenugreek |
|
463 | $ hg debugwalk fenugreek | |
|
464 | matcher: <matcher files=['fenugreek'], patterns='(?:fenugreek(?:/|$))', includes=None, excludes=None> | |||
393 |
|
|
465 | f fenugreek fenugreek exact | |
394 | $ touch new |
|
466 | $ touch new | |
395 | $ hg debugwalk new |
|
467 | $ hg debugwalk new | |
|
468 | matcher: <matcher files=['new'], patterns='(?:new(?:/|$))', includes=None, excludes=None> | |||
396 | f new new exact |
|
469 | f new new exact | |
397 |
|
470 | |||
398 | $ mkdir ignored |
|
471 | $ mkdir ignored | |
399 | $ touch ignored/file |
|
472 | $ touch ignored/file | |
400 | $ echo '^ignored$' > .hgignore |
|
473 | $ echo '^ignored$' > .hgignore | |
401 | $ hg debugwalk ignored |
|
474 | $ hg debugwalk ignored | |
|
475 | matcher: <matcher files=['ignored'], patterns='(?:ignored(?:/|$))', includes=None, excludes=None> | |||
402 | $ hg debugwalk ignored/file |
|
476 | $ hg debugwalk ignored/file | |
|
477 | matcher: <matcher files=['ignored/file'], patterns='(?:ignored\\/file(?:/|$))', includes=None, excludes=None> | |||
403 |
|
|
478 | f ignored/file ignored/file exact | |
404 |
|
479 | |||
405 | Test listfile and listfile0 |
|
480 | Test listfile and listfile0 | |
406 |
|
481 | |||
407 | $ $PYTHON -c "file('listfile0', 'wb').write('fenugreek\0new\0')" |
|
482 | $ $PYTHON -c "file('listfile0', 'wb').write('fenugreek\0new\0')" | |
408 | $ hg debugwalk -I 'listfile0:listfile0' |
|
483 | $ hg debugwalk -I 'listfile0:listfile0' | |
|
484 | matcher: <matcher files=[], patterns=None, includes='(?:fenugreek(?:/|$)|new(?:/|$))', excludes=None> | |||
409 |
|
|
485 | f fenugreek fenugreek | |
410 | f new new |
|
486 | f new new | |
411 | $ $PYTHON -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')" |
|
487 | $ $PYTHON -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')" | |
412 | $ hg debugwalk -I 'listfile:listfile' |
|
488 | $ hg debugwalk -I 'listfile:listfile' | |
|
489 | matcher: <matcher files=[], patterns=None, includes='(?:fenugreek(?:/|$)|new(?:/|$)|mammals\\/skunk(?:/|$))', excludes=None> | |||
413 |
|
|
490 | f fenugreek fenugreek | |
414 | f mammals/skunk mammals/skunk |
|
491 | f mammals/skunk mammals/skunk | |
415 | f new new |
|
492 | f new new | |
416 |
|
493 | |||
417 | $ cd .. |
|
494 | $ cd .. | |
418 | $ hg debugwalk -R t t/mammals/skunk |
|
495 | $ hg debugwalk -R t t/mammals/skunk | |
|
496 | matcher: <matcher files=['mammals/skunk'], patterns='(?:mammals\\/skunk(?:/|$))', includes=None, excludes=None> | |||
419 |
|
|
497 | f mammals/skunk t/mammals/skunk exact | |
420 | $ mkdir t2 |
|
498 | $ mkdir t2 | |
421 | $ cd t2 |
|
499 | $ cd t2 | |
422 | $ hg debugwalk -R ../t ../t/mammals/skunk |
|
500 | $ hg debugwalk -R ../t ../t/mammals/skunk | |
|
501 | matcher: <matcher files=['mammals/skunk'], patterns='(?:mammals\\/skunk(?:/|$))', includes=None, excludes=None> | |||
423 |
|
|
502 | f mammals/skunk ../t/mammals/skunk exact | |
424 | $ hg debugwalk --cwd ../t mammals/skunk |
|
503 | $ hg debugwalk --cwd ../t mammals/skunk | |
|
504 | matcher: <matcher files=['mammals/skunk'], patterns='(?:mammals\\/skunk(?:/|$))', includes=None, excludes=None> | |||
425 |
|
|
505 | f mammals/skunk mammals/skunk exact | |
426 |
|
506 | |||
427 | $ cd .. |
|
507 | $ cd .. | |
@@ -432,7 +512,7 b' Test split patterns on overflow' | |||||
432 | $ echo fennel > overflow.list |
|
512 | $ echo fennel > overflow.list | |
433 | $ $PYTHON -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list |
|
513 | $ $PYTHON -c "for i in xrange(20000 / 100): print 'x' * 100" >> overflow.list | |
434 | $ echo fenugreek >> overflow.list |
|
514 | $ echo fenugreek >> overflow.list | |
435 | $ hg debugwalk 'listfile:overflow.list' 2>&1 | grep -v '^xxx' |
|
515 | $ hg debugwalk 'listfile:overflow.list' 2>&1 | egrep -v '(^matcher: |^xxx)' | |
436 | f fennel fennel exact |
|
516 | f fennel fennel exact | |
437 | f fenugreek fenugreek exact |
|
517 | f fenugreek fenugreek exact | |
438 | $ cd .. |
|
518 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now