• 
      

    Allow post-review to work against msysgit

    Review Request #2226 — Created March 30, 2011 and submitted — Latest diff uploaded

    Information

    RBTools
    master

    Reviewers

    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.
    Still works with msysgit and Cygwin Git.