sapling/eden
Muir Manders d24a45984d clone: escape slashes in repo name
Summary:
Canonical repo names can/will have slashes in them. We shouldn't convert slashes to directories on disk; just a bad idea.

When choosing the clone destination, use the basename. It could make sense to clone "foo/bar" into "foo_bar" instead of just "bar", but let's maintain the existing/expected behavior for now.

For internal uses, we percent encode the reponame. For example, the hgcache directory for "foo/bar" will be "foo%2Fbar". This is to minimize chance of collision. If we named the cache dir "foo_bar", that would collide unpleasantly with a repo named "foo_bar".

I relaxed reponame inference a bit to allow slashes in URLs like "test:foo/bar". This was purely so I could test with a reponame containing slashes.

A better long term approach is to use the hash of a canonicalized URL, but that is a bigger change.

Reviewed By: quark-zju

Differential Revision: D44857514

fbshipit-source-id: 4fa0b83a0660b81e89fc96b50ecbeb93869dd2b2
2023-04-13 18:37:07 -07:00
..
fs add a tail option to eden debug log 2023-04-13 17:01:22 -07:00
integration integration: enable hg.debug_clear_local_caches_test on Windows 2023-04-13 08:52:40 -07:00
locale
mononoke clone: escape slashes in repo name 2023-04-13 18:37:07 -07:00
scm clone: escape slashes in repo name 2023-04-13 18:37:07 -07:00
test_support Enable StartFakeEdenFSTest 2023-03-14 13:25:16 -07:00
test-data test-data: remove snapshot 20190313 2022-02-04 13:50:48 -08:00
testlib ui: don't default username to <user>@<fqdn> 2023-03-02 22:10:45 -08:00
.clang-tidy clang-tidy: disable facebook-hte-ContextDependentStaticInit 2022-11-04 15:33:50 -07:00
.gitignore
.mononoke_test_file test push 2022-01-06 05:57:35 -08:00
Eden.project.toml