Show More
@@ -797,7 +797,7 b' def _regex(kind, pat, globsuffix):' | |||||
797 | if kind == 'path': |
|
797 | if kind == 'path': | |
798 | if pat == '.': |
|
798 | if pat == '.': | |
799 | return '' |
|
799 | return '' | |
800 |
return |
|
800 | return util.re.escape(pat) + '(?:/|$)' | |
801 | if kind == 'rootfilesin': |
|
801 | if kind == 'rootfilesin': | |
802 | if pat == '.': |
|
802 | if pat == '.': | |
803 | escaped = '' |
|
803 | escaped = '' | |
@@ -805,7 +805,7 b' def _regex(kind, pat, globsuffix):' | |||||
805 | # Pattern is a directory name. |
|
805 | # Pattern is a directory name. | |
806 | escaped = util.re.escape(pat) + '/' |
|
806 | escaped = util.re.escape(pat) + '/' | |
807 | # Anything after the pattern must be a non-directory. |
|
807 | # Anything after the pattern must be a non-directory. | |
808 |
return |
|
808 | return escaped + '[^/]+$' | |
809 | if kind == 'relglob': |
|
809 | if kind == 'relglob': | |
810 | return '(?:|.*/)' + _globre(pat) + globsuffix |
|
810 | return '(?:|.*/)' + _globre(pat) + globsuffix | |
811 | if kind == 'relpath': |
|
811 | if kind == 'relpath': |
@@ -109,7 +109,7 b'' | |||||
109 | f fenugreek ../fenugreek |
|
109 | f fenugreek ../fenugreek | |
110 | f mammals/skunk skunk |
|
110 | f mammals/skunk skunk | |
111 | $ hg debugwalk -I 'path:beans' |
|
111 | $ hg debugwalk -I 'path:beans' | |
112 |
matcher: <includematcher includes='(?: |
|
112 | matcher: <includematcher includes='(?:beans(?:/|$))'> | |
113 | f beans/black ../beans/black |
|
113 | f beans/black ../beans/black | |
114 | f beans/borlotti ../beans/borlotti |
|
114 | f beans/borlotti ../beans/borlotti | |
115 | f beans/kidney ../beans/kidney |
|
115 | f beans/kidney ../beans/kidney | |
@@ -126,27 +126,27 b'' | |||||
126 | f beans/turtle ../beans/turtle |
|
126 | f beans/turtle ../beans/turtle | |
127 |
|
127 | |||
128 | $ hg debugwalk 'rootfilesin:' |
|
128 | $ hg debugwalk 'rootfilesin:' | |
129 |
matcher: <patternmatcher patterns='(?: |
|
129 | matcher: <patternmatcher patterns='(?:[^/]+$)'> | |
130 | f fennel ../fennel |
|
130 | f fennel ../fennel | |
131 | f fenugreek ../fenugreek |
|
131 | f fenugreek ../fenugreek | |
132 | f fiddlehead ../fiddlehead |
|
132 | f fiddlehead ../fiddlehead | |
133 | $ hg debugwalk -I 'rootfilesin:' |
|
133 | $ hg debugwalk -I 'rootfilesin:' | |
134 |
matcher: <includematcher includes='(?: |
|
134 | matcher: <includematcher includes='(?:[^/]+$)'> | |
135 | f fennel ../fennel |
|
135 | f fennel ../fennel | |
136 | f fenugreek ../fenugreek |
|
136 | f fenugreek ../fenugreek | |
137 | f fiddlehead ../fiddlehead |
|
137 | f fiddlehead ../fiddlehead | |
138 | $ hg debugwalk 'rootfilesin:.' |
|
138 | $ hg debugwalk 'rootfilesin:.' | |
139 |
matcher: <patternmatcher patterns='(?: |
|
139 | matcher: <patternmatcher patterns='(?:[^/]+$)'> | |
140 | f fennel ../fennel |
|
140 | f fennel ../fennel | |
141 | f fenugreek ../fenugreek |
|
141 | f fenugreek ../fenugreek | |
142 | f fiddlehead ../fiddlehead |
|
142 | f fiddlehead ../fiddlehead | |
143 | $ hg debugwalk -I 'rootfilesin:.' |
|
143 | $ hg debugwalk -I 'rootfilesin:.' | |
144 |
matcher: <includematcher includes='(?: |
|
144 | matcher: <includematcher includes='(?:[^/]+$)'> | |
145 | f fennel ../fennel |
|
145 | f fennel ../fennel | |
146 | f fenugreek ../fenugreek |
|
146 | f fenugreek ../fenugreek | |
147 | f fiddlehead ../fiddlehead |
|
147 | f fiddlehead ../fiddlehead | |
148 | $ hg debugwalk -X 'rootfilesin:' |
|
148 | $ hg debugwalk -X 'rootfilesin:' | |
149 |
matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?: |
|
149 | matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:[^/]+$)'>> | |
150 | f beans/black ../beans/black |
|
150 | f beans/black ../beans/black | |
151 | f beans/borlotti ../beans/borlotti |
|
151 | f beans/borlotti ../beans/borlotti | |
152 | f beans/kidney ../beans/kidney |
|
152 | f beans/kidney ../beans/kidney | |
@@ -158,15 +158,15 b'' | |||||
158 | f mammals/Procyonidae/raccoon Procyonidae/raccoon |
|
158 | f mammals/Procyonidae/raccoon Procyonidae/raccoon | |
159 | f mammals/skunk skunk |
|
159 | f mammals/skunk skunk | |
160 | $ hg debugwalk 'rootfilesin:fennel' |
|
160 | $ hg debugwalk 'rootfilesin:fennel' | |
161 |
matcher: <patternmatcher patterns='(?: |
|
161 | matcher: <patternmatcher patterns='(?:fennel/[^/]+$)'> | |
162 | $ hg debugwalk -I 'rootfilesin:fennel' |
|
162 | $ hg debugwalk -I 'rootfilesin:fennel' | |
163 |
matcher: <includematcher includes='(?: |
|
163 | matcher: <includematcher includes='(?:fennel/[^/]+$)'> | |
164 | $ hg debugwalk 'rootfilesin:skunk' |
|
164 | $ hg debugwalk 'rootfilesin:skunk' | |
165 |
matcher: <patternmatcher patterns='(?: |
|
165 | matcher: <patternmatcher patterns='(?:skunk/[^/]+$)'> | |
166 | $ hg debugwalk -I 'rootfilesin:skunk' |
|
166 | $ hg debugwalk -I 'rootfilesin:skunk' | |
167 |
matcher: <includematcher includes='(?: |
|
167 | matcher: <includematcher includes='(?:skunk/[^/]+$)'> | |
168 | $ hg debugwalk 'rootfilesin:beans' |
|
168 | $ hg debugwalk 'rootfilesin:beans' | |
169 |
matcher: <patternmatcher patterns='(?: |
|
169 | matcher: <patternmatcher patterns='(?:beans/[^/]+$)'> | |
170 | f beans/black ../beans/black |
|
170 | f beans/black ../beans/black | |
171 | f beans/borlotti ../beans/borlotti |
|
171 | f beans/borlotti ../beans/borlotti | |
172 | f beans/kidney ../beans/kidney |
|
172 | f beans/kidney ../beans/kidney | |
@@ -174,7 +174,7 b'' | |||||
174 | f beans/pinto ../beans/pinto |
|
174 | f beans/pinto ../beans/pinto | |
175 | f beans/turtle ../beans/turtle |
|
175 | f beans/turtle ../beans/turtle | |
176 | $ hg debugwalk -I 'rootfilesin:beans' |
|
176 | $ hg debugwalk -I 'rootfilesin:beans' | |
177 |
matcher: <includematcher includes='(?: |
|
177 | matcher: <includematcher includes='(?:beans/[^/]+$)'> | |
178 | f beans/black ../beans/black |
|
178 | f beans/black ../beans/black | |
179 | f beans/borlotti ../beans/borlotti |
|
179 | f beans/borlotti ../beans/borlotti | |
180 | f beans/kidney ../beans/kidney |
|
180 | f beans/kidney ../beans/kidney | |
@@ -182,19 +182,19 b'' | |||||
182 | f beans/pinto ../beans/pinto |
|
182 | f beans/pinto ../beans/pinto | |
183 | f beans/turtle ../beans/turtle |
|
183 | f beans/turtle ../beans/turtle | |
184 | $ hg debugwalk 'rootfilesin:mammals' |
|
184 | $ hg debugwalk 'rootfilesin:mammals' | |
185 |
matcher: <patternmatcher patterns='(?: |
|
185 | matcher: <patternmatcher patterns='(?:mammals/[^/]+$)'> | |
186 | f mammals/skunk skunk |
|
186 | f mammals/skunk skunk | |
187 | $ hg debugwalk -I 'rootfilesin:mammals' |
|
187 | $ hg debugwalk -I 'rootfilesin:mammals' | |
188 |
matcher: <includematcher includes='(?: |
|
188 | matcher: <includematcher includes='(?:mammals/[^/]+$)'> | |
189 | f mammals/skunk skunk |
|
189 | f mammals/skunk skunk | |
190 | $ hg debugwalk 'rootfilesin:mammals/' |
|
190 | $ hg debugwalk 'rootfilesin:mammals/' | |
191 |
matcher: <patternmatcher patterns='(?: |
|
191 | matcher: <patternmatcher patterns='(?:mammals/[^/]+$)'> | |
192 | f mammals/skunk skunk |
|
192 | f mammals/skunk skunk | |
193 | $ hg debugwalk -I 'rootfilesin:mammals/' |
|
193 | $ hg debugwalk -I 'rootfilesin:mammals/' | |
194 |
matcher: <includematcher includes='(?: |
|
194 | matcher: <includematcher includes='(?:mammals/[^/]+$)'> | |
195 | f mammals/skunk skunk |
|
195 | f mammals/skunk skunk | |
196 | $ hg debugwalk -X 'rootfilesin:mammals' |
|
196 | $ hg debugwalk -X 'rootfilesin:mammals' | |
197 |
matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?: |
|
197 | matcher: <differencematcher m1=<alwaysmatcher>, m2=<includematcher includes='(?:mammals/[^/]+$)'>> | |
198 | f beans/black ../beans/black |
|
198 | f beans/black ../beans/black | |
199 | f beans/borlotti ../beans/borlotti |
|
199 | f beans/borlotti ../beans/borlotti | |
200 | f beans/kidney ../beans/kidney |
|
200 | f beans/kidney ../beans/kidney | |
@@ -320,7 +320,7 b'' | |||||
320 | matcher: <differencematcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:[^/]*\\/Procyonidae(?:/|$))'>> |
|
320 | matcher: <differencematcher m1=<patternmatcher patterns='(?:mammals(?:/|$))'>, m2=<includematcher includes='(?:[^/]*\\/Procyonidae(?:/|$))'>> | |
321 | f mammals/skunk mammals/skunk |
|
321 | f mammals/skunk mammals/skunk | |
322 | $ hg debugwalk path:mammals |
|
322 | $ hg debugwalk path:mammals | |
323 |
matcher: <patternmatcher patterns='(?: |
|
323 | matcher: <patternmatcher patterns='(?:mammals(?:/|$))'> | |
324 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle |
|
324 | f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle | |
325 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi |
|
325 | f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi | |
326 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
326 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon | |
@@ -383,7 +383,7 b' Test patterns:' | |||||
383 | matcher: <patternmatcher patterns='(?:glob\\:glob$)'> |
|
383 | matcher: <patternmatcher patterns='(?:glob\\:glob$)'> | |
384 | f glob:glob glob:glob exact |
|
384 | f glob:glob glob:glob exact | |
385 | $ hg debugwalk path:glob:glob |
|
385 | $ hg debugwalk path:glob:glob | |
386 |
matcher: <patternmatcher patterns='(?: |
|
386 | matcher: <patternmatcher patterns='(?:glob\\:glob(?:/|$))'> | |
387 | f glob:glob glob:glob exact |
|
387 | f glob:glob glob:glob exact | |
388 | $ rm glob:glob |
|
388 | $ rm glob:glob | |
389 | $ hg addremove |
|
389 | $ hg addremove | |
@@ -402,10 +402,10 b' Test patterns:' | |||||
402 | f mammals/skunk mammals/skunk |
|
402 | f mammals/skunk mammals/skunk | |
403 |
|
403 | |||
404 | $ hg debugwalk path:beans/black |
|
404 | $ hg debugwalk path:beans/black | |
405 |
matcher: <patternmatcher patterns='(?: |
|
405 | matcher: <patternmatcher patterns='(?:beans\\/black(?:/|$))'> | |
406 | f beans/black beans/black exact |
|
406 | f beans/black beans/black exact | |
407 | $ hg debugwalk path:beans//black |
|
407 | $ hg debugwalk path:beans//black | |
408 |
matcher: <patternmatcher patterns='(?: |
|
408 | matcher: <patternmatcher patterns='(?:beans\\/black(?:/|$))'> | |
409 | f beans/black beans/black exact |
|
409 | f beans/black beans/black exact | |
410 |
|
410 | |||
411 | $ hg debugwalk relglob:Procyonidae |
|
411 | $ hg debugwalk relglob:Procyonidae |
General Comments 0
You need to be logged in to leave comments.
Login now