cleanup: remove unused imports

detected by pyflakes
contrib: delete setup3k in favor of setup --c2to3

setup3k was merged into setup in 7a7a1c594d. Now finally get rid of it.
tests: do not print hgrc in test

This lets test-rebase-cache.t pass also when --inotify or --extra-config-opt is
specified.
dummyssh: fix check-code nit
tests: check-code more python files without py extension

files found by running
  $ hg manifest | grep -v "\." | xargs file | grep python
changegroup: fix fastpath during commit

Change 627cd7842e5d dropped the 'revset' variable which kept track of
which changesets were being bundled. Instead, it used "not in
commonset" to decide which changesets were outgoing.. which ran into
trouble when a commit was in progress.
revlog: add exception when linkrev == nullrev

When we deployed the latest crew mercurial to our users, a few of them
had issues where a filelog would have an entry with a -1 linkrev. This
caused operations like rebase and amend to create a bundle containing the
entire repository, which took a long time.

I don't know what the issue is, but adding this check should prevent repos
from getting in this state, and should help us pinpoint the issue next time
it happens.
revlog: add exception when linkrev == nullrev

When we deployed the latest crew mercurial to our users, a few of them
had issues where a filelog would have an entry with a -1 linkrev. This
caused operations like rebase and amend to create a bundle containing the
entire repository, which took a long time.

I don't know what the issue is, but adding this check should prevent repos
from getting in this state, and should help us pinpoint the issue next time
it happens.
parents: change parents command to use filectx

Changes the parents command to use filectx to look up the change node
instead of doing it manually.  This allows extensions to modify the
file-to-commit relationship behind the filectx api.
merge with stable
Merge with main.
templater: add strip function with chars as an extra argument

This allows specifying characters to strip, like the Python strip function.
bundle: move file chunk generation to it's own function

Moves the file chunk generation part of bundle creation to it's own function.
This allows extensions to customize the filelog part of bundle generation.
tests: simplify and document the sorting of pyflake messages

The pyflake messages are simply ordered by message type, path, line no (and
message text).
The message type is taken from the order of the filters.

The previous ordering looks complicated and illogically.
It was the following order (r'\3:\5:\4:\1:\2:' + line):
  message (\3 and \5)
  var name (\4)
  path (\1)
  line no (\2)
  line reference
Ordering by var name before path looks illogically for me.
merge with crew
merge with stable
Merge with stable.
tests: run pyflakes on files from manifest which could be python files

Skip a binary file because pyflakes 0.4.0 aborts on it.
cleanup: drop unused variables and an unused import
summary: remove passing of rev because summary does not have this

The command summary does not have a rev argument, so passing this results
is None always. Therefore pass None explicitly.