[Pkg] The Trunk: Network-ul.188.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 13 14:57:49 UTC 2017


Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.188.mcz

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

Name: Network-ul.188
Author: ul
Time: 13 March 2017, 2:46:38.535494 pm
UUID: 5b21f6b5-5e78-4f35-a8e2-7c1db71495bf
Ancestors: Network-ul.187

SortedCollection Whack-a-mole

=============== Diff against Network-ul.187 ===============

Item was changed:
  ----- Method: ServerDirectory>>moveAllButYoungest:in:to: (in category 'squeaklets') -----
  moveAllButYoungest: young in: versions to: repository
  	| all |
  	"Specialized to files with names of the form 'aName_vvv.ext'.  Where vvv is a mime-encoded base 64 version number.  Versions is an array of file names tokenized into three parts (aName vvv ext).  Move the files by renaming them on the server."
  
  	versions size <= young ifTrue: [^ self].
+ 	all := (versions as: Array)
+ 		replace: [ :each | { each. Base64MimeConverter decodeInteger: each second unescapePercents } ];
+ 		sort: [ :a :b | a second < b second ];
+ 		replace: [ :each | each first ].
+ 	
+ 	all from: 1 to: all size - young do: [:vv | | fName |
- 	all := SortedCollection sortBlock: [:aa :bb | | aVers bVers | 
- 		aVers := Base64MimeConverter decodeInteger: aa second unescapePercents.
- 		bVers := Base64MimeConverter decodeInteger: bb second unescapePercents.
- 		aVers < bVers].
- 	all addAll: versions.
- 	young timesRepeat: [all removeLast].	"ones we keep"
- 	all do: [:vv | | fName |
  		fName := vv first, '_', vv second, '.', vv third.
  		repository rename: self fullName,fName toBe: fName].
  !

Item was changed:
  ----- Method: SuperSwikiServer>>updateProjectInfoFor: (in category 'for real') -----
  updateProjectInfoFor: aProject
  
  	| data details projectLinks linkString uploader |
  
  	data := OrderedCollection new.
  	data add: 'action: updatepage'.
  	data add: 'password: ',ProjectPasswordNotification signal.
  	data add: 'projectimage: ', (aProject name convertToEncoding: self encodingName) , '.gif'.
  	uploader := Utilities authorNamePerSe.
  	uploader isEmptyOrNil ifTrue: [uploader := Utilities authorInitialsPerSe].
  	uploader isEmptyOrNil ifFalse: [
  		data add: ('submittedBy: ',uploader convertToEncoding: self encodingName).
  	].
  	projectLinks := Set new.
  	aProject world allMorphsDo: [ :each |
  		(each isKindOf: ProjectViewMorph) ifTrue: [
  			projectLinks add: each safeProjectName.
  		].
  	].
  	details := aProject world valueOfProperty: #ProjectDetails ifAbsent: [Dictionary new].
  	details at: 'projectname' ifAbsentPut: [aProject name].
  	projectLinks isEmpty ifTrue: [
  		details removeKey: 'projectlinks' ifAbsent: []
  	] ifFalse: [
  		linkString := String streamContents: [ :strm |
+ 			projectLinks sorted do: [ :each |
- 			projectLinks asSortedCollection do: [ :each |
  				strm nextPutAll: each
  			] separatedBy: [
  				strm nextPut: $.
  			].
  		].
  		details at: 'projectlinks' put: linkString
  	].
  	details keysAndValuesDo: [ :k :v |
  		data add: k , ': ' , (v convertToEncoding: self encodingName). self flag: #yoFlag.
  	].
  	^self sendToSwikiProjectServer: data!



More information about the Packages mailing list