Try changes compared to master branch when using git by default.

If the current branch has no tracking branch, use master as the base revision,
otherwise the branch itself was used and we were left with an empty diff if
there were no uncommitted changes.

Signed-off-by: Vadim Zeitlin <vadim@zeitlins.org>
Give a more understandable message in "try" when there are no changes.

The error message "object of type 'NoneType' has no len()" given in this case
before was particularly cryptic, provide something more intelligible if the
diff turns out to be empty.
Ensure full path to ssh command is used in the try client.

Using just "ssh" doesn't work under Windows where the native CreateProcess()
function used by spawnProcess() requires the full path as its argument, so
using ssh connection method simply always failed before.

Adding a "ssh_command" config option allowing to explicitly specify the
command to use might be a good idea as well, but for now just take the first
"ssh" in PATH.

Signed-off-by: Vadim Zeitlin <vadim@zeitlins.org>
Allow specifying the ssh command to use in "try" subcommand.

This is especially useful under Windows, where something other than ssh[.exe]
is often used (e.g. plink from PuTTY).

Signed-off-by: Vadim Zeitlin <vadim@zeitlins.org>
Use standard shlex.split() for splitting ssh command under POSIX.

This method can't be used under Windows as it handles backslashes specially
while they are just path separators under Windows, but we should still use it
under the other systems to provide familiar semantics there.
Merge pull request #1391 from vadz/try-fixes

Miscellaneous fixes for try subcommand.