Show More
@@ -197,7 +197,7 b' def match(' | |||
|
197 | 197 | |
|
198 | 198 | Usually a patternmatcher is returned: |
|
199 | 199 | >>> _match(b'/foo', b'.', [br're:.*\.c$', b'path:foo/a', b'*.py']) |
|
200 |
<patternmatcher patterns=' |
|
|
200 | <patternmatcher patterns='[^/]*\\.py$|foo/a(?:/|$)|.*\\.c$'> | |
|
201 | 201 | |
|
202 | 202 | Combining 'patterns' with 'include' (resp. 'exclude') gives an |
|
203 | 203 | intersectionmatcher (resp. a differencematcher): |
@@ -614,7 +614,7 b' class patternmatcher(basematcher):' | |||
|
614 | 614 | True |
|
615 | 615 | |
|
616 | 616 | >>> m.files() |
|
617 |
['', 'foo/a', |
|
|
617 | [b'', b'foo/a', b'', b'b'] | |
|
618 | 618 | >>> m.exact(b'foo/a') |
|
619 | 619 | True |
|
620 | 620 | >>> m.exact(b'b') |
@@ -625,6 +625,7 b' class patternmatcher(basematcher):' | |||
|
625 | 625 | |
|
626 | 626 | def __init__(self, root, kindpats, badfn=None): |
|
627 | 627 | super(patternmatcher, self).__init__(badfn) |
|
628 | kindpats.sort() | |
|
628 | 629 | |
|
629 | 630 | self._files = _explicitfiles(kindpats) |
|
630 | 631 | self._prefix = _prefix(kindpats) |
@@ -53,7 +53,7 b' Test operators and basic patterns' | |||
|
53 | 53 | (symbol 'glob') |
|
54 | 54 | (symbol 'b?'))) |
|
55 | 55 | * matcher: |
|
56 |
<patternmatcher patterns='a1(?:/|$) |
|
|
56 | <patternmatcher patterns='b.$|a1(?:/|$)'> | |
|
57 | 57 | a1 |
|
58 | 58 | b1 |
|
59 | 59 | b2 |
@@ -536,7 +536,7 b' Test patterns:' | |||
|
536 | 536 | f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon |
|
537 | 537 | $ hg debugwalk -v beans 'glob:beans/*' |
|
538 | 538 | * matcher: |
|
539 |
<patternmatcher patterns='beans |
|
|
539 | <patternmatcher patterns='beans/[^/]*$|beans(?:/|$)'> | |
|
540 | 540 | f beans/black beans/black |
|
541 | 541 | f beans/borlotti beans/borlotti |
|
542 | 542 | f beans/kidney beans/kidney |
General Comments 0
You need to be logged in to leave comments.
Login now