[squeak-dev] The Inbox: Monticello-cmm.66240.mcz

Eliot Miranda eliot.miranda at gmail.com
Mon Feb 18 19:08:01 UTC 2019


Hi Jakob,

On Mon, Feb 18, 2019 at 5:54 AM Jakob Reschke <forums.jakob at resfarm.de>
wrote:

> As I understood Chris, he tries to solve the following uniqueness problem:
> you can generate distinct MCVersions that have the same name (by saving to
> a local repository on different machines, for example). This produces
> problems when you want to "push" both of these versions to a central
> repository because of the way HTTP repositories (and others) depend on the
> uniqueness of version names. Moreover it is confusing for the repository
> maintainers because the ancestry of one version might refer to a version
> that is not present in the repository, but a different version with the
> same name *is* present in the repository, leading you to mistake one for
> the other.
>

Why would one want to confuse oneself by doing this?


>
> The two-laptops-with-a-local-repository use case is not the regular
> Monticello workflow. That's why Levente says it happens way too
> infrequently. But it is a realization of a truly distributed workflow that
> Monticello should support.
>
> In Git they say: everybody is on their own branch [even though everybody
> may have checkout out "master"]. Actually, every cloned repository is on
> its own branch... and the same applies to Monticello. Git does not suffer
> from the same problem because it does not use consecutive version numbers.
>

I still don't understand.  Provided we have unique personal identifiers
there is no problem.  Often in VMMaker we will produce packages with the
same version number but different initials (because they are produced by
different people).  This presents no problem at all.  I don't get it.

A problem could come where one generates two different versions oneself.
But as the old joke goes "Doctor my thumb hurts.  Why?  Because I'm hitting
my thumb with a hammer!  Doctor: Don't do that."


>
> Am Mo., 18. Feb. 2019 um 13:41 Uhr schrieb marcel.taeumel <
> Marcel.Taeumel at hpi.de>:
>
>> Hi, there.
>>
>> Can somebody please summarize the problem we want to solve (or address)
>> here? I still don't understand it... :-( If "uniqueness" is the problem,
>> just add this new number:
>>
>> Monticello-cmm.66240.685
>>
>> Best,
>> Marcel
>>
>>
>> commits-2 wrote
>> > Chris Muller uploaded a new version of Monticello to project The Inbox:
>> > http://source.squeak.org/inbox/Monticello-cmm.66240.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: Monticello-cmm.66240
>> > Author: cmm
>> > Time: 16 February 2019, 4:49:51.685281 pm
>> > UUID: 435c7c35-3b22-4f66-b733-070ccd48a980
>> > Ancestors: Monticello-eem.684
>> >
>> > Monticello only requires monotonicity and uniqueness for its version
>> > numbers, not consecutiveness.  When saving a new package, generate a
>> > unique, 6-digit versionNumber.  Beginning approximately
>> > 2020-11-25T10:40:00+00:00, a 7th digit will appear -- no more than a
>> local
>> > phone number -- which will be good until year 2038.
>> >
>> > =============== Diff against Monticello-eem.684 ===============
>> >
>> > Item was added:
>> > + ----- Method: MCAncestry>>hasAncestorNamed: (in category 'ancestry')
>> > -----
>> > + hasAncestorNamed: aString
>> > +     self allAncestorsDo:
>> > +             [ : each | aString asMCVersionName = each name ifTrue: [
>> ^ true ] ].
>> > +     ^ false!
>> >
>> > Item was added:
>> > + ----- Method: MCVersionName class>>newVersionNameFor: (in category
>> > 'utilities') -----
>> > + newVersionNameFor: branchName
>> > +     ^ branchName, '-' , Utilities authorInitials , '.' , self
>> > newVersionNumberString!
>> >
>> > Item was added:
>> > + ----- Method: MCVersionName class>>newVersionNumberString (in category
>> > 'utilities') -----
>> > + newVersionNumberString
>> > +     "Answer a unique version number for use in generating the
>> versionNumber
>> > portion of my name."
>> > +     ^ self versionNumberFor: DateAndTime now!
>> >
>> > Item was added:
>> > + ----- Method: MCVersionName class>>versionNumberFor: (in category
>> > 'private') -----
>> > + versionNumberFor: aDateAndTime
>> > +     "Answer a unique version number for use in generating the
>> versionNumber
>> > portion of my name."
>> > +     | epoch |
>> > +     epoch := '2019-01-01T00:00:00+00:00' asDateAndTime.
>> > +     ^ (aDateAndTime - epoch) days * 24 * 60!
>> >
>> > Item was changed:
>> >   MCPackageManager subclass: #MCWorkingCopy
>> > +     instanceVariableNames: 'versionInfo ancestry repositoryGroup
>> > requiredPackages environment'
>> > -     instanceVariableNames: 'versionInfo ancestry counter
>> repositoryGroup
>> > requiredPackages environment'
>> >       classVariableNames: ''
>> >       poolDictionaries: ''
>> >       category: 'Monticello-Versioning'!
>> >
>> > Item was changed:
>> >   ----- Method: MCWorkingCopy>>nextVersionName (in category 'private')
>> > -----
>> >   nextVersionName
>> >       | branch oldName |
>> >       ancestry ancestors isEmpty
>> >               ifTrue:
>> > +                     [ branch := package name ]
>> > -                     [ counter ifNil: [ counter := 0 ].
>> > -                     branch := package name ]
>> >               ifFalse:
>> >                       [ oldName := ancestry ancestors first versionName.
>> > +                     branch := oldName packageAndBranchName ].
>> > +     ^ MCVersionName newVersionNameFor: branch!
>> > -                     branch := oldName packageAndBranchName.
>> > -                     counter ifNil:
>> > -                             [ counter := (ancestry ancestors
>> detectMax:
>> > -                                     [ : eachVersionInfo |
>> eachVersionInfo versionNumber ])
>> > -                                     ifNil: [ 0 ]
>> > -                                     ifNotNil:
>> > -                                             [ : highestNumbered |
>> highestNumbered versionNumber ] ] ].
>> > -     counter := counter + 1.
>> > -     ^ branch , '-' , Utilities authorInitials , '.' , counter
>> asString!
>> >
>> > Item was changed:
>> >   ----- Method: MCWorkingCopy>>uniqueVersionName (in category 'private')
>> > -----
>> >   uniqueVersionName
>> >       |versionName|
>> > -     counter := nil.
>> >       [versionName := self nextVersionName.
>> > +     (self repositoryGroup includesVersionNamed: versionName) or: [
>> ancestry
>> > hasAncestorNamed: versionName ]] whileTrue.
>> > -     self repositoryGroup includesVersionNamed: versionName] whileTrue.
>> >       ^ versionName!
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Squeak-Dev-f45488.html
>>
>>
>

-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190218/d4733f87/attachment.html>


More information about the Squeak-dev mailing list