Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Inbox:
http://source.squeak.org/inbox/MonticelloConfigurations-bf.112.mcz ==================== Summary ==================== Name: MonticelloConfigurations-bf.112 Author: bf Time: 4 May 2013, 8:19:17.367 pm UUID: 3b23e53c-ca6e-47af-b3a1-12a73857fc22 Ancestors: MonticelloConfigurations-fbs.111 Allow moving methods and classes between packages independent of their order in the configuration. =============== Diff against MonticelloConfigurations-fbs.111 =============== Item was changed: ----- Method: MCConfiguration>>depsSatisfying:versionDo:displayingProgress: (in category 'private') ----- depsSatisfying: selectBlock versionDo: verBlock displayingProgress: progressString + | count selectedVersions | - | count action | self cacheAllFileNamesDuring: [ + self repositories do: [ :eachRepository | + MCRepositoryGroup default addRepository: eachRepository ]. + "First, download selected versions" + count := 0. + selectedVersions := OrderedCollection new. + self withProgress: progressString in: self dependencies do: [ :dep | | verName repo | + verName := dep versionInfo name. + self class extraProgressInfo ifTrue: + [ ProgressNotification signal: '' extra: 'Downloading ' , verName ]. + repo := self repositories + detect: [ :eachRepository | eachRepository includesVersionNamed: verName ] + ifNone: [ self logError: 'Version ' , verName , ' not found in any repository'. + self logError: 'Aborting'. + ^ count ]. + (selectBlock value: dep) ifTrue: [ | version | + version := self versionNamed: verName for: dep from: repo. + version ifNil: [ self logError: 'Could not download version ' , verName , ' from ' , repo description. + self logError: 'Aborting'. + ^ count ]. + dep package workingCopy newRepositoryGroupIfDefault. "fix old working copies" + dep package workingCopy repositoryGroup addRepository: repo. + selectedVersions add: version]]. + "Then, process only those definitions that moved from one package to another, to avoid order dependence" + MCReorganizationPreloader preloadMovesBetween: selectedVersions. + "Finally, load/merge selected versions" + self withProgress: progressString in: selectedVersions do: [ :version | + self logUpdate: version package with: version. + self class extraProgressInfo ifTrue: + [ ProgressNotification signal: '' extra: 'Installing ' , version info name ]. + verBlock value: version. + count := count + 1 ]. - count := 0. - self repositories do: [ : eachRepository | MCRepositoryGroup default addRepository: eachRepository ]. - action := [ : dep | | ver repo | - ver := dep versionInfo name. - repo := self repositories - detect: - [ : eachRepository | eachRepository includesVersionNamed: ver ] - ifNone: - [ self logError: 'Version ' , ver , ' not found in any repository'. - self logError: 'Aborting'. - ^ count ]. - (selectBlock value: dep) ifTrue: - [ | new | - new := self - versionNamed: ver - for: dep - from: repo. - new - ifNil: - [ self logError: 'Could not download version ' , ver , ' from ' , repo description. - self logError: 'Aborting'. - ^ count ] - ifNotNil: - [ self - logUpdate: dep package - with: new. - self class extraProgressInfo ifTrue: - [ ProgressNotification - signal: '' - extra: 'Installing ' , ver ]. - verBlock value: new. - count := count + 1 ] ]. - dep package workingCopy newRepositoryGroupIfDefault. "fix old working copies" - dep package workingCopy repositoryGroup addRepository: repo ]. - self class extraProgressInfo - ifTrue: - [ self dependencies - do: action - displayingProgress: progressString ] - ifFalse: [ self dependencies do: action ]. ]. ^ count! Item was added: + ----- Method: MCConfiguration>>withProgress:in:do: (in category 'private') ----- + withProgress: progressString in: aCollection do: aBlock + ^self class extraProgressInfo + ifTrue: [ aCollection do: aBlock displayingProgress: progressString ] + ifFalse: [ aCollection do: aBlock ] + + ! |
Free forum by Nabble | Edit this page |