Show More
@@ -376,6 +376,18 b" SPARSEREVLOG_REQUIREMENT = 'sparserevlog" | |||||
376 | # set to reflect that the extension knows how to handle that requirements. |
|
376 | # set to reflect that the extension knows how to handle that requirements. | |
377 | featuresetupfuncs = set() |
|
377 | featuresetupfuncs = set() | |
378 |
|
378 | |||
|
379 | def makelocalrepository(ui, path, intents=None): | |||
|
380 | """Create a local repository object. | |||
|
381 | ||||
|
382 | Given arguments needed to construct a local repository, this function | |||
|
383 | derives a type suitable for representing that repository and returns an | |||
|
384 | instance of it. | |||
|
385 | ||||
|
386 | The returned object conforms to the ``repository.completelocalrepository`` | |||
|
387 | interface. | |||
|
388 | """ | |||
|
389 | return localrepository(ui, path, intents=intents) | |||
|
390 | ||||
379 | @interfaceutil.implementer(repository.completelocalrepository) |
|
391 | @interfaceutil.implementer(repository.completelocalrepository) | |
380 | class localrepository(object): |
|
392 | class localrepository(object): | |
381 |
|
393 | |||
@@ -2388,7 +2400,7 b' def instance(ui, path, create, intents=N' | |||||
2388 | if create: |
|
2400 | if create: | |
2389 | createrepository(ui, localpath, createopts=createopts) |
|
2401 | createrepository(ui, localpath, createopts=createopts) | |
2390 |
|
2402 | |||
2391 | return localrepository(ui, localpath, intents=intents) |
|
2403 | return makelocalrepository(ui, localpath, intents=intents) | |
2392 |
|
2404 | |||
2393 | def islocal(path): |
|
2405 | def islocal(path): | |
2394 | return True |
|
2406 | return True |
@@ -144,7 +144,7 b' def main():' | |||||
144 |
|
144 | |||
145 | ziverify.verifyClass(repository.completelocalrepository, |
|
145 | ziverify.verifyClass(repository.completelocalrepository, | |
146 | localrepo.localrepository) |
|
146 | localrepo.localrepository) | |
147 | repo = localrepo.localrepository(ui, rootdir) |
|
147 | repo = localrepo.makelocalrepository(ui, rootdir) | |
148 | checkzobject(repo) |
|
148 | checkzobject(repo) | |
149 |
|
149 | |||
150 | ziverify.verifyClass(wireprototypes.baseprotocolhandler, |
|
150 | ziverify.verifyClass(wireprototypes.baseprotocolhandler, |
General Comments 0
You need to be logged in to leave comments.
Login now