Ok, thanks!

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Oct 8, 2014, at 3:25 AM, jannik laval <[email protected]> wrote:

> Hi Alex,
> 
> In 2011, I did an extractor for Monticello and Metacello configuration. It 
> was for another model than Moose.
> I reused and improve your extractor. It can help you:
> 
> MCHttpRepository
>     location: 'http://www.squeaksource.com/VPraxisExporter'
>     user: 'jm'
>     password: ''
> 
> Cheers,
> Jannik
> 
> 2014-10-07 23:21 GMT+02:00 Alexandre Bergel <[email protected]>:
> Thanks! It helps!
> 
> Alexandre
> -- 
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> 
> 
> 
> On Oct 6, 2014, at 1:47 PM, Eliot Miranda <[email protected]> wrote:
> 
>> Hi Alexandre,
>> 
>> On Mon, Oct 6, 2014 at 9:34 AM, Alexandre Bergel <[email protected]> 
>> wrote:
>> Thanks Eliot. I know this. I meant code snippet to programmatically, within 
>> Pharo, do some queries.
>> 
>> Such as?
>>  
>> Some times ago I worked on a MCZ importer in Moose. I will have a look at it.
>> 
>> The key is to ask a repository for the versions it has, get one or more 
>> versions, and create snapshots from these versions:
>> 
>>  
>> e.g. SpurBootstrapMonticelloPackagePatcher in VMMaker.oscog creates patched 
>> versions of packages.  To create a repository, e.g.
>> 
>>      MCRepositoryGroup default repositories 
>>              detect: [:r| r description = url]
>>              ifNone: [MCHttpRepository
>>                                      location: url
>>                                      user: 'squeak'
>>                                      password: 'squeak']
>> 
>> but there's also the package cache:
>> 
>>      MCCacheRepository default
>> 
>> You can ask them what versions they have:
>> 
>>      repository versionNamesForPackageNamed: package name
>> 
>> You can create these versions, and store them:
>> 
>>      (trunk possiblyNewerVersionsOfAnyOf: latestUnbranched) do:
>>                      [:unpatched|
>>                      dest storeVersion: (trunk versionNamed: unpatched)]
>> 
>> And you can create "snapshots" of these versions which contain all the 
>> definitions:
>> 
>>      version: version withPatches: patches for: package
>>              | snapshot ancestry |
>>              snapshot := MCPatcher
>>                                              apply: (self patchForPackage: 
>> package withPatches: patches snapshot: version snapshot)
>>                                              to: version snapshot.
>>              ancestry := MCWorkingAncestry new addAncestor: version info.
>>              ^MCVersion
>>                      package: version package
>>                      info: (ancestry
>>                                      infoWithName: (self 
>> spurBranchNameForInfo: version info package: package)
>>                                      message:        version info name,
>>                                                              ' patched for 
>> Spur by ',
>>                                                              (CCodeGenerator 
>> shortMonticelloDescriptionForClass: self class),
>>                                                              '\\' withCRs,
>>                                                              version info 
>> message)
>>                      snapshot: snapshot
>>                      dependencies: {} "punt on computing dependencies; there 
>> are't any so far"
>> 
>> 
>> HTH
>> 
>> Cheers,
>> Alexandre
>> -- 
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> 
>> 
>> 
>> On Oct 6, 2014, at 1:25 PM, Eliot Miranda <[email protected]> wrote:
>> 
>>> Hi Alexandre,
>>> 
>>>     .mcz's are just zip files.  The attached extracts the .st file as the 
>>> package name with a .st extension instead of a .mcz extension.  
>>> 
>>> HTH
>>> 
>>> On Mon, Oct 6, 2014 at 6:49 AM, Alexandre Bergel <[email protected]> 
>>> wrote:
>>> Hi!
>>> 
>>> Anyone has some code snippet to extract data from .mcz file ?
>>> Getting all the classes, doing some queries...
>>> 
>>> Cheers,
>>> Alexandre
>>> -- 
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> best,
>>> Eliot
>>> <mzex>
>> -- 
>> best,
>> Eliot
> 
> 
> 
> 
> -- 
> ~~Jannik Laval~~
> École des Mines de Douai
> Enseignant-chercheur
> http://www.jannik-laval.eu
> http://www.phratch.com
> http://www.approchealpes.info
> http://car.mines-douai.fr/
> 

Reply via email to