Show More
@@ -181,9 +181,13 b' def _peerorrepo(' | |||||
181 | ui, path, create=False, presetupfuncs=None, intents=None, createopts=None |
|
181 | ui, path, create=False, presetupfuncs=None, intents=None, createopts=None | |
182 | ): |
|
182 | ): | |
183 | """return a repository object for the specified path""" |
|
183 | """return a repository object for the specified path""" | |
184 |
|
|
184 | cls = _peerlookup(path) | |
185 |
|
|
185 | obj = cls.instance(ui, path, create, intents=intents, createopts=createopts) | |
186 | ) |
|
186 | _setup_repo_or_peer(ui, obj, presetupfuncs) | |
|
187 | return obj | |||
|
188 | ||||
|
189 | ||||
|
190 | def _setup_repo_or_peer(ui, obj, presetupfuncs=None): | |||
187 | ui = getattr(obj, "ui", ui) |
|
191 | ui = getattr(obj, "ui", ui) | |
188 | for f in presetupfuncs or []: |
|
192 | for f in presetupfuncs or []: | |
189 | f(ui, obj) |
|
193 | f(ui, obj) | |
@@ -195,14 +199,12 b' def _peerorrepo(' | |||||
195 | if hook: |
|
199 | if hook: | |
196 | with util.timedcm('reposetup %r', name) as stats: |
|
200 | with util.timedcm('reposetup %r', name) as stats: | |
197 | hook(ui, obj) |
|
201 | hook(ui, obj) | |
198 | ui.log( |
|
202 | msg = b' > reposetup for %s took %s\n' | |
199 |
|
|
203 | ui.log(b'extension', msg, name, stats) | |
200 | ) |
|
|||
201 | ui.log(b'extension', b'> all reposetup took %s\n', allreposetupstats) |
|
204 | ui.log(b'extension', b'> all reposetup took %s\n', allreposetupstats) | |
202 | if not obj.local(): |
|
205 | if not obj.local(): | |
203 | for f in wirepeersetupfuncs: |
|
206 | for f in wirepeersetupfuncs: | |
204 | f(ui, obj) |
|
207 | f(ui, obj) | |
205 | return obj |
|
|||
206 |
|
208 | |||
207 |
|
209 | |||
208 | def repository( |
|
210 | def repository( |
General Comments 0
You need to be logged in to leave comments.
Login now