--- a/SourceCodeManagerUtilitiesForContainerBasedManagers.st Fri Aug 02 11:02:32 2013 +0200
+++ b/SourceCodeManagerUtilitiesForContainerBasedManagers.st Tue Aug 06 13:29:32 2013 +0200
@@ -36,7 +36,7 @@
!SourceCodeManagerUtilitiesForContainerBasedManagers methodsFor:'utilities-cvs'!
-checkinBuildSupportFilesForPackage:packageID
+checkinBuildSupportFilesForPackage:packageID withInfo:checkinInfo
|anyFailure module directory mgr defClass |
mgr := self sourceCodeManagerFor: packageID.
@@ -74,9 +74,8 @@
handle:[:ex | Transcript showCR:ex description ]
do:[
(mgr isContainerBased
- and:[
- (mgr checkForExistingContainer:realFileName inModule:module directory:realDirectory) not
- ]) ifTrue:[
+ and:[(mgr checkForExistingContainer:realFileName inModule:module directory:realDirectory) not]
+ ) ifTrue:[
realDirectory ~= directory ifTrue:[
(mgr checkForExistingModule:module directory:realDirectory) ifFalse:[
mgr createModule:module directory:realDirectory
@@ -105,12 +104,19 @@
text:fileContents
directory:realDirectory
module:module
- logMessage:'automatically generated by browser'
- force:false)
- ifFalse:[
- Transcript showCR:'checkin of ' , realFileName , ' failed'.
- anyFailure := true.
- ].
+ logMessage:checkinInfo logMessage
+ force:false
+ ) ifTrue:[
+ checkinInfo isStable ifTrue:[
+ self tagPath:(module, '/', realDirectory, '/', realFileName) as:#stable usingManager:mgr.
+ ].
+ checkinInfo tagIt ifTrue:[
+ self tagPath:(module, '/', realDirectory, '/', realFileName) as:checkinInfo tag usingManager:mgr.
+ ].
+ ] ifFalse:[
+ Transcript showCR:'checkin of ' , realFileName , ' failed'.
+ anyFailure := true.
+ ].
].
].
].
@@ -119,7 +125,7 @@
self
checkinClasses:(Array with:defClass)
- withInfo:'automatic checkIn'
+ withInfo:checkinInfo
withCheck:false.
@@ -509,43 +515,46 @@
mgr := self sourceCodeManagerFor: packageToCheckIn.
classesToCheckIn := IdentitySet new.
+ classesInChangeSet := IdentitySet new.
methodsToCheckIn := IdentitySet new.
methodsInOtherPackages := IdentitySet new.
looseMethods := IdentitySet new.
"/ collect classes and individual methods...
- Smalltalk allClassesDo:[:aClass |
- |owner classPackage|
+ (doClasses or:[doExtensions]) ifTrue:[
+ Smalltalk allClassesDo:[:aClass |
+ |owner classPackage|
- (owner := aClass owningClass) notNil ifTrue:[
- classPackage := aClass topOwningClass package
- ] ifFalse:[
- classPackage := aClass package
- ].
- (classPackage = packageToCheckIn) ifTrue:[
- classesToCheckIn add:aClass.
- ].
+ (owner := aClass owningClass) notNil ifTrue:[
+ classPackage := aClass topOwningClass package
+ ] ifFalse:[
+ classPackage := aClass package
+ ].
+ (classPackage = packageToCheckIn) ifTrue:[
+ classesToCheckIn add:aClass.
+ ].
- doExtensions ifTrue:[
- aClass isMeta ifFalse:[
- "/ ... whose class is not in the checkIn-set
- (classesToCheckIn includes:aClass) ifFalse:[
- aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
- "/ methods in this project ...
- (mthd package = packageToCheckIn) ifTrue:[
- methodsToCheckIn add:mthd
+ doExtensions ifTrue:[
+ aClass isMeta ifFalse:[
+ "/ ... whose class is not in the checkIn-set
+ (classesToCheckIn includes:aClass) ifFalse:[
+ aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
+ "/ methods in this project ...
+ (mthd package = packageToCheckIn) ifTrue:[
+ methodsToCheckIn add:mthd
+ ]
]
- ]
+ ].
].
].
].
+
+ "/ cg: O(n^2) algorithm
+ "/ classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges].
+ "/ replaced by: O(n) algorithm
+ classesInChangeSet := ChangeSet current selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn.
].
- "/ cg: O(n^2) algorithm
- "/ classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges].
- "/ replaced by: O(n) algorithm
- classesInChangeSet := ChangeSet current selectClassesForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn.
-
doExtensions ifTrue:[
methodsToCheckIn notEmpty ifTrue:[
doClasses ifTrue:[
@@ -631,14 +640,26 @@
].
checkinInfo isNil ifTrue:[
+ |infoString|
+
+ doExtensions ifTrue:[
+ infoString := '%1 classes (%4 changed) and %2 extensions for project "%3"'.
+ ] ifFalse:[doClasses ifTrue:[
+ infoString := '%1 classes (%4 changed) for project "%3"'.
+ ] ifFalse:[doBuild ifTrue:[
+ infoString := 'Build support files for project "%3"'.
+ ] ifFalse:[
+ infoString := 'I don''t know what I am doing'.
+ ]]].
+
+ infoString := infoString
+ bindWith:classesToCheckIn size
+ with:methodsToCheckIn size
+ with:packageToCheckIn allBold
+ with:classesInChangeSet size.
+
checkinInfo := self
- getCheckinInfoFor:((doExtensions
- ifTrue:['%1 classes (%4 changed) and %2 extensions for project "%3"']
- ifFalse:['%1 classes (%4 changed) for project "%3"'])
- bindWith:classesToCheckIn size
- with:methodsToCheckIn size
- with:packageToCheckIn allBold
- with:classesInChangeSet size)
+ getCheckinInfoFor:infoString
initialAnswer:nil
withQuickOption:(classesToCheckIn size > 0)
withValidateConsistencyOption:true.
@@ -654,7 +675,7 @@
(checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[
classesToTag := classesToCheckIn.
originalCheckinInfo := checkinInfo.
- checkinInfo := checkinInfo copy.
+ checkinInfo := checkinInfo deepCopy.
checkinInfo isStable:false.
checkinInfo tag:nil.
].
@@ -756,7 +777,7 @@
].
doBuild ifTrue:[
- self checkinBuildSupportFilesForPackage:packageToCheckIn
+ self checkinBuildSupportFilesForPackage:packageToCheckIn withInfo:(originalCheckinInfo ? checkinInfo).
].
"Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -766,10 +787,10 @@
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.16 2013-07-31 15:47:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.17 2013-08-06 11:29:32 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.16 2013-07-31 15:47:16 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilitiesForContainerBasedManagers.st,v 1.17 2013-08-06 11:29:32 stefan Exp $'
! !