sapling/eden/fs/cli
Xavier Deguillard 97cdd3a4d1 escape repository path
Summary:
On Windows, paths components are usually separated by '\', and since the
repository path is stored in a toml file, whatever character is after a '\',
will be escaped. In my case, this is followed by U (for C:\Users), and thus
toml expects the next characters to be an escaped unicode. That's obviously
not the case and thus EdenFS fails to parse the config, preventing me from
cloning fbsource.

Since Windows is perfectly fine with '/' as path separator, let's just
replace '\' with '/'.

The underlying bug appears to be in the toml Python code: https://github.com/uiri/toml/issues/280

Manually trying some random path is pretty conclusive:
  (Pdb) toml.dumps({'foo': 'c:\\Users\\wez'})
  'foo = "c:\\\\Users\\\\wez"\n'
  (Pdb) toml.dumps({'foo': 'c:\\Users\\xavier'})
  'foo = "c:\\Users\\xavier"\n'

Reviewed By: chadaustin

Differential Revision: D21143545

fbshipit-source-id: 448471da12c253dd37680f6a28251a1e69850920
2020-04-20 21:05:20 -07:00
..
doctor add a --current-edenfs-only flag to edenfsctl doctor 2020-04-10 13:48:11 -07:00
test remove support for repo configs from edenfsctl clone 2020-04-10 13:57:52 -07:00
__init__.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
buck.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
CMakeLists.txt Move eden.cli namespace to eden.fs.cli 2020-03-25 11:46:56 -07:00
cmd_util.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
config.py escape repository path 2020-04-20 21:05:20 -07:00
configinterpolator.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
configutil.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
daemon_util.py update Python platform checks to use sys.platform 2020-04-03 16:52:32 -07:00
daemon.py split edenfsctl start into foreground vs service logic 2020-04-15 15:46:25 -07:00
debug_posix.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
debug.py delete the old eden debug set_log_level command 2020-04-06 18:53:00 -07:00
filesystem.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
fsck.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
hg_util.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
logfile.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
main.py ensure a process is running after a failed graceful restart 2020-04-20 15:47:52 -07:00
mtab.py Move eden.cli namespace to eden.fs.cli 2020-03-25 11:46:56 -07:00
overlay.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
proc_utils_win.py get edenfsctl stop working on Windows 2020-04-15 15:46:25 -07:00
proc_utils.py get edenfsctl stop working on Windows 2020-04-15 15:46:25 -07:00
rage.py list redirections in eden rage 2020-04-15 14:25:11 -07:00
redirect.py list redirections in eden rage 2020-04-15 14:25:11 -07:00
stats_print.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
stats.py Move eden.cli namespace to eden.fs.cli 2020-03-25 11:46:56 -07:00
subcmd.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
systemd_service.py move systemd-related start code to its own module 2020-04-15 15:46:24 -07:00
systemd.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
tabulate.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
telemetry.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
top.py Explicitly track current/pending imports -- display current metrics in eden top 2020-04-09 12:35:23 -07:00
trace_cmd.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
trace.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
ui.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
util.py ensure a process is running after a failed graceful restart 2020-04-20 15:47:52 -07:00
version.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
win_ui.py Move cli/ directory from eden/ to eden/fs (Without changing namespace) 2020-03-25 11:18:30 -07:00
winproc.py split edenfsctl start into foreground vs service logic 2020-04-15 15:46:25 -07:00