On 6 October 2011 15:28, Schwab,Wilhelm K <
bschwab@anest.ufl.edu> wrote:
> Mariano,
>
> Below is something that was getting yanked from or with ScriptLoader, so I included it in Migrate. �The enumerating of versions could be of interest to you.
>
> Bill
>
>
> loadLatestPackage: aString fromRepository: aRepository
> � � � �"1-10 - too useful to be without really, I created another. �Shamelessly
> � � � �stolen from ScriptLoader."
>
> � � � �| versionsBlock versions tries version |
>
> � � � �versionsBlock := [ (aRepository allVersionNames select: [ :each |
> � � � � � � � �each beginsWith: aString ])
> � � � � � � � �asSortedCollection: [ :a :b |
> � � � � � � � � � � � �(a copyAfterLast: $.) asNumber <= (b copyAfterLast: $.) asNumber]].
> � � � �versions := versionsBlock value.
> � � � �tries := 0.
> � � � �[ versions isEmpty and: [ tries < 3 ] ] whileTrue: [
> � � � � � � � �versions := versionsBlock value.
> � � � � � � � �tries := tries + 1 ].
> � � � �versions isEmpty ifTrue: [ self error: 'problems when accessing repository' ].
>
> � � � �aRepository versionReaderForFileNamed: (versions last , '.mcz') do: [:reader |
> � � � � � � � �version := reader version.
> � � � � � � � �version load.
> � � � � � � � �version workingCopy repositoryGroup addRepository: aRepository].
>
>
> ________________________________________
> From:
pharo-project-bounces@lists.gforge.inria.fr [
pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Mariano Martinez Peck [
marianopeck@gmail.com]
> Sent: Thursday, October 06, 2011 9:23 AM
> To:
Pharo-project@lists.gforge.inria.fr
> Subject: Re: [Pharo-project] Getting and loading each version of a package? � � (Gofer?)
>
> I need help with only one thing....get the list of version of a package. I can manage the rest...
> So I would like tp get all the versions of the package Fuel of the squeaksource Fuel repo...
>
> thanks in advance,
>
>
> On Thu, Oct 6, 2011 at 11:51 AM, Mariano Martinez Peck <
marianopeck@gmail.com<mailto:
marianopeck@gmail.com>> wrote:
>
>
> On Thu, Oct 6, 2011 at 11:50 AM, HwaJong Oh <
daliot.oh@gmail.com<mailto:
daliot.oh@gmail.com>> wrote:
> Mariano,
>
> For metacello or monticello?
>
> Monticello.
>
>
>
> HwaJong Oh
>
> --
> View this message in context:
http://forum.world.st/Getting-and-loading-each-version-of-a-package-Gofer-tp3877374p3877588.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>
>
>
> --
> Mariano
>
http://marianopeck.wordpress.com
>
>
>
>
> --
> Mariano
>
http://marianopeck.wordpress.com
>
>
>