Show More
@@ -13,6 +13,7 b' from .i18n import _' | |||
|
13 | 13 | from . import ( |
|
14 | 14 | error, |
|
15 | 15 | match as matchmod, |
|
16 | sparse, | |
|
16 | 17 | util, |
|
17 | 18 | ) |
|
18 | 19 | |
@@ -107,10 +108,10 b' def parsepatterns(pats):' | |||
|
107 | 108 | return set(normalizepattern(p) for p in pats) |
|
108 | 109 | |
|
109 | 110 | def format(includes, excludes): |
|
110 |
output = '[include |
|
|
111 | output = '[include]\n' | |
|
111 | 112 | for i in sorted(includes - excludes): |
|
112 | 113 | output += i + '\n' |
|
113 |
output += '[exclude |
|
|
114 | output += '[exclude]\n' | |
|
114 | 115 | for e in sorted(excludes): |
|
115 | 116 | output += e + '\n' |
|
116 | 117 | return output |
@@ -139,7 +140,13 b' def load(repo):' | |||
|
139 | 140 | repo.invalidate(clearfilecache=True) |
|
140 | 141 | return set(), set() |
|
141 | 142 | raise |
|
142 | return _parsestoredpatterns(spec) | |
|
143 | # maybe we should care about the profiles returned too | |
|
144 | includepats, excludepats, profiles = sparse.parseconfig(repo.ui, spec, | |
|
145 | 'narrow') | |
|
146 | if profiles: | |
|
147 | raise error.Abort(_("including other spec files using '%include' is not" | |
|
148 | " suported in narrowspec")) | |
|
149 | return includepats, excludepats | |
|
143 | 150 | |
|
144 | 151 | def save(repo, includepats, excludepats): |
|
145 | 152 | spec = format(includepats, excludepats) |
General Comments 0
You need to be logged in to leave comments.
Login now