In the Gofer chapter of the "deep into pharo" new free book (pharo by example two - http://rmod.lille.inria.fr/pbe2/.) I presented Gofer in details. In particular I present some ways to migrate between repositories
The default for Gofer is fetch and pull, based on that you can easily build sync.
For example if you use Smalltalk hub
Gofer new
smalltalkhubUser: 'PharoBooks' project: 'GoferExample';
package: 'PBE2GoferExample';
package: 'PBE2GoferExampleSecondPackage';
push.
Gofer new
smalltalkhubUser: 'PharoBooks' project: 'GoferExample';
package: 'PBE2GoferExample';
package: 'PBE2GoferExampleSecondPackage';
fetch
You can also obtain some information as follows
((Gofer new
smalltalkhubUser: 'Pharo' project: 'NativeBoost'; allResolved)
groupedBy: [ :each | each packageName])
Now you can also migrate
| go |
go := Gofer new squeaksource3: 'Pharo20'.
go allResolved
do: [ :each | self crLog: each packageName.
go package: each packageName;
fetch]
Then once you get the files in your local directory you can push to another repository.
| go |
go := Gofer new.
go repository: (MCHttpRepository
location: 'http://ss3.gemtalksystems.com/ss/rb-pharo'
user: 'pharoUser'
password: 'pharoPwd').
(((FileSystem disk workingDirectory / 'package-cache') allFiles
select: [:each | '*.mcz' match: each basename])
groupedBy: [:each | (each base copyUpToLast: $-) ]) keys
do: [:name | go package: name; push]