mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
do not create the README_EDEN.txt file on Windows
Summary: Do not put a `README_EDEN.txt` file in the checkout root on Windows. On Linux & Mac the EdenFS mount hides this directory, so the README file is not visible while the checkout is mounted and running normally. However on Windows anything present in this directory is visible to the user, so this results in `README_EDEN.txt` incorrectly showing up in the checkout root. Reviewed By: genevievehelsel Differential Revision: D20929408 fbshipit-source-id: 9994524041f22fd8922c531f0185186b04c54821
This commit is contained in:
parent
91e13e2c10
commit
a3d4ae3d40
@ -514,9 +514,16 @@ Do you want to run `eden mount %s` instead?"""
|
||||
if len(os.listdir(path)) > 0:
|
||||
raise OSError(errno.ENOTEMPTY, os.strerror(errno.ENOTEMPTY), path)
|
||||
|
||||
# Populate the directory with a file containing instructions about how to get
|
||||
# Eden to remount the checkout. If Eden is not running or does not have this
|
||||
# checkout mounted users will see this file.
|
||||
# On non-Windows platforms, put a README file in the mount point directory.
|
||||
# This will be visible to users when the EdenFS checkout is not mounted,
|
||||
# and will contain instructions for how to get the checkout re-mounted.
|
||||
#
|
||||
# On Windows anything we put in this directory will be visible in the checkout
|
||||
# itself, so we don't want to put a README file here.
|
||||
if sys.platform != "win32":
|
||||
self._create_checkout_readme_file(path)
|
||||
|
||||
def _create_checkout_readme_file(self, path: str) -> None:
|
||||
help_path = Path(path) / NOT_MOUNTED_README_PATH
|
||||
site_readme_path = self._etc_eden_dir / NOT_MOUNTED_SITE_SPECIFIC_README_PATH
|
||||
help_contents: Optional[str] = NOT_MOUNTED_DEFAULT_TEXT
|
||||
|
Loading…
Reference in New Issue
Block a user