________________________________
De : Pharo-dev [[email protected]] de la part de Martin Dias
[[email protected]]
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