mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
don't stat the existing directory before mounting
Summary:
I can't easily reproduce the failure case, but D39900481 (29d29e0f14
) caused early
stats() during doctor and mount that don't handle the case that a
broken EdenFS mount underlies where want to place a new one.
We don't care about sniffing the .hg directory, so lazily search for
it.
Reviewed By: muirdm
Differential Revision: D40530670
fbshipit-source-id: 0b10eb0778575f1e69a998d3fcb84866dd383229
This commit is contained in:
parent
79b143db02
commit
b3d807c4df
@ -10,6 +10,7 @@ import binascii
|
||||
import collections
|
||||
import datetime
|
||||
import errno
|
||||
import functools
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
@ -1106,9 +1107,7 @@ class EdenCheckout:
|
||||
def __init__(self, instance: EdenInstance, path: Path, state_dir: Path) -> None:
|
||||
self.instance = instance
|
||||
self.path = path
|
||||
from . import hg_util
|
||||
|
||||
self.hg_dot_path: Path = path / hg_util.sniff_dot_dir(path)
|
||||
self.state_dir = state_dir
|
||||
self._config: Optional[CheckoutConfig] = None
|
||||
|
||||
@ -1224,6 +1223,12 @@ class EdenCheckout:
|
||||
# Update our local config cache
|
||||
self._config = checkout_config
|
||||
|
||||
@functools.cached_property
|
||||
def hg_dot_path(self) -> Path:
|
||||
from . import hg_util
|
||||
|
||||
return self.path / hg_util.sniff_dot_dir(self.path)
|
||||
|
||||
def _config_path(self) -> Path:
|
||||
return self.state_dir / MOUNT_CONFIG
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user