evolution: stop wrongly flagging unrelated part of a split as divergent
Before this change, divergence introduced by successors of a split would "spill"
to other unrelated successors of the split that were not ambiguous.
This small changes fixes it.
Thanks goes to Manuel Jacobs for the discussion leading to this realization that
a new simple and correct definition could be found.
tests: skip doctests that use `time.tzset()` on Windows
There's no way to conditionally skip the tests for a function (see the inline
feature request). That leaves us with the choice to either put the whole
`mercurial.utils.dateutil` module in the skip list of this script (but then this
script prints out the module as unexpectedly not tested, and misses a bunch of
tests that can be run), blacklist the test entirely (but that makes it harder to
work with on Windows), or use this hack to look for the statement that is
broken, and skip the test currently attached to one function.
(It appears that an example in the list of examples corresponds to a single
`>>>` block, and the `test` itself corresponds to a single function. So prescan
the examples, and skip all of them when the statement is found in any, since the
setup of setting the timezone has an effect on subsequent examples.)
tests: hopefully fix `test-doctest.py` on Windows and more
1. Shell syntax understood by `shell=True` depends on the platform.
Instead, pass `shell=False` and call `sh` explicitly to interpret
the command correctly.
2. Stop setting `HGRCPATH=/dev/null`, so the setting
`experimental.evolution=createmarkers` is set correctly.
The reason I set HGRCPATH to /dev/null previously is because of
misunderstanding where I thought the Python script had no HGRC to edit.
As it turns out, there is in fact a valid temporary HGRC pointed to by
HGRCPATH in this context so we don't seem to need this. /shrug
hghave: make the description for "clang-format" ascii
test-fix-clang-format.t suddenly started failing on Windows by wiping the whole
file content, and replacing with an error:
$TESTTMP.sh: $TESTTMP.sh: cannot execute binary file
Odd, because I don't have `clang-format` installed, so the test should be
skipped. The problem started with
73cf8b56c2f5, and I noticed that running
`hghave` manually resulted in a `SyntaxError` (so I can't see how this isn't
broken everywhere, but maybe it's because I'm using py3.9 on Windows):
$ py hghave --list
Traceback (most recent call last):
File "hghave", line 8, in <module>
import hghave
File "c:\Users\Matt\hg\tests\hghave.py", line 627
SyntaxError: Non-ASCII character '\xe2' in file c:\Users\Matt\hg\tests\hghave.py on line 627, but no encoding declared;
see http://python.org/dev/peps/pep-0263/ for details
branching: merge stable into default
Hopefully this will bring the last changes necessary to make the 3.13 tests
green (on Linux).