Show More
@@ -436,14 +436,6 b' class localrepository(object):' | |||
|
436 | 436 | self.root = self.wvfs.base |
|
437 | 437 | self.path = self.wvfs.join(".hg") |
|
438 | 438 | self.origroot = path |
|
439 | # This is only used by context.workingctx.match in order to | |
|
440 | # detect files in subrepos. | |
|
441 | self.auditor = pathutil.pathauditor( | |
|
442 | self.root, callback=self._checknested) | |
|
443 | # This is only used by context.basectx.match in order to detect | |
|
444 | # files in subrepos. | |
|
445 | self.nofsauditor = pathutil.pathauditor( | |
|
446 | self.root, callback=self._checknested, realfs=False, cached=True) | |
|
447 | 439 | self.baseui = baseui |
|
448 | 440 | self.ui = baseui.copy() |
|
449 | 441 | self.ui.copy = baseui.copy # prevent copying repo configuration |
@@ -709,6 +701,22 b' class localrepository(object):' | |||
|
709 | 701 | def _writerequirements(self): |
|
710 | 702 | scmutil.writerequires(self.vfs, self.requirements) |
|
711 | 703 | |
|
704 | # Don't cache auditor/nofsauditor, or you'll end up with reference cycle: | |
|
705 | # self -> auditor -> self._checknested -> self | |
|
706 | ||
|
707 | @property | |
|
708 | def auditor(self): | |
|
709 | # This is only used by context.workingctx.match in order to | |
|
710 | # detect files in subrepos. | |
|
711 | return pathutil.pathauditor(self.root, callback=self._checknested) | |
|
712 | ||
|
713 | @property | |
|
714 | def nofsauditor(self): | |
|
715 | # This is only used by context.basectx.match in order to detect | |
|
716 | # files in subrepos. | |
|
717 | return pathutil.pathauditor(self.root, callback=self._checknested, | |
|
718 | realfs=False, cached=True) | |
|
719 | ||
|
712 | 720 | def _checknested(self, path): |
|
713 | 721 | """Determine if path is a legal nested repository.""" |
|
714 | 722 | if not path.startswith(self.root): |
General Comments 0
You need to be logged in to leave comments.
Login now