[squeak-dev] The Trunk: Monticello-dtl.605.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Nov 30 19:52:20 UTC 2014

David T. Lewis uploaded a new version of Monticello to project The Trunk:

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

Name: Monticello-dtl.605
Author: dtl
Time: 30 November 2014, 2:51:55.03 pm
UUID: 7ee2c5c7-7da0-4241-bf1d-148741ed76a2
Ancestors: Monticello-bf.604

Add a nil check, allows saving an initial empty package in a new repository.

=============== Diff against Monticello-bf.604 ===============

Item was changed:
  ----- Method: MCWorkingCopy>>newVersion (in category 'operations') -----
  	| packageSnapshot parentSnapshot patch patchBlock |
  	parentSnapshot := self parentSnapshot.
  	patchBlock :=  [patch := (packageSnapshot := package snapshot) patchRelativeToBase: parentSnapshot].
  	patchBlock value. "Ensure that this is called at least once."
  	^ (self requestVersionNameAndMessageWithSuggestion: self uniqueVersionName
  		initialMessage: self patchMessageSuggestion
  		patchBlock: patchBlock
  	) ifNotNil: [:tuple |
  		self newVersionWithName: tuple first withBlanksTrimmed
  			message: (self patchMessageStripped: tuple second)
+ 			snapshot: ((tuple size >= 3 and: [tuple third notNil and: [tuple third notEmpty]])
- 			snapshot: ((tuple size >= 3 and: [tuple third notEmpty])
  				ifTrue: [	MCPatcher apply: (patch ignoring: tuple third) to: parentSnapshot]
  				ifFalse: [packageSnapshot])]!

More information about the Squeak-dev mailing list