Thanks for NewVersionBrowser
Hi All, while porting AltBrowser to Pharo4, I had to change my code from the old VersionsBrowser to the NewVersionBrowser based on Spec (for the Git-based method version browser). And I must say: thanks ! The NewVersionBrowser is so easy to extend to use MCMethodDefinitions instead of ChangeRecords, it's like a dream... Being able to wipe out so much ugly unnecessary code :) Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
On Thu, Jul 10, 2014 at 5:14 PM, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Hi All,
while porting AltBrowser to Pharo4, I had to change my code from the old VersionsBrowser to the NewVersionBrowser based on Spec (for the Git-based method version browser).
And I must say: thanks !
The NewVersionBrowser is so easy to extend to use MCMethodDefinitions instead of ChangeRecords, it's like a dream... Being able to wipe out so much ugly unnecessary code :)
Nice! how can we try this version browser? I'm interested. I used this script to load development version of AltBrowser in Pharo4: Gofer new url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main'; configurationOf: 'AltBrowser'; loadDevelopment. With Jean-Baptiste we pair-programmed a "revision walker" for libgit2. It should provide what's needed to browse versions in a git repository via the libgit2 bindings. Anyway, the code is still so ugly code that I didn't commit it. It's in the todo after writing a couple of tests... Regards, MartÃn
________________________________ De : Pharo-dev [pharo-dev-bounces@lists.pharo.org] de la part de Martin Dias [tinchodias@gmail.com] Envoyé : lundi 14 juillet 2014 21:23 à : Pharo Development List Objet : Re: [Pharo-dev] Thanks for NewVersionBrowser Nice! how can we try this version browser? I'm interested. I used this script to load development version of AltBrowser in Pharo4: Gofer new url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo40/main'; configurationOf: 'AltBrowser'; loadDevelopment. If this script works, then you just need to browse (with AltBrowser) a method from a package where one of the repositories at least is a GitFileTree, and ask for the versions. A good candidate I use is AltBrowser class>>defaultPackageCategoriesNames, because it has a long history. Note that this version browser displays both the Changes versions and the git versions, but doesn't try to order them in time (it considers the changes as more recent, that is all) or detect duplicates between the changes and the git. With Jean-Baptiste we pair-programmed a "revision walker" for libgit2. It should provide what's needed to browse versions in a git repository via the libgit2 bindings. Anyway, the code is still so ugly code that I didn't commit it. It's in the todo after writing a couple of tests... This is great news. I was allways wondering how hard (or how easy) it would be to replace some of the code which uses OSProcess + git to a direct, lower-level access via libgit2. For the version browser type of queries, there is an API entry in MCFileTreeGitRepository>>gitVersionsForDefinition: aMCDefinition in: aPackageName which uses git log, and then MCFileTreeGitStReader>>zipForDefinition: which loads the method and class properties for a specific commit ID via git archive. If you managed to track method renames through libgit2, that would be a great feature, because I couldn't: git gives me a commit ID, but I don't know how to get the renamed method file :( At times, I really felt alone doing that :( Great to see others looking at it too. Thierry Regards, MartÃn
participants (3)
-
GOUBIER Thierry -
Goubier Thierry -
Martin Dias