From 81e5df133626b5b5c47b43558ba94b4c09154831 Mon Sep 17 00:00:00 2001 From: Saul Gutierrez Date: Tue, 19 Dec 2023 18:09:50 -0800 Subject: [PATCH] config: prevent requires from the backing repo to affect symlinks and FilteredFS Summary: If a new repo was to be cloned with symlinks disabled on Windows, this would make the repo have a wrong config for symlinks. In order for symlinks to be enabled for a working copy, they have to be enabled both in the EdenFS config for that checkout as well as having them inabled in hg by having `windowssymlinks` in `.hg/requires`. Having symlinks enabled **in only one of the two** can cause really wonky behavior. Some users were reporting having issues with symlinks being partially enabled on their working copies. This was caused by the backing repo having `windowssymlinks` enabled on the backing repo, since the requires is copied from there into the newly cloned repo. This diff makes changes to that, preventing copying the requires file into a new one for both symlinks and FilteredFS, since both can be affected by this kind of behavior. Reviewed By: MichaelCuevas Differential Revision: D52311410 fbshipit-source-id: bca76757f1b9b6f2cafd4e024b8eafc0735e7e89 --- eden/fs/cli/hg_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eden/fs/cli/hg_util.py b/eden/fs/cli/hg_util.py index ff185b8f69..1db22f2e42 100644 --- a/eden/fs/cli/hg_util.py +++ b/eden/fs/cli/hg_util.py @@ -120,6 +120,8 @@ def get_requires_data(checkout: EdenCheckout) -> str: # the backing repository's dirstate. requires.discard("sqldirstate") requires.discard("treedirstate") + requires.discard("windowssymlinks") + requires.discard("edensparse") if checkout.get_config().enable_windows_symlinks: requires.add("windowssymlinks")