CVSSourceCodeManager.st
changeset 4047 29cd13b30fb0
parent 4044 4103a12f0c6d
child 4048 eb9c79242508
equal deleted inserted replaced
4046:1d63073ace00 4047:29cd13b30fb0
   221 initialize
   221 initialize
   222     "check if $CVSROOT (the shell variable) or CVSRoot (the smalltalk global)
   222     "check if $CVSROOT (the shell variable) or CVSRoot (the smalltalk global)
   223      is set, check if cvs commands can be executed and install myself as the
   223      is set, check if cvs commands can be executed and install myself as the
   224      SourceCodeManager if this works out ok"
   224      SourceCodeManager if this works out ok"
   225 
   225 
   226     | s f top cvsCmd |
   226     | s f top |
   227 
   227 
   228     CVSCommandSemaphore := (Semaphore new:10) name:'Concurrent CVS Commands'.    "/ at most 10 cvs activities concurrently
   228     CVSCommandSemaphore isNil ifTrue:[
   229     CVSCommitOptions := ''.
   229         CVSCommandSemaphore := (Semaphore new:10) name:'Concurrent CVS Commands'.    "/ at most 10 cvs activities concurrently
   230     CVSUpdateOptions := ''.
   230     ].
   231     RemoteCVS := true.
   231     CVSCommitOptions isNil ifTrue:[
       
   232         CVSCommitOptions := ''.
       
   233         CVSUpdateOptions := ''.
       
   234     ].
       
   235     RemoteCVS isNil ifTrue:[
       
   236         RemoteCVS := true.
       
   237     ].
   232     DisabledModules := nil.
   238     DisabledModules := nil.
   233     CVSModuleRoots isNil ifTrue:[
   239     CVSModuleRoots isNil ifTrue:[
   234         CVSModuleRoots := Dictionary new.
   240         CVSModuleRoots := Dictionary new.
   235     ].
   241     ].
   236     "/ self possiblyAddExeptsPrivateRepositoryToModuleRoots.
   242     "/ self possiblyAddExeptsPrivateRepositoryToModuleRoots.
   245             "disabled since $CVSROOT is not set"
   251             "disabled since $CVSROOT is not set"
   246             ^ self
   252             ^ self
   247         ].
   253         ].
   248     ].
   254     ].
   249 
   255 
   250     cvsCmd := self cvsExecutable.
       
   251 
       
   252 "/    ok := OperatingSystem canExecuteCommand:cvsCmd.
       
   253 "/    ok ifFalse:[
       
   254 "/        'CVSSourceCodeManager [warning]: disabled because no >>cvs<< command was found' infoPrintCR.
       
   255 "/        ^ self
       
   256 "/    ].
       
   257 
       
   258     UseWorkTree := false.
   256     UseWorkTree := false.
   259 
   257 
   260     "/
   258     "/
   261     "/ check if there is an stx directory there
   259     "/ check if there is an stx directory there
   262     "/
   260     "/
   264     and:[(top := f construct:'stx') isDirectory
   262     and:[(top := f construct:'stx') isDirectory
   265     and:[top isReadable]]) ifTrue:[
   263     and:[top isReadable]]) ifTrue:[
   266         RemoteCVS := false
   264         RemoteCVS := false
   267     ].
   265     ].
   268 
   266 
   269 "/    Smalltalk at:#SourceCodeManager put:self.
       
   270     DefaultManager isNil ifTrue:[
   267     DefaultManager isNil ifTrue:[
   271         DefaultManager := self.    
   268         DefaultManager := self.    
   272     ].
   269     ].
   273 
   270 
   274     ('CVSSourceCodeManager [info]: repository CVSROOT is ''' , CVSRoot , '''.') infoPrintCR.
   271     ('CVSSourceCodeManager [info]: repository CVSROOT is ''' , CVSRoot , '''.') infoPrintCR.