mergestate: rename addpath() -> addpathonflict() to prevent confusion
addpath() seems to imply that we are adding a new path/entry to the mergestate.
Differential Revision: https://phab.mercurial-scm.org/D8715
windows: don’t set `softspace` attribute in `winstdout`
Python 2 file objects have the `softspace` attribute
(https://docs.python.org/2/library/stdtypes.html#file.softspace), which is used
by the print statement to track its internal state. The documentation demands
from file-like objects only that the attribute is writable and initialized to
0. Method `file.write()` sets it to 0, but this is not documented.
Historically, sys.stdout was replaced by an instance of the `winstdout` class,
so it needed to behave exactly the same (the softspace fix was introduced in
705278e70457). Nowadays we don’t replace sys.stdout and don’t use the print
statement on `winstdout` instances, so we can safely drop it.
windows: handle file-like objects without isatty() method
Copying the function is not nice, but moving around stuff to avoid the
circular import didn’t seem to be worth the effort.
exchange: check actually missing revs for obsolete / unstable revs (
issue6372)
The previous code was using `outgoing.ancestorsof`, which was originally called
`outgoing.missingheads` although not containing the missing heads. This
confusion was probably the reason why the buggy code was written.
The actually outgoing changesets are stored in `outgoing.missing`. By checking
all outgoing changesets, we avoid the problem and can show the list of all
obsolete or unstable changesets, which is more helpful for the user.
tests: test that push doesn’t complain about unstable changesets if no changes
When there’re no outgoing changes, push doesn’t complain about unstable
changesets.
There is currently a bug (see
issue6372) that causes that there is an abort on
push when the outgoing changes contain another changeset even if that is not
obsolete or unstable. A test case and fix for that is sent in the next patch.
diff: move no-eol text constant to a common location
Differential Revision: https://phab.mercurial-scm.org/D8763