Show More
@@ -367,6 +367,9 b' def overridewalk(orig, self, match, subr' | |||||
367 | fexists = entry['exists'] |
|
367 | fexists = entry['exists'] | |
368 | kind = getkind(fmode) |
|
368 | kind = getkind(fmode) | |
369 |
|
369 | |||
|
370 | if '/.hg/' in fname or fname.endswith('/.hg'): | |||
|
371 | return bail('nested-repo-detected') | |||
|
372 | ||||
370 | if not fexists: |
|
373 | if not fexists: | |
371 | # if marked as deleted and we don't already have a change |
|
374 | # if marked as deleted and we don't already have a change | |
372 | # record, mark it as deleted. If we already have an entry |
|
375 | # record, mark it as deleted. If we already have an entry | |
@@ -740,6 +743,14 b' def wrapupdate(orig, repo, node, branchm' | |||||
740 | repo, node, branchmerge, force, ancestor, mergeancestor, |
|
743 | repo, node, branchmerge, force, ancestor, mergeancestor, | |
741 | labels, matcher, **kwargs) |
|
744 | labels, matcher, **kwargs) | |
742 |
|
745 | |||
|
746 | def repo_has_depth_one_nested_repo(repo): | |||
|
747 | for f in repo.wvfs.listdir(): | |||
|
748 | if os.path.isdir(os.path.join(repo.root, f, '.hg')): | |||
|
749 | msg = 'fsmonitor: sub-repository %r detected, fsmonitor disabled\n' | |||
|
750 | repo.ui.debug(msg % f) | |||
|
751 | return True | |||
|
752 | return False | |||
|
753 | ||||
743 | def reposetup(ui, repo): |
|
754 | def reposetup(ui, repo): | |
744 | # We don't work with largefiles or inotify |
|
755 | # We don't work with largefiles or inotify | |
745 | exts = extensions.enabled() |
|
756 | exts = extensions.enabled() | |
@@ -757,6 +768,9 b' def reposetup(ui, repo):' | |||||
757 | if repo.wvfs.exists('.hgsubstate') or repo.wvfs.exists('.hgsub'): |
|
768 | if repo.wvfs.exists('.hgsubstate') or repo.wvfs.exists('.hgsub'): | |
758 | return |
|
769 | return | |
759 |
|
770 | |||
|
771 | if repo_has_depth_one_nested_repo(repo): | |||
|
772 | return | |||
|
773 | ||||
760 | fsmonitorstate = state.state(repo) |
|
774 | fsmonitorstate = state.state(repo) | |
761 | if fsmonitorstate.mode == 'off': |
|
775 | if fsmonitorstate.mode == 'off': | |
762 | return |
|
776 | return |
General Comments 0
You need to be logged in to leave comments.
Login now