2013-07-03 18 views

回答

2

您可以使用Gofer自動化您的Monticello任務。

Gofer new 
    package: 'MyProject-Core'; 
    package: 'MyProject-Tests'; 
    url: 'http://smalltalkhub.com/mc/USER/MyProject/main/' username: 'USER' password: '***'; 
    push. 
5

在「深入菲羅」新的免費書籍的GOFER章(由例如兩個菲羅 - http://rmod.lille.inria.fr/pbe2/)我詳細介紹GOFER。具體來說,我提出了一些在版本庫之間遷移的方法
Gofer的默認值是抓取和拉取,基於此您可以輕鬆構建同步。

例如,如果您使用的Smalltalk樞紐

Gofer new 
    smalltalkhubUser: 'PharoBooks' project: 'GoferExample'; 
    package: 'PBE2GoferExample'; 
    package: 'PBE2GoferExampleSecondPackage'; 
    push. 
Gofer new 
    smalltalkhubUser: 'PharoBooks' project: 'GoferExample'; 
    package: 'PBE2GoferExample'; 
    package: 'PBE2GoferExampleSecondPackage'; 
    fetch 

您還可以得到一些信息如下

((Gofer new 
    smalltalkhubUser: 'Pharo' project: 'NativeBoost'; allResolved) 
    groupedBy: [ :each | each packageName]) 

現在,您還可以遷移

| go | 
go := Gofer new squeaksource3: 'Pharo20'. 
go allResolved 
    do: [ :each | self crLog: each packageName. 
     go package: each packageName; 
     fetch] 

然後,一旦你得到的您可以將本地目錄中的文件推送到另一個存儲庫。

| 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] 
相關問題