##// END OF EJS Templates
copies: choose target directory based on longest match...
copies: choose target directory based on longest match If one side of a merge renames `dir1/` to `dir2/` and the subdirectory `dir1/subdir1/` to `dir2/subdir2/`, and the other side of the merge adds a file in `dir1/subdir1/`, we should clearly move that into `dir2/subdir2/`. We already detect the directories correctly before this patch, but we iterate over them in arbitrary order. That results in the new file sometimes ending up in `dir2/subdir1/` instead. This patch fixes it by iterating over the source directories by visiting subdirectories first. That's achieved by simply iterating over them in reverse lexicographical order. Without the fix, the test case still passes on Python 2 but fails on Python 3. It depends on the iteration order of the dict. I did not look into how it's built up and why it behaved differently before the fix. I could probably have gotten it to fail on Python 2 as well by choosing different directory names. Differential Revision: https://phab.mercurial-scm.org/D10115
Martin von Zweigbergk -
r47379:ad30b29b default
Show More
Name Size Modified Last Commit Author
contrib
doc
hgdemandimport
hgext
hgext3rd
i18n
mercurial
relnotes
rust
tests
.arcconfig Loading ...
.clang-format Loading ...
.editorconfig Loading ...
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
.jshintrc Loading ...
CONTRIBUTING Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README.rst Loading ...
black.toml Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
rustfmt.toml Loading ...
setup.py Loading ...

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.