Nicolas Cellier uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-nice.42.mcz ==================== Summary ==================== Name: ReleaseBuilder-nice.42 Author: nice Time: 27 December 2009, 4:08:17 am UUID: bdf6a4c0-f93b-4446-abce-002a810a7320 Ancestors: ReleaseBuilder-ul.41 Cosmetic: move or remove a few temps inside closures =============== Diff against ReleaseBuilder-ul.41 =============== Item was changed: ----- Method: ReleaseBuilderFor3dot11>>createCompressedSources (in category 'sources managment') ----- createCompressedSources " ReleaseBuilderFor3dot11 new createCompressedSources" + + ProtoObject allSubclassesWithLevelDo:[:cl :l| | dir | - | unzipped nameToUse zipped buffer dir | - ProtoObject allSubclassesWithLevelDo:[:cl :l| dir := self createDirIfnotExists:cl category. + Cursor write showWhile: [ | zipped nameToUse unzipped buffer | + nameToUse := cl printString . - Cursor write showWhile: [nameToUse := cl printString . (dir fileExists: nameToUse) ifFalse:[ unzipped :=RWBinaryOrTextStream on: ''. unzipped header; timeStamp. cl fileOutOn: unzipped moveSource: false toFile: 0. unzipped trailer. unzipped reset. zipped := dir newFileNamed: (nameToUse, FileDirectory dot, ImageSegment compressedFileExtension). zipped binary. zipped := GZipWriteStream on: zipped. buffer := ByteArray new: 50000. 'Compressing ', nameToUse displayProgressAt: Sensor cursorPoint from: 0 to: unzipped size during:[:bar| [unzipped atEnd] whileFalse:[ bar value: unzipped position. zipped nextPutAll: (unzipped nextInto: buffer)]. zipped close. unzipped close]]]] startingLevel: 0! Item was changed: ----- Method: ReleaseBuilderFor3dot10>>packagesInfluenced:named: (in category 'packages') ----- packagesInfluenced: aStream named: aFileName " This is a partial response to Ralph request. Lets know what packages could touch some code file what we wish go into image. Intended to load Mantis fix and convert the result to Monticello " " ReleaseBuilderFor3dot10 new packagesInfluenced " + | monti cs | - | realClass cat p monti cs | monti := Set new. cs := FilePackage new fromStream: aStream reset named: aFileName. + cs classes do: [:cl| | p realClass cat | + realClass := Smalltalk at: cl name ifAbsent: [ self error: 'This image do not have ', cl asString] .cat := (realClass category findTokens: '-') first. - cs classes do: [:cl| realClass := Smalltalk at: cl name ifAbsent: [ self error: 'This image do not have ', cl asString] .cat := (realClass category findTokens: '-') first. p := (PackageInfo allPackages collect:[:pi| pi packageName]) . (p includes: cat) ifTrue:[ monti add: cat]]. packagesList addAll: monti.! Item was changed: ----- Method: ReleaseBuilderFor3dot10>>packagesInfluenced (in category 'packages') ----- packagesInfluenced " This is a partial response to Ralph request. Lets know what packages could touch some code file what we wish go into image. Intended to load Mantis fix and convert the result to Monticello " " ReleaseBuilderFor3dot10 new packagesInfluenced " + | monti fileName cs | - | realClass cat p monti fileName cs | monti := Set new. fileName := UIManager default chooseFileMatching: #('st' 'cs'). cs := FilePackage fromFileNamed: fileName. + cs classes do: [:cl| | realClass cat p | + realClass := Smalltalk at: cl name ifAbsent: [ self error: 'This image do not have ', cl asString] .cat := (realClass category findTokens: '-') first. - cs classes do: [:cl| realClass := Smalltalk at: cl name ifAbsent: [ self error: 'This image do not have ', cl asString] .cat := (realClass category findTokens: '-') first. p := (PackageInfo allPackages collect:[:pi| pi packageName]) . (p includes: cat) ifTrue:[ monti add: cat]]. ^ monti.! Item was changed: ----- Method: ReleaseBuilderFor3dot10>>packagesList (in category 'accessing') ----- packagesList + | mcc lista | - | mcc lista pos | lista := OrderedCollection new. mcc := MCWorkingCopyBrowser new. mcc repository: MCCacheRepository default. lista := mcc workingCopies select: [:wc | + ((wc modified = true) & wc ancestors notEmpty)] thenCollect: [:ea| | packName pos| + packName := ea ancestry ancestors first name. - ((wc modified = true) & wc ancestors notEmpty)] thenCollect: [:ea| |packName| packName := ea ancestry ancestors first name. pos := packName indexOf: $-. packName := packName copyFrom: 1 to: pos -1. lista add: packName]. ^ lista! Item was changed: ----- Method: ReleaseBuilderFor3dot11>>loadLastVersion: (in category 'updates') ----- loadLastVersion: aListOfPackageNames + | mcw montiNames version | - | mcw montiNames package version | mcw := MCWorkingCopyBrowser new repository: (MCHttpRepository location: 'http://source.squeakfoundation.org/trunk' user: '' password: ''). mcw repository ifNotNil: [:repos | montiNames := repos readableFileNames]. aListOfPackageNames + do: [:mo | | package | - do: [:mo | package := montiNames detect: [:ea | (ea findTokens: '-' ) first = mo] ifNone: []. package ifNotNil: [version := mcw repository loadVersionFromFileNamed: package. version load]]. ^ version! Item was changed: ----- Method: ReleaseBuilder>>fixObsoleteReferences (in category 'utilities') ----- fixObsoleteReferences "ReleaseBuilder new fixObsoleteReferences" + + Preference allInstances do: [:each | | informee | - | informee obsoleteBindings obsName realName realClass | - Preference allInstances do: [:each | informee := each instVarNamed: #changeInformee. ((informee isKindOf: Behavior) and: [informee isObsolete]) ifTrue: [ Transcript show: each name; cr. each instVarNamed: #changeInformee put: (Smalltalk at: (informee name copyReplaceAll: 'AnObsolete' with: '') asSymbol)]]. CompiledMethod allInstances do: [:method | + | obsoleteBindings | obsoleteBindings := method literals select: [:literal | literal isVariableBinding and: [literal value isBehavior] and: [literal value isObsolete]]. obsoleteBindings do: [:binding | + | obsName realName realClass | obsName := binding value name. Transcript show: obsName; cr. realName := obsName copyReplaceAll: 'AnObsolete' with: ''. realClass := Smalltalk at: realName asSymbol ifAbsent: [UndefinedObject]. binding isSpecialWriteBinding ifTrue: [binding privateSetKey: binding key value: realClass] ifFalse: [binding key: binding key value: realClass]]]. Behavior flushObsoleteSubclasses. Smalltalk garbageCollect; garbageCollect. SystemNavigation default obsoleteBehaviors size > 0 ifTrue: [SystemNavigation default inspect]! Item was changed: ----- Method: ReleaseBuilderFor3dot11>>saveInTrunk: (in category 'squeakThreeEleven') ----- saveInTrunk: packageName " ReleaseBuilderFor3dot11 new saveInTrunk: Foo" + | monti repo | - | monti repo message | monti := MCWorkingCopyBrowser new. repo := MCHttpRepository location: 'http://source.squeak.org/trunk' user: '' password: ''. (SystemOrganization categoriesMatching: packageName , '*') do: [:cat | + | workingCopy message | - | workingCopy | PackageInfo registerPackageName: cat asString. workingCopy := MCWorkingCopy forPackage: (MCPackage new name: cat asString). workingCopy repositoryGroup addRepository: repo. repo user ifEmpty: [repo user: (UIManager default request: 'Trunk Repository username'). repo password: (UIManager default request: 'Trunk Repository password')]. message := UIManager default request: 'Please type comments for this package:' translated initialAnswer: 'a good comment' translated. repo storeVersion: (workingCopy newVersionWithName: workingCopy uniqueVersionName message: message)]. monti workingCopyListChanged; changed: #workingCopySelection; changed: #repositoryList ! Item was changed: ----- Method: ReleaseBuilderFor3dot10>>loadLastVersion: (in category 'packages') ----- loadLastVersion: aListOfPackageNames + | mcw montiNames version | - | mcw montiNames package version | mcw := MCWorkingCopyBrowser new repository: (MCHttpRepository location: 'http://source.squeakfoundation.org/39a' user: '' password: ''). mcw repository ifNotNil: [:repos | montiNames := repos readableFileNames ]. + aListOfPackageNames do: [:mo | | package | - aListOfPackageNames do: [:mo | package := (montiNames detect:[:ea| ea beginsWith: mo] ifNone:[] ) . package ifNotNil: [ version := mcw repository loadVersionFromFileNamed: package. version load]]. ^version! Item was changed: ----- Method: ReleaseBuilderFor3dot10>>updateToNext (in category 'updates') ----- updateToNext + | stream mcc | - | pos packString number stream p1 mcc | stream := RWBinaryOrTextStream on: String new. mcc := MCWorkingCopyBrowser new. mcc repository: MCCacheRepository default. mcc workingCopies select: [:wc | + (wc modified = true)] thenDo: [:ea| | number p1 packString pos | + self saveNewVersion: ea. - (wc modified = true)] thenDo: [:ea| self saveNewVersion: ea. packString := ea ancestry ancestorString . pos := packString indexOf: $.. p1 := packString copyFrom: 1 to: pos -1. number := (packString copyFrom: pos + 1 to: packString size) asNumber. packString := p1 ,'.', number asString , '(', (number - 1) asString ,').mcd'. packString := packString, Character cr asString. stream nextPutAll: packString ]. ChangeSet current postscript: ChangeSet current postscript, stream contents! |
Free forum by Nabble | Edit this page |