copyscript from squeaksource to smalltalkhub
Hi, Does anyone still have the script to copy a repository from squeaksource to smalltalkhub? thx Johan
Le 04/01/2014 19:11, Johan Brichau a écrit :
Hi,
Does anyone still have the script to copy a repository from squeaksource to smalltalkhub?
thx Johan
Last time I saw was in the welcome page of the squeaksource.com web site. Hilaire -- Dr. Geo http://drgeo.eu
hilaire wrote
Does anyone still have the script to copy a repository from squeaksource to smalltalkhub?
It would be good to host it on stub itself for safekeeping... ----- Cheers, Sean -- View this message in context: http://forum.world.st/copyscript-from-squeaksource-to-smalltalkhub-tp4734185... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On Sat, Jan 04, 2014 at 07:37:36PM +0100, Hilaire Fernandes wrote:
Le 04/01/2014 19:11, Johan Brichau a ?crit :
Hi,
Does anyone still have the script to copy a repository from squeaksource to smalltalkhub?
thx Johan
Last time I saw was in the welcome page of the squeaksource.com web site.
Here is the script that was on the squeaksource.com welcome page. Dave ------------------------------------------------------------------------ | 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"
Hi johan you have them in the gofer book chapter here are some that I tweak. Stef | go repo | go := Gofer new. repo := MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo30' user: 'StephaneDucasse' password: ''. go repository: repo. "#('Nautilus' 'NautilusCommon' 'NautilusRefactoring' 'GroupManager' 'GroupManagerUI') do: [ :nam| " ((go allResolved select: [ :each | '*GroupManager*' match: each packageName]) groupedBy: #packageName) keys do: [ :pack | pack crLog. go package: pack ; fetch] | goin goout repo | goin := Gofer new. goin squeaksource3: 'Pharo20'. goin package: 'BLB'; fetch. goout := Gofer new. repo := MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo20' user: 'StephaneDucasse' password: ''. goout repository: repo. go := Gofer new. go repository: repo. (((FileSystem disk workingDirectory / 'package-cache') allFiles select: [:each | '*.mcz' match: each basename]) groupedBy: [:each | (each base copyUpToLast: $-) ]) keys do: [ :name | name crLog. go package: name; push] | goin goout repo | goin := Gofer new. goin squeaksource3: 'Pharo14'. goout := Gofer new. repo := MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo14' user: 'StephaneDucasse' password: 'sn00py_papa'. goout repository: repo. #( S T U V W X Y Z) do: [ :nam | 'FETCHING' crLog. (goin allResolved select: [ :each | nam, '*' match: each packageName]) do: [ :pack | self crLog: pack packageName. goin package: pack packageName; fetch].]. ====================================================================================================== | goin goout repo |goin := Gofer new. goin squeaksource3: 'Pharo14'. goout := Gofer new. repo := MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo14' user: 'StephaneDucasse' password: 'sn00py_papa'. goout repository: repo. 'FETCHING' crLog. (goin allResolved select: [ :each | 'S*' match: each packageName]) do: [ :pack | self crLog: pack name. goin package: pack packageName; fetch] ===================================================================================================== | goin goout repo | goin := Gofer new. goin squeaksource3: 'Pharo14'. goout := Gofer new. repo := MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo14' user: 'StephaneDucasse' password: ''. goout repository: repo. #(A B C D E F G H IJ K L M N O P Q R S T U V W X Y Z) do: [ :nam | 'FETCHING' crLog. (goin allResolved select: [ :each | nam, '*' match: each packageName]) do: [ :pack | self crLog: pack packageName. goin package: pack packageName; fetch].].
participants (5)
-
David T. Lewis -
Hilaire Fernandes -
Johan Brichau -
Sean P. DeNigris -
Stéphane Ducasse