Opened 9 years ago

Closed 9 years ago

On Win32 environment gitplugin cannot execute git.

Reported by: Owned by: jangsuwon@… Herbert Valerio Riedel high GitPlugin major thdz.x@… 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.

comment:1 Changed 9 years ago by anonymous

Trac Release: 0.10 → 0.11

comment:3 Changed 9 years ago by Marcus Lindblom

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.

comment:4 Changed 9 years ago by rctay89@…

Severity: major → blocker

this isn't platform-dependent, it's a syntax error in python that affects all platforms.

to fix,

        return os.popen3(" ".join(cmd)) # (input, output, error)


fixes #3512

comment:5 Changed 9 years ago by Tim Hatch

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 9 years ago by Brent Longborough

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 9 years ago by Brent Longborough

Copied from #4227 -- really sorry for my incompetence...

comment:7 Changed 9 years ago by Brent Longborough

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 9 years ago by Herbert Valerio Riedel

Resolution: → worksforme new → closed

should be fixed in current 0.11 branch, please test and confirm

Modify Ticket

Change Properties