Allow post-review to work against msysgit
Allow post-review to work against msysgit

Allow post-review to work against msysgit

When trying to post a review from a git repository on Windows using
msysgit, post-review will not pick up git because msysgit installs a
'git.cmd' into the user's PATH. But post-review uses subprocess.Popen to
launch commands, which on Windows delegates to CreateProcess, which does
not automatically append .cmd extensions, only .exe (see MSDN for an
explanation of this behavior.) However, CreateProcess will resolve
things in the PATH, though, so subprocess.Popen('git.cmd', ...) does
work.

The fix is to try running 'git.cmd' explicitly, only on Windows.

Testing done: Still works with msysgit and Cygwin Git.
Fixes bug 1917
Reviewed at http://reviews.reviewboard.org/r/2226/

halvorlu/rbtools,haosdent/rbtools,beol/rbtools,Khan/rbtools,halvorlu/rbtools,datjwu/rbtools,datjwu/rbtools,davidt/rbtools,reviewboard/rbtools,bcelary/rbtools,clach04/rbtools_0.4.1,reviewboard/rbtools,Khan/rbtools,clach04/rbtools,beol/rbtools,haosdent/rbtools,davidt/rbtools,clach04/old_rbtools_0.3.2,datjwu/rbtools,haosdent/rbtools,davidt/rbtools,halvorlu/rbtools,1tush/rbtools,beol/rbtools,reviewboard/rbtools