match: use ctx.getfileset() instead of fileset.getfileset()
Resolves an import cycle involving match and merge.
context: add a getfileset() method so fewer things need fileset directly
Allows me to break an import cycle in a subsequent change.
fix_bytesmod: fix defects in fix_bytesmod so it produces working code
Prior to this change, the fixer did not always add the py3kcompat
import to files, and did not manage to blacklist itself.
discovery: improve "note: unsynced remote changes!" warning
This note (which actually is a warning) frequently caused confusion.
"unsynced" is not a well established user-facing concept in Mercurial and the
message was not very specific or helpful.
Instead, show a messages like:
remote has heads on branch 'default' that are not known locally:
6c0482d977a3
and show it before aborting on "push creates new remote head". This will also
give more of a hint in the case where the branch has been closed remotely and
'hg heads' thus not would show any new heads after pulling.
A similar (but actually very different) message was addressed in
6b618aa08b6e.
tests: on windows, run command explicitly in sh for working command substitution
On windows, os.system runs the command in cmd.exe, which does not know command
substitution. To let this work, run the command explicitly in sh.
This fixes the failure of this test on windows.
tests: test-module-imports.t works on windows (with backslash path sep)
Transform the backslashes to slashes on windows, because they are eaten up by
the shell. (Similar as done in test-check-pyflakes.t.)
This test will not produce a traceback on windows anymore. But the test still
fails because the detected mixed imports differ.