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

David T. Lewis lewis at mail.msen.com
Sun Nov 30 21:15:33 UTC 2014


On Sun, Nov 30, 2014 at 02:28:30PM -0600, Chris Muller wrote:
> We have been experiencing issues with empty mcz versions recently.
> Will this make that problem more invisible?

I doubt it. I was intentionally setting up a new local repository and
saving a newly created empty package to it. It's not something that you
would likely do very often, but I am trying out the idea of moving Chronology
to a separate package outside of Kernel(*), so I was starting with a new empty
Chronology package as a starting point in my local repository. It seems that
nil does not understand the concept of emptiness(**), hence the fix.

I'm sure that whatever might be going wrong to produce an empty mcz would
be unrelated to this scenario.

Dave

(*) The reason I am trying this is that my UTCDateAndTime package is proving
to be unmaintainable in Monticello because it is part of the much larger Kernel
package. A SAR distribution works fine, but I'd prefer to use Monticello to
keep it up to date with trunk, and to make it loadable in the new Spur image
formats for the next Squeak release.

  http://wiki.squeak.org/squeak/6197
  http://ss3.gemstone.com/ss/UTCDateAndTime.html

(**) I have so far resisted the temptation to initiate a philosophical debate
on this topic ;-)


> 
> On Sun, Nov 30, 2014 at 1:52 PM,  <commits at source.squeak.org> wrote:
> > David T. Lewis uploaded a new version of Monticello to project The Trunk:
> > http://source.squeak.org/trunk/Monticello-dtl.605.mcz
> >
> > ==================== 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') -----
> >   newVersion
> >         | 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