Show More
@@ -376,7 +376,7 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): |
|
379 | def makelocalrepository(baseui, path, intents=None): | |
380 | """Create a local repository object. |
|
380 | """Create a local repository object. | |
381 |
|
381 | |||
382 | Given arguments needed to construct a local repository, this function |
|
382 | Given arguments needed to construct a local repository, this function | |
@@ -386,6 +386,10 b' def makelocalrepository(ui, path, intent' | |||||
386 | The returned object conforms to the ``repository.completelocalrepository`` |
|
386 | The returned object conforms to the ``repository.completelocalrepository`` | |
387 | interface. |
|
387 | interface. | |
388 | """ |
|
388 | """ | |
|
389 | ui = baseui.copy() | |||
|
390 | # Prevent copying repo configuration. | |||
|
391 | ui.copy = baseui.copy | |||
|
392 | ||||
389 | # Working directory VFS rooted at repository root. |
|
393 | # Working directory VFS rooted at repository root. | |
390 | wdirvfs = vfsmod.vfs(path, expandpath=True, realpath=True) |
|
394 | wdirvfs = vfsmod.vfs(path, expandpath=True, realpath=True) | |
391 |
|
395 | |||
@@ -394,7 +398,9 b' def makelocalrepository(ui, path, intent' | |||||
394 | hgvfs = vfsmod.vfs(hgpath, cacheaudited=True) |
|
398 | hgvfs = vfsmod.vfs(hgpath, cacheaudited=True) | |
395 |
|
399 | |||
396 | return localrepository( |
|
400 | return localrepository( | |
397 | ui, path, |
|
401 | baseui=baseui, | |
|
402 | ui=ui, | |||
|
403 | origroot=path, | |||
398 | wdirvfs=wdirvfs, |
|
404 | wdirvfs=wdirvfs, | |
399 | hgvfs=hgvfs, |
|
405 | hgvfs=hgvfs, | |
400 | intents=intents) |
|
406 | intents=intents) | |
@@ -449,7 +455,7 b' class localrepository(object):' | |||||
449 | 'bisect.state', |
|
455 | 'bisect.state', | |
450 | } |
|
456 | } | |
451 |
|
457 | |||
452 | def __init__(self, baseui, origroot, wdirvfs, hgvfs, intents=None): |
|
458 | def __init__(self, baseui, ui, origroot, wdirvfs, hgvfs, intents=None): | |
453 | """Create a new local repository instance. |
|
459 | """Create a new local repository instance. | |
454 |
|
460 | |||
455 | Most callers should use ``hg.repository()``, ``localrepo.instance()``, |
|
461 | Most callers should use ``hg.repository()``, ``localrepo.instance()``, | |
@@ -459,8 +465,10 b' class localrepository(object):' | |||||
459 | Arguments: |
|
465 | Arguments: | |
460 |
|
466 | |||
461 | baseui |
|
467 | baseui | |
462 | ``ui.ui`` instance to use. A copy will be made (since new config |
|
468 | ``ui.ui`` instance that ``ui`` argument was based off of. | |
463 | options may be loaded into it). |
|
469 | ||
|
470 | ui | |||
|
471 | ``ui.ui`` instance for use by the repository. | |||
464 |
|
472 | |||
465 | origroot |
|
473 | origroot | |
466 | ``bytes`` path to working directory root of this repository. |
|
474 | ``bytes`` path to working directory root of this repository. | |
@@ -476,9 +484,7 b' class localrepository(object):' | |||||
476 | for. |
|
484 | for. | |
477 | """ |
|
485 | """ | |
478 | self.baseui = baseui |
|
486 | self.baseui = baseui | |
479 |
self.ui = |
|
487 | self.ui = ui | |
480 | self.ui.copy = baseui.copy # prevent copying repo configuration |
|
|||
481 |
|
||||
482 | self.origroot = origroot |
|
488 | self.origroot = origroot | |
483 | # vfs rooted at working directory. |
|
489 | # vfs rooted at working directory. | |
484 | self.wvfs = wdirvfs |
|
490 | self.wvfs = wdirvfs |
General Comments 0
You need to be logged in to leave comments.
Login now