Show More
@@ -397,6 +397,16 b' def makelocalrepository(baseui, path, in' | |||||
397 | hgpath = wdirvfs.join(b'.hg') |
|
397 | hgpath = wdirvfs.join(b'.hg') | |
398 | hgvfs = vfsmod.vfs(hgpath, cacheaudited=True) |
|
398 | hgvfs = vfsmod.vfs(hgpath, cacheaudited=True) | |
399 |
|
399 | |||
|
400 | # The .hg/hgrc file may load extensions or contain config options | |||
|
401 | # that influence repository construction. Attempt to load it and | |||
|
402 | # process any new extensions that it may have pulled in. | |||
|
403 | try: | |||
|
404 | ui.readconfig(hgvfs.join(b'hgrc'), root=wdirvfs.base) | |||
|
405 | except IOError: | |||
|
406 | pass | |||
|
407 | else: | |||
|
408 | extensions.loadall(ui) | |||
|
409 | ||||
400 | return localrepository( |
|
410 | return localrepository( | |
401 | baseui=baseui, |
|
411 | baseui=baseui, | |
402 | ui=ui, |
|
412 | ui=ui, | |
@@ -507,11 +517,6 b' class localrepository(object):' | |||||
507 | # Callback are in the form: func(repo, roots) --> processed root. |
|
517 | # Callback are in the form: func(repo, roots) --> processed root. | |
508 | # This list it to be filled by extension during repo setup |
|
518 | # This list it to be filled by extension during repo setup | |
509 | self._phasedefaults = [] |
|
519 | self._phasedefaults = [] | |
510 | try: |
|
|||
511 | self.ui.readconfig(self.vfs.join("hgrc"), self.root) |
|
|||
512 | self._loadextensions() |
|
|||
513 | except IOError: |
|
|||
514 | pass |
|
|||
515 |
|
520 | |||
516 | if featuresetupfuncs: |
|
521 | if featuresetupfuncs: | |
517 | self.supported = set(self._basesupported) # use private copy |
|
522 | self.supported = set(self._basesupported) # use private copy | |
@@ -675,9 +680,6 b' class localrepository(object):' | |||||
675 | def close(self): |
|
680 | def close(self): | |
676 | self._writecaches() |
|
681 | self._writecaches() | |
677 |
|
682 | |||
678 | def _loadextensions(self): |
|
|||
679 | extensions.loadall(self.ui) |
|
|||
680 |
|
||||
681 | def _writecaches(self): |
|
683 | def _writecaches(self): | |
682 | if self._revbranchcache: |
|
684 | if self._revbranchcache: | |
683 | self._revbranchcache.write() |
|
685 | self._revbranchcache.write() |
General Comments 0
You need to be logged in to leave comments.
Login now