2016-04-12 11 views
3

パッケージ名を指定すると、指定された日付に最新のバージョンのパッケージをロードする方法を探しています。例えばPharoの指定された日付のパッケージをロードする

HypotheticalClassLoader loadPackage: 'Athens-Core' onDate: ('12.03.2015' asDate). 

は、最初の2015年3月12日より古い「アテネコア」のコミットをロードします。

答えて

2

次のスクリプトはどうですか。それは、指定された日付の前に最初のバージョンを検出する必要があります。

goferReferences := Gofer new 
    url: 'http://smalltalkhub.com/mc/Pharo/Athens/main'; 
    package: 'Athens-Core' 
    constraint: [ :goferReference | 
     goferReference version info date < '12 June 2015' asDate]; 
    resolved. 

goferReferences ifNotNil: [ 
    Gofer new 
     url: 'http://smalltalkhub.com/mc/Pharo/Athens/main'; 
     version: goferReferences first name; 
     load ] 
関連する問題