* tramp.el (tramp-error): VEC-OR-PROC can be nil.
(tramp-action-password): Clear password cache if needed.
(tramp-read-passwd): Do not clear password cache.
* tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass only
when `remote-file-name-inhibit-cache' is nil.
(tramp-sh-file-name-handler): Use `tramp-error'.  Simplify code.
* tramp-tests.el (tramp-copy-size-limit): Declare.
(tramp-test10-write-region): Extend for out-of-band copy.
(tramp-test31-asynchronous-requests): New test.
* tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Do not add `nil' to the environment, when there's no remote `locale'.
(tramp-find-inline-encoding): Check, that the remote host has
installed perl, before sending scripts.
* tramp-tests.el (tramp--test-make-temp-name): Optional argument DIR.
(tramp--instrument-test-case): Catch also `quit'.
(tramp-test10-write-region): `tramp-copy-size-limit' can be nil.
(tramp-test11-copy-file, tramp-test12-rename-file): Extend tests.
* tramp.el (tramp-methods): Fix docstring for `tramp-copy-program'.
(tramp-call-process): Trace also DESTINATION.

* tramp-sh.el (tramp-methods, tramp-default-user-alist): Add "nc".
(top): Completion function for "nc" is
`tramp-completion-function-alist-telnet'.
(tramp-do-copy-or-rename-file-out-of-band): Call function if
adviced in `tramp-methods'.  Do not set `default-directory' for
`start-process-shell-command' call, not needed anymore.
(tramp-do-copy-or-rename-file-with-nc, tramp-get-remote-nc): New defuns.
* tramp.texi (Inline methods): Remove restriction on "telnet".
(External methods): Add "nc" method.
* tramp.el (tramp-methods): Add docstring for
`tramp-remote-copy-program' and `tramp-remote-copy-args'.

* tramp-sh.el (tramp-methods) <nc>: Add `tramp-remote-copy-*'.
(tramp-do-copy-or-rename-file-out-of-band): Merge
`tramp-do-copy-or-rename-file-with-nc'.
(tramp-do-copy-or-rename-file-with-nc, tramp-get-remote-nc): Remove.
(tramp-make-copy-program-file-name): Handle also the "nc" case.
* tramp-tests.el (tramp-copy-size-limit): Set to nil.
(tramp--test-make-temp-name): Optional argument LOCAL.
(tramp-test10-write-region): No special test for out-of-band copy
needed anymore.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test21-file-links): Use it.
* tramp-sh.el (tramp-methods) <nc>:  Tune `tramp-remote-copy-*'.
(tramp-do-copy-or-rename-file-out-of-band): Fiddle with the remote
commands.
* tramp.el (tramp-action-out-of-band): Read pending output.

* tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Simplify
assembling of remote command.
* tramp-tests.el (tramp--instrument-test-case): Show messages.
Use timeout.  This might be problematic for `should-error' forms, 'tho.
whitespace fix.
* tramp-sh.el (tramp-methods) <telnet, nc>: Redirect stderr to "/dev/null".
* tramp-tests.el (tramp--instrument-test-case): Revert usage of timeouts.
(tramp-test20-file-modes): More robust check for user "root".
(tramp-test21-file-links): Do not compare directories if
`tramp-test-temporary-file-directory' is a symlink.
* tramp-sh.el (tramp-find-inline-encoding): Do not raise an error.
(tramp-send-command-and-check): Fix docstring.
Tune last patch.
* tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test21-file-links): Extend tests.
* tramp-sh.el (vc-handled-backends, vc-bzr-program)
(vc-git-program, vc-hg-program): Declare.
(tramp-sh-handle-vc-registered): Remove backends where the remote
binary does not exist.
* tramp.el (tramp-methods): Add docstring for `tramp-login-env'
and `tramp-copy-env'.

* tramp-sh.el (tramp-methods) <sudo>: Add `tramp-login-env'.
(tramp-maybe-open-connection): Handle `tramp-login-env'.