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"