A Scalable, User-Friendly Source Control System.
Go to file
Jun Wu 3e73af0a9a util: add a function to get absolute path without resolving symlinks
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
2019-08-21 17:59:50 -07:00
contrib changelog: get access to config options 2019-08-15 12:47:35 -07:00
distutils_rust entrypoint: introduce buck-buildable hg.rust 2019-06-17 11:34:08 -07:00
doc doc: remove unused doc build step 2019-05-14 15:09:42 -07:00
edenscm eden: remove 'prefetch' method from HgServer 2019-08-21 16:39:07 -07:00
edenscmnative setup: move native extensions to edenscmnative 2019-06-19 17:55:49 -07:00
exec clidispatch: rework error handling 2019-08-21 12:59:28 -07:00
i18n ui: add labelled prefixes to ui.write 2019-05-09 06:55:11 -07:00
lib util: add a function to get absolute path without resolving symlinks 2019-08-21 17:59:50 -07:00
newdoc cliparser: remove FlagDefinition 2019-08-08 22:54:05 -07:00
slides slides: recompile with newer tex toolchain 2019-04-18 13:50:03 -07:00
tests clidispatch: rework error handling 2019-08-21 12:59:28 -07:00
.editorconfig move scm/hg/.clang-format to scm/hg/mercurial/ 2018-05-25 14:35:51 -07:00
.flake8 codemod: join the auto-formatter party 2018-05-25 22:17:29 -07:00
.gitignore setup: move native extensions to edenscmnative 2019-06-19 17:55:49 -07:00
.hgsigs Added signature for changeset f51ae48a3fd9 2017-12-01 13:49:47 -06:00
.jshintrc hgweb: add .jshintrc with some basic rules 2017-11-22 22:18:06 +08:00
CONTRIBUTING contributing: add new file with a pointer to the wiki 2016-10-08 10:39:00 -04:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
gen_version.py generate __version__.py during the buck build 2018-06-25 15:52:25 -07:00
hgeditor spelling: trivial spell checking 2015-10-17 00:58:46 +02:00
hgweb.cgi codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
Makefile windows: switch to the new Python runtime 2019-06-24 08:34:23 -07:00
README.rst doc: rename README to README.rst 2017-09-26 08:37:17 +02:00
setup.py cstore: remove py-cdatapack 2019-07-26 10:35:46 -07:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.