Show More
@@ -127,6 +127,18 def match(root, include=None, exclude=No | |||
|
127 | 127 | return matchmod.match(root, '', [], include=include or [], |
|
128 | 128 | exclude=exclude or []) |
|
129 | 129 | |
|
130 | def parseconfig(ui, spec): | |
|
131 | # maybe we should care about the profiles returned too | |
|
132 | includepats, excludepats, profiles = sparse.parseconfig(ui, spec, 'narrow') | |
|
133 | if profiles: | |
|
134 | raise error.Abort(_("including other spec files using '%include' is not" | |
|
135 | " supported in narrowspec")) | |
|
136 | ||
|
137 | validatepatterns(includepats) | |
|
138 | validatepatterns(excludepats) | |
|
139 | ||
|
140 | return includepats, excludepats | |
|
141 | ||
|
130 | 142 | def load(repo): |
|
131 | 143 | try: |
|
132 | 144 | spec = repo.svfs.read(FILENAME) |
@@ -136,17 +148,8 def load(repo): | |||
|
136 | 148 | if e.errno == errno.ENOENT: |
|
137 | 149 | return set(), set() |
|
138 | 150 | raise |
|
139 | # maybe we should care about the profiles returned too | |
|
140 | includepats, excludepats, profiles = sparse.parseconfig(repo.ui, spec, | |
|
141 | 'narrow') | |
|
142 | if profiles: | |
|
143 | raise error.Abort(_("including other spec files using '%include' is not" | |
|
144 | " supported in narrowspec")) | |
|
145 | 151 | |
|
146 | validatepatterns(includepats) | |
|
147 | validatepatterns(excludepats) | |
|
148 | ||
|
149 | return includepats, excludepats | |
|
152 | return parseconfig(repo.ui, spec) | |
|
150 | 153 | |
|
151 | 154 | def save(repo, includepats, excludepats): |
|
152 | 155 | validatepatterns(includepats) |
General Comments 0
You need to be logged in to leave comments.
Login now