mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
make eden doctor detect nested checkouts
Summary: eden doctor should detect when a user has nested checkouts and warn them that it could cause issues. No action should be taken at this time because the nested checkouts could be intentional. In the future, we may attempt to fix the issue for the user. Reviewed By: chadaustin Differential Revision: D32517950 fbshipit-source-id: 15c0e60149d0513a8bee72adc254b0fae369edfe
This commit is contained in:
parent
f84ca470b0
commit
9b17531f63
@ -457,6 +457,19 @@ def check_mount(
|
||||
"unknown state {checkout.state}"
|
||||
)
|
||||
)
|
||||
# Check if this checkout is nested inside another one
|
||||
existing_checkout, rel_path = config_mod.detect_nested_checkout(
|
||||
checkout.path,
|
||||
instance,
|
||||
)
|
||||
if existing_checkout is not None and rel_path is not None:
|
||||
tracker.add_problem(
|
||||
Problem(
|
||||
f"""\
|
||||
edenfs reports that checkout {checkout.path} is nested within an existing checkout {existing_checkout.path}
|
||||
Nested checkouts are usually not intended and can cause spurious behavior.\n"""
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def check_mount_overlay_type(
|
||||
|
Loading…
Reference in New Issue
Block a user