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: [email protected]
[[email protected]] On Behalf Of Mariano Martinez
Peck [[email protected]]
Sent: Thursday, October 06, 2011 9:23 AM
To: [email protected]
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
<[email protected]<mailto:[email protected]>> wrote:
On Thu, Oct 6, 2011 at 11:50 AM, HwaJong Oh
<[email protected]<mailto:[email protected]>> 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