Modify

Opened 16 years ago

Closed 15 years ago

#3512 closed defect (worksforme)

On Win32 environment gitplugin cannot execute git.

Reported by: jangsuwon@… 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)

PyGIT_popen3_syntax_fix.patch (513 bytes) - added by rctay89@… 15 years ago.
fixes #3512
PyGIT_popen3_as_subprocess.patch (1.1 KB) - added by Brent Longborough 15 years ago.
Copied from #4227 -- really sorry for my incompetence…

Download all attachments as: .zip

Change History (10)

comment:1 Changed 16 years ago by anonymous

Trac Release: 0.100.11

comment:2 Changed 16 years ago by anonymous

Cc: thdz.x@… added; anonymous removed

comment:3 Changed 16 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 15 years ago by rctay89@…

Severity: majorblocker

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)

Changed 15 years ago by rctay89@…

fixes #3512

comment:5 Changed 15 years ago by Tim Hatch

Severity: blockermajor

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

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

comment:7 Changed 15 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 15 years ago by Herbert Valerio Riedel

Resolution: worksforme
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.