[squeak-dev] The Trunk: MonticelloConfigurations-nice.103.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 31 20:55:52 UTC 2012


Nicolas Cellier uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-nice.103.mcz

==================== Summary ====================

Name: MonticelloConfigurations-nice.103
Author: nice
Time: 31 March 2012, 10:55:36.729 pm
UUID: a095f0db-5958-454d-95e1-9c889442629f
Ancestors: MonticelloConfigurations-eem.102

Add a menu for updating a single dependency in the MonticelloConfiguration browser.

=============== Diff against MonticelloConfigurations-eem.102 ===============

Item was added:
+ ----- Method: MCConfiguration>>updateFromImage: (in category 'updating') -----
+ updateFromImage: packageIndex
+ 	| dep newDeps |
+ 	dep := self dependencies at: packageIndex.
+ 	newDeps := self dependencies copy.
+ 	newDeps
+ 		at: packageIndex put: (dep package hasWorkingCopy
+ 			ifTrue: [dep package workingCopy in: [:wc |
+ 					MCVersionDependency package: wc package info: wc ancestors first]]
+ 			ifFalse: [dep]).
+ 	self dependencies: newDeps.
+ !

Item was added:
+ ----- Method: MCConfiguration>>updateFromRepositories: (in category 'updating') -----
+ updateFromRepositories: packageIndex
+ 
+ 	(repositories
+ 		inject: [ self updateFromRepositoriesWithoutCaching: packageIndex ]
+ 		into: [ :innerBlock :repository |
+ 			[ repository cacheAllFileNamesDuring: innerBlock ] ]) value
+ 	
+ !

Item was added:
+ ----- Method: MCConfiguration>>updateFromRepositoriesWithoutCaching: (in category 'updating') -----
+ updateFromRepositoriesWithoutCaching: packageIndex
+ 
+ 	| oldNames newNames sortedNames newDeps dep |
+ 	dep := dependencies at: packageIndex.
+ 	oldNames := {dep versionInfo versionName}.
+ 	newNames := Dictionary new.
+ 	self repositories
+ 		do: [:repo | 
+ 			ProgressNotification signal: '' extra: 'Checking ', repo description.
+ 			(repo possiblyNewerVersionsOfAnyOf: oldNames)
+ 				do: [:newName | newNames at: newName put: repo]]
+ 		displayingProgress: 'Searching new versions'.
+ 
+ 	sortedNames := newNames keys asArray sort:
+ 		[:a :b | a versionNumber > b versionNumber].
+ 
+ 	newDeps := self dependencies copy.
+ 	newDeps at: packageIndex put: (
+ 		sortedNames
+ 				detect: [:each | each packageAndBranchName = dep packageAndBranchName]
+ 				ifFound: [ :newName |
+ 					| repo |
+ 					repo := newNames at: newName.
+ 					(self versionInfoNamed: newName for: dep from: repo)
+ 						ifNil: [ dep ]
+ 						ifNotNil: [ :info |
+ 							MCVersionDependency package: dep package info: info ] ]
+ 				ifNone: [ dep ]).
+ 
+ 	self dependencies: newDeps.
+ !

Item was changed:
  ----- Method: MCConfigurationBrowser>>dependencyMenu: (in category 'morphic ui') -----
  dependencyMenu: aMenu
  	self fillMenu: aMenu fromSpecs: #(('add dependency...' addDependency)).
  	self selectedDependency ifNotNil: [
+ 		self fillMenu: aMenu fromSpecs: #(('remove dependency' remove)).
+ 		self fillMenu: aMenu fromSpecs: #(('update dependency from image' updateSelectedDependencyFromImage)).
+ 		self fillMenu: aMenu fromSpecs: #(('update dependency from repositories' updateSelectedDependencyFromRepositories))].
+ 	^aMenu!
- 		self fillMenu: aMenu fromSpecs: #(('remove dependency' remove))].
- 	^aMenu
- !

Item was added:
+ ----- Method: MCConfigurationBrowser>>updateSelectedDependencyFromImage (in category 'actions') -----
+ updateSelectedDependencyFromImage
+ 	self configuration updateFromImage: self dependencyIndex.
+ 	self changed: #dependencyList; changed: #description
+ !

Item was added:
+ ----- Method: MCConfigurationBrowser>>updateSelectedDependencyFromRepositories (in category 'actions') -----
+ updateSelectedDependencyFromRepositories
+ 	self configuration updateFromRepositories: self dependencyIndex.
+ 	self changed: #dependencyList; changed: #description
+ !



More information about the Squeak-dev mailing list