10

コンテキストは次のとおりです
。パッケージには、いくつかのリポジトリで開発されたいくつかのブランチがありました

  • きしむソース
  • source.squeak.org/trunk

開発は source.squeak.org で停止しました。目標は、単一のリポジトリですべてのバージョンを公開するために、ブランチを squeaksource に戻すことです。
しかし、人間のブラウジングとブランチの迅速な識別を容易にするために、squeaksource copy の名前に標準のブランチ識別を追加したいと考えています。
この操作を自動化する方法はありますか? たぶんゴーファーと?

4

2 に答える 2

7

Monticelloパッケージは不変です。バージョンは簡単に移動できますが、ファイルの名前を変更しないでください。そうすると、履歴が壊れて、バージョンツリー内のバージョンや他の人の貢献をマージする機能が失われます。

パッケージAのすべてのバージョンをソースURLからターゲットURLに移動するには、次を使用できます。

Gofer new
   repository: 'source url';
   package: 'A';
   fetch

" If you understand the concequences you could rename/rebranch the version files in your package-cache at this point. "

Gofer new
   repository: 'target url';
   package: 'A';
   push
于 2012-06-06T06:11:47.023 に答える
3

以降の Monticello パッケージのシリアル化と逆シリアル化を回避する、より難解なソリューションです。これは非常に大きなリポジトリに役立ち、コピーをかなり高速化します。

| sourceRepositoryUrl destinationRepositoryUrl files |

repositoryUrl := 'http://www.squeaksource.com/PROJECT'.
destinationRepositoryUrl := 'http://smalltalkhub.com/mc/USER/PROJECT/main'.

files := (MCHttpRepository new 
    parseFileNamesFromStream: (ZnClient new get: repositoryUrl; entity) readStream)
    select: [ :each | ZnMonticelloServerDelegate new isValidMczName: each ].

files do: [ :fileName ||entity stream|

    Transcript show: fileName; cr.
    "download version"
    entity := ZnClient new
    beOneShot;
        url: repositoryUrl;
        addPath: fileName;
        get;
        entity.

    "upload the version to gemstone"
    ZnClient new
        beOneShot;
        ifFail: [ :exception | Transcript show: fileName; show: ' '; print: exception ];
        username: 'USER' password: 'PASSWORD';
        entity: entity;
        url: destinationRepositoryUrl;
        addPath: fileName;
        put ]
displayingProgress: [ :fileName| 'Copying ', fileName]
于 2012-06-06T13:14:39.363 に答える