SourceCodeManagerUtilities.st
changeset 3818 25607a4f1e98
parent 3814 466fa886aa65
child 3838 474d8ec95b33
child 3847 94661e33541c
equal deleted inserted replaced
3817:fce0d1006c04 3818:25607a4f1e98
  1365     self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:nil
  1365     self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:nil
  1366 
  1366 
  1367     "Modified: / 21-12-2011 / 18:24:47 / cg"
  1367     "Modified: / 21-12-2011 / 18:24:47 / cg"
  1368 !
  1368 !
  1369 
  1369 
  1370 checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil
  1370 checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil
  1371     "check a bunch of classes into the source repository.
  1371     "check a bunch of classes into the source repository.
  1372      If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
  1372      If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
  1373 
  1373 
  1374     |classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses|
  1374     |classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses|
  1375 
  1375 
  1376     "/ ignore private classes
  1376     "/ ignore private classes
  1377     classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil].
  1377     classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil].
  1384         self information:'Only unloaded classes given - nothing checked in.'.
  1384         self information:'Only unloaded classes given - nothing checked in.'.
  1385         ^ self
  1385         ^ self
  1386     ].
  1386     ].
  1387 
  1387 
  1388     classes size == 1 ifTrue:[
  1388     classes size == 1 ifTrue:[
  1389         ^ self checkinClass:classes first withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil.
  1389         ^ self checkinClass:classes first withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil.
  1390     ].
  1390     ].
  1391 
  1391 
  1392     "ask once, for all classes"
  1392     "ask once, for all classes"
  1393     aLogInfoOrStringNil isNil ifTrue:[
  1393     aLogInfoOrStringOrNil isNil ifTrue:[
  1394         checkinInfoOrString := self 
  1394         checkinInfoOrString := self 
  1395                         getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size)
  1395                         getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size)
  1396                         initialAnswer:nil
  1396                         initialAnswer:nil
  1397                         withQuickOption:true.
  1397                         withQuickOption:true.
  1398         checkinInfoOrString isNil ifTrue:[^ self].
  1398         checkinInfoOrString isNil ifTrue:[^ self].
  1399     ] ifFalse:[
  1399     ] ifFalse:[
  1400         checkinInfoOrString := aLogInfoOrStringNil.
  1400         checkinInfoOrString := aLogInfoOrStringOrNil.
  1401     ].
  1401     ].
  1402 
  1402 
  1403     allClasses := classes.    
  1403     allClasses := classes.    
  1404     checkinInfoOrString quickCheckIn ifTrue:[
  1404     (checkinInfoOrString isString not and:[checkinInfoOrString quickCheckIn]) ifTrue:[
  1405         "/ not only the one's in the changeSet;
  1405         "/ not only the one's in the changeSet;
  1406         "/ also those which have not been checked in before.
  1406         "/ also those which have not been checked in before.
  1407         classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]].
  1407         classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]].
  1408         classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ]
  1408         classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ]
  1409     ].
  1409     ].
  1436                     ].
  1436                     ].
  1437                 ]
  1437                 ]
  1438             ].
  1438             ].
  1439         ].
  1439         ].
  1440 
  1440 
  1441         (checkinInfoOrString isStable or:[checkinInfoOrString tagIt])
  1441         (checkinInfoOrString isString not and:[ (checkinInfoOrString isStable or:[checkinInfoOrString tagIt]) ])
  1442         ifTrue:[
  1442         ifTrue:[
  1443             "/mhmh - but tag should be set on all (even unchanged ones)
  1443             "/mhmh - but tag should be set on all (even unchanged ones)
  1444             "/ the other onces have already been tagged
  1444             "/ the other onces have already been tagged
  1445             unchangedClasses := allClasses reject:[:eachClass | (classes includes:eachClass)].
  1445             unchangedClasses := allClasses reject:[:eachClass | (classes includes:eachClass)].
  1446 
  1446 
  4323 ! !
  4323 ! !
  4324 
  4324 
  4325 !SourceCodeManagerUtilities class methodsFor:'documentation'!
  4325 !SourceCodeManagerUtilities class methodsFor:'documentation'!
  4326 
  4326 
  4327 version
  4327 version
  4328     ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.318 2015-02-28 23:41:31 cg Exp $'
  4328     ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.319 2015-03-01 13:18:10 cg Exp $'
  4329 !
  4329 !
  4330 
  4330 
  4331 version_CVS
  4331 version_CVS
  4332     ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.318 2015-02-28 23:41:31 cg Exp $'
  4332     ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.319 2015-03-01 13:18:10 cg Exp $'
  4333 ! !
  4333 ! !
  4334 
  4334