[squeak-dev] The Trunk: System-dtl.185.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Dec 1 03:39:07 UTC 2009


David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.185.mcz

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

Name: System-dtl.185
Author: dtl
Time: 30 November 2009, 11:33:29 am
UUID: a7bc8a25-1b42-4de8-b16d-df3161022216
Ancestors: System-dtl.184

Better progress display handling and rudimentary MVC implementations for
  Project>>loadFromServer:
  Project>>storeOnServerWithProgressInfo:
  Project>>storeOnServerWithProgressInfoOn:


=============== Diff against System-dtl.184 ===============

Item was changed:
  ----- Method: Project>>loadFromServer: (in category 'file in/out') -----
  loadFromServer: newerAutomatically
  	"If a newer version of me is on the server, load it."
+ 	| pair resp server |
+ 	self assureIntegerVersion.
  
+ 	self isCurrentProject ifTrue: ["exit, then do the command"
+ 		^ self armsLengthCommand: #loadFromServer withDescription: 'Loading' translated
+ 	].
+ 	server := self tryToFindAServerWithMe ifNil: [^ nil].
+ 	pair := self class mostRecent: self name onServer: server.
+ 	pair first ifNil: [^ self inform: ('can''t find file on server for {1}' translated format: {self name})].
+ 	self currentVersionNumber > pair second ifTrue: [
+ 		^ self inform: ('That server has an older version of the project.' translated)].
+ 	version = (Project parseProjectFileName: pair first) second ifTrue: [
+ 		resp := (UIManager default chooseFrom: 
+ 				(Array with: 'Reload anyway' translated 
+ 						with: 'Cancel' translated withCRs) 
+ 				title:  'The only changes are the ones you made here.' translated).
+ 		resp ~= 1 ifTrue: [^ nil]
+ 	] ifFalse: [
+ 		newerAutomatically ifFalse: [
+ 			resp := (UIManager default 
+ 						chooseFrom: #('Load it' 'Cancel') 
+ 						title:  'A newer version exists on the server.').
+ 			resp ~= 1 ifTrue: [^ nil]
+ 		].
+ 	].
+ 
+ 	"let's avoid renaming the loaded change set since it will be replacing ours"
+ 	self projectParameters at: #loadingNewerVersion put: true.
+ 
+ 	CurrentProject
+ 		do: [ProjectLoading
+ 				installRemoteNamed: pair first
+ 				from: server
+ 				named: self name
+ 				in: parentProject]
+ 		withProgressInfoOn: nil
+ 		label: 'project loading'
+ !
- 	self subclassResponsibility!

Item was changed:
  ----- Method: Project>>storeOnServerWithProgressInfoOn: (in category 'file in/out') -----
  storeOnServerWithProgressInfoOn: aMorphOrNil
  
  	"Save to disk as an Export Segment.  Then put that file on the server I came from, as a new version.  Version is literal piece of file name.  Mime encoded and http encoded."
  
+ 	CurrentProject
+ 		do: [self storeOnServerInnards]
+ 		withProgressInfoOn: aMorphOrNil
+ 		label: 'project storing'
+ 
- 	self subclassResponsibility
  	!

Item was changed:
  ----- Method: Project>>storeOnServerWithProgressInfo (in category 'file in/out') -----
  storeOnServerWithProgressInfo
  
  	"Save to disk as an Export Segment.  Then put that file on the server I came from, as a new version.  Version is literal piece of file name.  Mime encoded and http encoded."
  
+ 	CurrentProject
+ 		do: [self storeOnServerInnards]
+ 		withProgressInfoOn: nil
+ 		label: 'project storing'
- 	self subclassResponsibility
  !

Item was added:
+ ----- Method: Project>>do:withProgressInfoOn:label: (in category 'utilities') -----
+ do: aBlock withProgressInfoOn: aMorphOrNil label: aString
+ 	"Evaluate aBlock with a labeled progress bar"
+ 
+ 	self subclassResponsibility
+ 
+ !




More information about the Squeak-dev mailing list