Thanks. I will add this script to the front page of SqueakSource.

On Wed, May 8, 2013 at 5:55 PM, Damien Cassou <damien.cas...@gmail.com>wrote:

> On Wed, May 8, 2013 at 4:05 PM, Hilaire Fernandes
> <hilaire.fernan...@gmail.com> wrote:
> > A small note or link in Squeaksource how to migrate to smaltalkhub will
> > be helpful.
>
>
> I agree. Something like that would make sense for people who want to
> get an exact copy of their project:
>
> | source goSource destination goDestination files destinationFiles |
>
> source := MCHttpRepository location: '
> http://www.squeaksource.com/YOURPROJECT'.
> destination := MCSmalltalkhubRepository owner: 'YOURNAME' project:
> 'YOURPROJECT' user: 'YOURNAME' password: 'YOURPASSWORD'.
>
> goSource := Gofer new repository: source.
> goDestination := Gofer new repository: destination.
>
> files := source allVersionNames.
>
> (goSource allResolved select: [ :resolved | files anySatisfy: [ :each
> | resolved name = each ] ]) do: [ :each | goSource package: each
> packageName ].
>
> goSource fetch. "downloads all mcz on your computer"
>
> destinationFiles := destination allVersionNames. "checks what files
> are already at destination"
> files reject: [ :file | destinationFiles includes: file ] thenDo: [
> :file | goDestination version: file ]. "selects only the mcz that are
> not yet at destination"
>
> goDestination push. "sends everything to SmalltalkHub"
>
> self assert: destination allVersionNames sorted = files sorted.
> "checks we have exactly the same files at source and destination"
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without
> losing enthusiasm."
> Winston Churchill
>
>

Reply via email to