Show More
@@ -19,29 +19,6 b' from . import (' | |||||
19 |
|
19 | |||
20 | FILENAME = 'narrowspec' |
|
20 | FILENAME = 'narrowspec' | |
21 |
|
21 | |||
22 | def _parsestoredpatterns(text): |
|
|||
23 | """Parses the narrowspec format that's stored on disk.""" |
|
|||
24 | patlist = None |
|
|||
25 | includepats = [] |
|
|||
26 | excludepats = [] |
|
|||
27 | for l in text.splitlines(): |
|
|||
28 | if l == '[includes]': |
|
|||
29 | if patlist is None: |
|
|||
30 | patlist = includepats |
|
|||
31 | else: |
|
|||
32 | raise error.Abort(_('narrowspec includes section must appear ' |
|
|||
33 | 'at most once, before excludes')) |
|
|||
34 | elif l == '[excludes]': |
|
|||
35 | if patlist is not excludepats: |
|
|||
36 | patlist = excludepats |
|
|||
37 | else: |
|
|||
38 | raise error.Abort(_('narrowspec excludes section must appear ' |
|
|||
39 | 'at most once')) |
|
|||
40 | else: |
|
|||
41 | patlist.append(l) |
|
|||
42 |
|
||||
43 | return set(includepats), set(excludepats) |
|
|||
44 |
|
||||
45 | def parseserverpatterns(text): |
|
22 | def parseserverpatterns(text): | |
46 | """Parses the narrowspec format that's returned by the server.""" |
|
23 | """Parses the narrowspec format that's returned by the server.""" | |
47 | includepats = set() |
|
24 | includepats = set() |
General Comments 0
You need to be logged in to leave comments.
Login now