Show More
@@ -73,7 +73,10 b' def wraprepo(repo):' | |||
|
73 | 73 | |
|
74 | 74 | A tuple of (includes, excludes). |
|
75 | 75 | """ |
|
76 | return narrowspec.load(self) | |
|
76 | source = self | |
|
77 | if self.shared(): | |
|
78 | source = hg.sharedreposource(self) | |
|
79 | return narrowspec.load(source) | |
|
77 | 80 | |
|
78 | 81 | @localrepo.repofilecache(narrowspec.FILENAME) |
|
79 | 82 | def _narrowmatch(self): |
@@ -87,7 +90,10 b' def wraprepo(repo):' | |||
|
87 | 90 | return self._narrowmatch |
|
88 | 91 | |
|
89 | 92 | def setnarrowpats(self, newincludes, newexcludes): |
|
90 | narrowspec.save(self, newincludes, newexcludes) | |
|
93 | target = self | |
|
94 | if self.shared(): | |
|
95 | target = hg.sharedreposource(self) | |
|
96 | narrowspec.save(target, newincludes, newexcludes) | |
|
91 | 97 | self.invalidate(clearfilecache=True) |
|
92 | 98 | |
|
93 | 99 | # I'm not sure this is the right place to do this filter. |
@@ -12,7 +12,6 b' import errno' | |||
|
12 | 12 | from .i18n import _ |
|
13 | 13 | from . import ( |
|
14 | 14 | error, |
|
15 | hg, | |
|
16 | 15 | match as matchmod, |
|
17 | 16 | util, |
|
18 | 17 | ) |
@@ -129,8 +128,6 b' def needsexpansion(includes):' | |||
|
129 | 128 | return [i for i in includes if i.startswith('include:')] |
|
130 | 129 | |
|
131 | 130 | def load(repo): |
|
132 | if repo.shared(): | |
|
133 | repo = hg.sharedreposource(repo) | |
|
134 | 131 | try: |
|
135 | 132 | spec = repo.vfs.read(FILENAME) |
|
136 | 133 | except IOError as e: |
@@ -146,8 +143,6 b' def load(repo):' | |||
|
146 | 143 | |
|
147 | 144 | def save(repo, includepats, excludepats): |
|
148 | 145 | spec = format(includepats, excludepats) |
|
149 | if repo.shared(): | |
|
150 | repo = hg.sharedreposource(repo) | |
|
151 | 146 | repo.vfs.write(FILENAME, spec) |
|
152 | 147 | |
|
153 | 148 | def restrictpatterns(req_includes, req_excludes, repo_includes, repo_excludes): |
General Comments 0
You need to be logged in to leave comments.
Login now