dalehenrich / filetree

Monticello repository for directory-based Monticello packages enabling the use of git, svn, etc. for managing Smalltalk source code.
https://github.com/CampSmalltalk/Cypress
MIT License
133 stars 26 forks source link

GitFileTree Windows support #157

Closed ThierryGoubier closed 9 years ago

ThierryGoubier commented 9 years ago

The code using ProcessWrapper is incorrect

nicolaihess commented 9 years ago
  1. MCFileTreeGitRepository class >>#gitCommand on windows, "/usr/bin/git" as git command does not work. Either we use only "git" and hope the git executable path is in the PATH-envvar or we use some setting entry, storing the platform dependent executable path.
  2. MCFileTreeGitRepository class >>#runProcessWrapperGitCommand: anArrayOfStrings in: aDirectory

The creation of the ProcessWrapper command misses a #yourself .. | command | command := pW new useStdout; useStderr; startWithCommand:( self gitCommand , ' -C "' , (MCFileTreeFileUtils current directoryPathString: aDirectory) , '" ' , aCommandString); yourself. ...

  1. The image may crash if we call upToEndo or exitCode before the command finished. -> add command waitForExit. prior to calling command upToEnd.

and maybe we should make this more fail-safe:

command waitForExit. command isRunning ifTrue:[ " throw some meaningful exception "]. r := command upToEnd. command exitCode > 0 ......

ThierryGoubier commented 9 years ago

Corrections are in 90551bb; I've left an assert on the isRunning check, since the exception isn't meaningfull (in short, ProcessWrapper uses should never trigger that).

My bad, I forgot to correct the default git path attempt... will create another issue (#158) for that.

ThierryGoubier commented 9 years ago

Still some issues about the very simple way of supporting ssh-agent on Windows. Will add an issue about that and close this one.