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