Raphaël Gomès <rgomes@octobus.net> [Wed, 03 Mar 2021 12:33:24 +0100] rev 46636
requirements: also add a dotencode constant
Continue the cleanup to the remaining requirements
Differential Revision: https://phab.mercurial-scm.org/D10107
Raphaël Gomès <rgomes@octobus.net> [Tue, 02 Mar 2021 18:51:18 +0100] rev 46635
pure-parsers: document index class constants
This also adds the big endian prefix `>` to make the constants truly
platform-independent, even if no issue with this has been reported in the wild.
Differential Revision: https://phab.mercurial-scm.org/D10104
Martin von Zweigbergk <martinvonz@google.com> [Thu, 04 Mar 2021 16:06:55 -0800] rev 46634
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