[squeak-dev] The Inbox: MonticelloConfigurations-dtl.164.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Apr 15 23:57:20 UTC 2020


A new version of MonticelloConfigurations was added to project The Inbox:
http://source.squeak.org/inbox/MonticelloConfigurations-dtl.164.mcz

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

Name: MonticelloConfigurations-dtl.164
Author: dtl
Time: 14 April 2020, 7:20:07.551613 pm
UUID: e0f4a43a-1654-454c-9008-6ee483c29e58
Ancestors: MonticelloConfigurations-dtl.163

Limit the size of the MCM prior versions list, default length 10, to keep MCM file storage to well under 50k in size. Each version is identified by a UUID, so full version history can be reconstructed should the need arise. Also do better ordering of the user dialogues when storing a version.

=============== Diff against MonticelloConfigurations-dtl.163 ===============

Item was changed:
  ----- Method: MCConfigurationBrowser>>store (in category 'actions') -----
  store
  	(self checkRepositories and: [self checkDependencies]) ifFalse: [^self].
  	self pickName ifNotNil: [:name |
  		configuration name: name.
+ 		configuration comment: self enterVersionComment.
  		self pickRepository ifNotNil: [:repo |
- 			configuration comment: self enterVersionComment.
  			configuration authorInitials: Utilities authorInitials.
  			configuration timeStamp: ((DateAndTime fromSeconds: (DateAndTime now asSeconds)) printString).
  			configuration id: UUID new asString.
  			repo storeVersion: self configuration]].!

Item was changed:
  MCConfiguration subclass: #MCConfigurationExtended
  	instanceVariableNames: 'mcmVersion id authorInitials timeStamp comment priorVersions'
+ 	classVariableNames: 'HistoryLimit'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'MonticelloConfigurations'!
  
  !MCConfigurationExtended commentStamp: 'dtl 4/13/2020 13:57' prior: 0!
  A MCConfigurationExtended is a configuration with author initials, timestamp, comment, and a list of prior versions. Its external storage format is organized for compatibility with MCConfiguration, such that an image wtih support for only MCConfiguration can use configurations saved from a MCConfigurationExtended. The intended use is to enable documentation of configuration maps, and to allow modifications to a configuration map without loss of version history.!

Item was added:
+ ----- Method: MCConfigurationExtended class>>initialize (in category 'class initialization') -----
+ initialize
+ 
+ 	"Limit the number of prior versions in the history list to prevent MCM files from
+ 	becoming unnecessarily large over time. Versions are idenitified by a UUID
+ 	identifier, which should be sufficient for building a full version history if needed."
+ 	HistoryLimit := 10.!

Item was changed:
  ----- Method: MCConfigurationExtended>>copyForEdit (in category 'copying') -----
  copyForEdit
  	"Preparing to edit a configuration. Answer a new copy with the original
  	instance saved in version history, and with no author initials or timestamp.
  	The initials and timestamp are to be set immediately prior to saving an edited
  	version."
  	| config |
  	config := super copyForEdit.
  	config priorVersions: priorVersions copy.
  	config priorVersions addFirst: self.
  	config authorInitials: nil.
  	config timeStamp: nil.
  	config comment: self comment copy.
+ 	config trimVersionList.
  	^ config!

Item was added:
+ ----- Method: MCConfigurationExtended>>trimVersionList (in category 'initialize') -----
+ trimVersionList
+ 	[priorVersions size > HistoryLimit]
+ 		whileTrue: [priorVersions removeLast].
+ !



More information about the Squeak-dev mailing list