1507: Windows: msysgit can not be used through git.cmd

tek****@gmai***** (Google Code) (Is this you? Claim this profile.)
Sept. 6, 2011
> What version are you running?

rbtools 0.2 rc1


> Describe the enhancement and the motivation for it.

I am using msysgit indirectly from a standard msys installation. I can not 
use git.exe directly, so it's not on my path, but git.cmd is.
This batch makes possible to use batch files.

> What operating system are you using? What browser?

Windows Vista

> Please provide any additional information below.

Tried to submit a patch for review, but failed.
It's on github: 
http://github.com/teki/rbtools/commit/4f3df55257399703d69260e4bdfba5ae238b0
09c
(attached it too)
diff --git a/rbtools/postreview.py b/rbtools/postreview.py
--- a/rbtools/postreview.py
+++ b/rbtools/postreview.py
@@ -2311,7 +2311,14 @@ def check_install(command):
     instance, 'svn help' or 'git --version').
     """
     try:
-        p = subprocess.Popen(command.split(' '),
+        if sys.platform.startswith('win'):
+            cmd = ["cmd","/c"] + command.split(' ')
+            p = subprocess.Popen(cmd,
+                             stdin=subprocess.PIPE,
+                             stdout=subprocess.PIPE,
+                             stderr=subprocess.PIPE)
+        else:
+            p = subprocess.Popen(command.split(' '),
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
@@ -2339,7 +2346,8 @@ def execute(command, env=None, split_lines=False, ignore_errors=False,
     env['LANGUAGE'] = 'en_US.UTF-8'
 
     if sys.platform.startswith('win'):
-        p = subpro
david
#1 david
  • +Component-RBTools
david
#2 david
This needs to be posted on http://reviews.reviewboard.org/, and I would really, really like to understand what testing you've done, in order to avoid regressions in other SCM methods.
  • +NeedInfo
#3 tek****@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi, 

that was long time ago. I am not using msysgit anymore (it has an aging svn) and postreview works well under cygwin.

According to the python Popen docs the patch is not needed, not sure why did I have this problem.

It's ok to me to close this bug.
david
#4 david
  • -NeedInfo
    +WontFix