[squeak-dev] The Inbox: Monticello-cmm.66240.mcz
marcel.taeumel
Marcel.Taeumel at hpi.de
Mon Feb 18 12:41:20 UTC 2019
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
More information about the Squeak-dev
mailing list
|