[Pharo-dev] [ANN] Iceberg 0.6 released

Esteban Lorenzano estebanlm at gmail.com
Fri Oct 6 14:08:50 EDT 2017


> On 6 Oct 2017, at 20:05, Stephane Ducasse <stepharo.self at gmail.com> wrote:
> 
> Hi esteban
> 
> I did not find the script that you mentioned.

the one for filetree to tonel?

https://github.com/pharo-vcs/tonel/blob/master/MigrateFromFileTree.md <https://github.com/pharo-vcs/tonel/blob/master/MigrateFromFileTree.md>

I will copy here:

locationDir := 'path/to/your/repo' asFileReference.
subDir := 'your-source-dir-or-empty'.
sourceDir := locationDir.
subDir 
	ifNotNil: [
		subDirWithDelim := subDir, '/'. 
		sourceDir := sourceDir / subDir ]
	ifNil: [
		subDirWithDelim := '' ].

repo := IceRepositoryCreator new 
	location: locationDir;
	subdirectory: subDir;
	createRepository.

"branch if you want to perform the migration on separated place (you can later do a PR)"
repo createBranch: 'migrate-sources-to-tonel'.

commit := repo branch lastCommit.
repo savedPackages do: [ :each | | filetreePackage |
	TonelWriter fileOut: (commit versionFor: each) on: sourceDir.
	filetreePackage := IceLibgitFiletreeWriter directoryNameFor: each.
	(sourceDir / filetreePackage) ensureDeleteAll.
	 repo addFilesToIndex: { 
		subDirWithDelim, (IceLibgitTonelWriter directoryNameFor: each).
		subDirWithDelim, (IceLibgitFiletreeWriter directoryNameFor: each). } ].

repo addProperties: (IceRepositoryProperties fromDictionary: { #format -> #tonel } asDictionary).

repo 
	commitIndexWithMessage: 'sources migrated' 
	andParents: { commit }.
	
repo push.



> 
> Stef
> 
> On Fri, Oct 6, 2017 at 7:18 PM, Esteban Lorenzano <estebanlm at gmail.com> wrote:
>> Hi all,
>> 
>> I released Iceberg version 0.6. It includes a lot of small tweaks and fixes,
>> but the most important inclusion is tonel file format which aims to replace
>> file tree.
>> 
>> What is Tonel? (https://github.com/pharo-vcs/tonel)
>> Tonel is a file-per-class file format for monticello repositories. It’s
>> purpose is to reduce the amount of files touched each operation, make the IO
>> faster an compact the repositories database.
>> It has also as an objective to offer an “easy-to-read” format, so people
>> wanting to understand a chunk of code will recognise it easily.
>> For testing, I migrated several of my projects to Tonel and I’ve been using
>> it, you can see some as examples:
>> 
>> https://github.com/estebanlm/MUDClient
>> https://github.com/estebanlm/pharo-tonel (this was just an example and it
>> has some minimal errors already fixed)
>> 
>> We plan to migrate Pharo development to tonel to address some problems we
>> have:
>> 
>> - since it has to read/write a lot of files, IO operations are slow
>> - and even much more slow in Windows
>> - Windows also has a problem with longpaths.
>> 
>> Iceberg 0.6 will be integrated to Pharo7 soon :)
>> To update Pharo 6.1, there are instructions in the readme:
>> https://github.com/pharo-vcs/iceberg/blob/master/README.md
>> now, if you wan to migrate your projects to Tonel (from FileTree), here is a
>> script you can use:
>> https://github.com/pharo-vcs/tonel/blob/master/MigrateFromFileTree.md
>> 
>> btw, tonel is independent of Iceberg and can be used with plain Monticello
>> (but it is a metadaless format, history will reside on git, not on
>> monticello).
>> 
>> cheers,
>> Esteban
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171006/df918330/attachment-0002.html>


More information about the Pharo-dev mailing list