[squeak-dev] The Trunk: MonticelloConfigurations-cmm.97.mcz

Bert Freudenberg bert at freudenbergs.de
Tue Aug 16 10:04:31 UTC 2011


On 16.08.2011, at 02:52, commits at source.squeak.org wrote:

> Chris Muller uploaded a new version of MonticelloConfigurations to project The Trunk:
> http://source.squeak.org/trunk/MonticelloConfigurations-cmm.97.mcz
> 
> ==================== Summary ====================
> 
> Name: MonticelloConfigurations-cmm.97
> Author: cmm
> Time: 13 August 2011, 7:39:26.257 pm
> UUID: 1824aaa0-7327-4eb5-9f64-b76f259b116a
> Ancestors: MonticelloConfigurations-bf.96
> 
> - When storing a Configuration, instead of complaining to the user about what versions are missing in the target repository, just copy the missing versions in automatically.


Uh oh. Why would you think that's a good idea? A configuration can have multiple repositories, so just copying all into into one is not always the right thing to do.

At the very least this should warn that it's not just going to store a config, but copy versions over, too. 

- Bert -

> =============== Diff against MonticelloConfigurations-bf.96 ===============
> 
> Item was changed:
>  ----- Method: MCConfigurationBrowser>>checkDependencies (in category 'dependencies') -----
>  checkDependencies
> + 	| missing |
> + 	missing := (self dependencies collect:
> + 		[ : ea | ea versionInfo name ]) asSet.
> + 	self repositories do:
> + 		[ : eachRepository | eachRepository cacheAllFileNamesDuring:
> + 			[ missing copy do:
> + 				[ : eachVersionName | (eachRepository includesVersionNamed: eachVersionName) ifTrue: [ missing remove: eachVersionName ] ] ] ].
> + 	^ missing isEmpty or:
> + 		[ self selectDependency: missing anyOne.
> + 		self confirm:
> + 			(String streamContents:
> + 				[ : strm | strm
> + 					 nextPutAll: 'No repository found for' ;
> + 					 cr.
> + 				missing do:
> + 					[ : r | strm
> + 						 nextPutAll: r ;
> + 						 cr ].
> + 				strm nextPutAll: 'Do you still want to store?' ]) ]!
> - 	^self checkModified and: [self checkMissing]!
> 
> Item was removed:
> - ----- Method: MCConfigurationBrowser>>checkMissing (in category 'dependencies') -----
> - checkMissing
> - 	| missing |
> - 	missing := (self dependencies collect:
> - 		[ : ea | ea versionInfo name ]) asSet.
> - 	self repositories do:
> - 		[ : eachRepository | eachRepository cacheAllFileNamesDuring:
> - 			[ missing copy do:
> - 				[ : eachVersionName | (eachRepository includesVersionNamed: eachVersionName) ifTrue: [ missing remove: eachVersionName ] ] ] ].
> - 	^ missing isEmpty or:
> - 		[ self selectDependency: missing anyOne.
> - 		self confirm:
> - 			(String streamContents:
> - 				[ : strm | strm
> - 					 nextPutAll: 'No repository found for' ;
> - 					 cr.
> - 				missing do:
> - 					[ : r | strm
> - 						 nextPutAll: r ;
> - 						 cr ].
> - 				strm nextPutAll: 'Do you still want to store?' ]) ]!
> 
> Item was changed:
>  ----- Method: MCConfigurationBrowser>>store (in category 'actions') -----
>  store
> + 	(self checkRepositories and: [ self checkDependencies ]) ifFalse: [ ^ self ].
> + 	self pickName ifNotNil:
> + 		[ : name | self configuration name: name.
> + 		self pickRepository ifNotNil:
> + 			[ : repo | repo cacheAllFileNamesDuring:
> + 				[ self configuration dependencies do:
> + 					[ : each | repo
> + 						versionWithInfo: each versionInfo
> + 						ifAbsent: [ repo storeVersion: (MCRepositoryGroup default versionWithInfo: each versionInfo) ] ] ].
> + 			repo storeVersion: self configuration ] ]!
> - 	(self checkRepositories and: [self checkDependencies]) ifFalse: [^self].
> - 	self pickName ifNotNil: [:name |
> - 		self configuration name: name.
> - 		self pickRepository ifNotNil: [:repo |
> - 			repo storeVersion: self configuration]].!
> 
> 





More information about the Squeak-dev mailing list