mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
163704f80a
Summary: In some cases we are mounting ntfs in a linux host using ntfs.3g and we want to prevent it from writing symlinks that can't be read from Windows. Some background, ntfs.3g supports symlinks, but it produces IntxLNK which cause problems when mounted into a real Windows machine. We don't support symlinks on Windows anyway, so we want to just disable this. Unfortunately it's difficult to detect if we're on a ntfs.3g fuse mount, so instead we're just going to have the machine set up the repo with this extension enabled. Differential Revision: D13964546 fbshipit-source-id: 7545538e51be4c986a50161165d7cc2e64280555
22 lines
442 B
Python
22 lines
442 B
Python
# disablesymlinks.py
|
|
#
|
|
# Copyright 2019 Facebook, Inc.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
"""disables symlink support when enabled"""
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from edenscm.mercurial import posix, util
|
|
|
|
|
|
def checklink(path):
|
|
return False
|
|
|
|
|
|
def uisetup(ui):
|
|
posix.checklink = checklink
|
|
util.checklink = checklink
|