mirror of
https://github.com/facebook/sapling.git
synced 2025-01-08 14:46:47 +03:00
3e73af0a9a
Summary: On Windows, some people use the "map drive" feature to map a long path (ex. `C:\long\path\to\repo`) to a short path (ex. `Z:\`) so their tooling can handle some long paths. In that case, resolving symlinks by `hg root` is undesirable. Unfortunately, the Rust stdlib does not have a Python `os.path.abspath` equivalent. There were some attempts (ex. https://github.com/rust-lang/rust/pull/47363) but the corner cases (ex. symlinks) have made the problem much more complicated. There are some 3rd-party crates. But they are not a good fit: - https://github.com/danreeves/path-clean/ (last commit fb84930) follows the golang plan9 idea. It does not have proper support for Windows paths. - https://github.com/vitiral/path_abs/ (latest commit 8370838) reinvents many path-related types, which is an overkill for this usecase. This diff implements the feature "reasonably" for both Windows and Linux, with nasty corner cases (symlink) ignored. Differential Revision: D16952485 fbshipit-source-id: ba91f4975c2e018362e2530119765a380f103e19 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |