Opened 16 years ago
Closed 16 years ago
#3512 closed defect (worksforme)
On Win32 environment gitplugin cannot execute git.
Reported by: | Owned by: | Herbert Valerio Riedel | |
---|---|---|---|
Priority: | high | Component: | GitPlugin |
Severity: | major | Keywords: | |
Cc: | thdz.x@… | Trac Release: | 0.11 |
Description
On Win32 environment gitplugin cannot execute git.
I tried running trac, git(msysgit) and gitplugin, but it doesn't work. That is because os.popen3() function does not take the parameter as a list. Git in cygwin doesn't have a problem such like this because it is emulation of unix.
So minor platform dependent fix is needed.
Attachments (2)
Change History (10)
comment:1 Changed 16 years ago by
Trac Release: | 0.10 → 0.11 |
---|
comment:2 Changed 16 years ago by
Cc: | thdz.x@… added; anonymous removed |
---|
comment:3 Changed 16 years ago by
comment:4 Changed 16 years ago by
Severity: | major → blocker |
---|
this isn't platform-dependent, it's a syntax error in python that affects all platforms.
source:/gitplugin/0.11/tracext/git/PyGIT.py@HEAD#L45
to fix,
return os.popen3(" ".join(cmd)) # (input, output, error)
comment:5 Changed 16 years ago by
Severity: | blocker → major |
---|
rctay89, your patch works only if there are no spaces. Also os.popen3 does accept a list on unixes. Reducing severity since it's back to a platform issue.
comment:6 Changed 16 years ago by
I have just hacked up this file is a preliminary conversion of PyGIT.py to use subprocess.Popen in place of os.popen3.
I have applied it on my home Trac system (0.12dev) and it appears to be working OK, but I don't have the in-depth knowledge to affirm that it's correct, so by all means criticise it.
I plan to test it on the full git
source tree, but my resync is taking a while, so more later.
Changed 16 years ago by
Attachment: | PyGIT_popen3_as_subprocess.patch added |
---|
Copied from #4227 -- really sorry for my incompetence...
comment:7 Changed 16 years ago by
After I jumped in here with both flat feet, I saw that #4227 has this fix already, and much better than mine. I couldn't delete my attachment, so I've overwritten it with that one.
Please accept my apologies for the noise.
comment:8 Changed 16 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
should be fixed in current 0.11 branch, please test and confirm
The (later?) PyGIT at pypi (http://pypi.python.org/pypi/pygit) uses subprocess, so it might be more compatible. Need to fework git_fs.py though.