[Pharo-project] Git API for Pharo
Hello, I need to access a Git repository programmatically from Pharo. Is there any API to work with Git working copies, access and manipulate repositories programmatically? In short I need to checkout each revision of a project and extract some meta-data from each revision. Thanks in advance, Roberto
On Nov 7, 2012, at 9:08 AM, roberto.minelli@usi.ch wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
if you find it we need that too :) Stef
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
Hi Roberto Yes, there is, but it is work in progress. Try this in Pharo 1.4 or 2.0: Gofer new repository: 'http://ss3.gemstone.com/ss/FileSystem-Git'; package: 'FileSystem-Git'; package: 'System-Hashing'; load. If you need any help, there's a dedicated mailing list: smalltalk-git@googlegroups.com. Cheers, Max On 07.11.2012, at 09:08, "roberto.minelli@usi.ch" <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
Hi Max, Thanks for pointing me in this direction. I tried to install what you proposed in a clean Pharo 1.4 image, but I got a MessageNotUnderstood: ByteString>>golferReferences. Any hint? Cheers, Roberto On Nov 7, 2012, at 9:35 AM, Max Leske <maxleske@gmail.com> wrote:
Hi Roberto
Yes, there is, but it is work in progress. Try this in Pharo 1.4 or 2.0:
Gofer new repository: 'http://ss3.gemstone.com/ss/FileSystem-Git'; package: 'FileSystem-Git'; package: 'System-Hashing'; load.
If you need any help, there's a dedicated mailing list: smalltalk-git@googlegroups.com.
Cheers, Max
On 07.11.2012, at 09:08, "roberto.minelli@usi.ch" <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
On Wed, Nov 7, 2012 at 10:08 AM, roberto.minelli@usi.ch <roberto.minelli@usi.ch> wrote:
I tried to install what you proposed in a clean Pharo 1.4 image, but I got a MessageNotUnderstood: ByteString>>golferReferences.
you may try changing golferReferences to goferReferences -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Weird typo⦠Otherwise you can try this: 1. create a new Monticello repo with the following: MCHttpRepository location: 'http://ss3.gemstone.com/ss/FileSystem-Git' user: '' password: '' 2. open this repository and load the latest versions of FileSystem-Git and SystemHashing BTW: theres a tutorial in the help (after you've loaded the packages), so go to World menu -> Help -> Help Browser Max On 07.11.2012, at 10:23, Damien Cassou <damien.cassou@gmail.com> wrote:
On Wed, Nov 7, 2012 at 10:08 AM, roberto.minelli@usi.ch <roberto.minelli@usi.ch> wrote:
I tried to install what you proposed in a clean Pharo 1.4 image, but I got a MessageNotUnderstood: ByteString>>golferReferences.
you may try changing golferReferences to goferReferences
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Thanks Max, this worked. Now I'll look at the tutorial in the help page. Cheers, Roberto On Nov 7, 2012, at 10:59 AM, Max Leske <maxleske@gmail.com> wrote:
Weird typoâ¦
Otherwise you can try this: 1. create a new Monticello repo with the following: MCHttpRepository location: 'http://ss3.gemstone.com/ss/FileSystem-Git' user: '' password: '' 2. open this repository and load the latest versions of FileSystem-Git and SystemHashing
BTW: theres a tutorial in the help (after you've loaded the packages), so go to World menu -> Help -> Help Browser
Max
On 07.11.2012, at 10:23, Damien Cassou <damien.cassou@gmail.com> wrote:
On Wed, Nov 7, 2012 at 10:08 AM, roberto.minelli@usi.ch <roberto.minelli@usi.ch> wrote:
I tried to install what you proposed in a clean Pharo 1.4 image, but I got a MessageNotUnderstood: ByteString>>golferReferences.
you may try changing golferReferences to goferReferences
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Another nice example is the GitFSCK reimplementation we did. Albeit a bit more complex it will show you how to traverse a repository and extract certain information. (so maybe look at that a bit later ;) On 2012-11-07, at 11:12, roberto.minelli@usi.ch wrote:
Thanks Max, this worked.
Now I'll look at the tutorial in the help page.
Cheers, Roberto
On Nov 7, 2012, at 10:59 AM, Max Leske <maxleske@gmail.com> wrote:
Weird typoâ¦
Otherwise you can try this: 1. create a new Monticello repo with the following: MCHttpRepository location: 'http://ss3.gemstone.com/ss/FileSystem-Git' user: '' password: '' 2. open this repository and load the latest versions of FileSystem-Git and SystemHashing
BTW: theres a tutorial in the help (after you've loaded the packages), so go to World menu -> Help -> Help Browser
Max
On 07.11.2012, at 10:23, Damien Cassou <damien.cassou@gmail.com> wrote:
On Wed, Nov 7, 2012 at 10:08 AM, roberto.minelli@usi.ch <roberto.minelli@usi.ch> wrote:
I tried to install what you proposed in a clean Pharo 1.4 image, but I got a MessageNotUnderstood: ByteString>>golferReferences.
you may try changing golferReferences to goferReferences
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Hi Max, At the end of the day I managed to install and use FileSystem-Git. I was not able to run the quick start guide in the help browser, but i managed to run the ** Working with repositories ** guide. However, I encountered a weird error. Here are the steps to reproduce: 1. Clone an existing Git repo (git clone https://github.com/aptana/studio3.git) 2. Execute the following snippet: repoReference := FileSystem disk root resolve: '/Users/roby/Documents/University/repository'. repo := FileSystemGitRepository on: repoReference. The error is the following: Error: Invalid utf8 input detected I investigated and discovered that this is somehow related to how the 'git clone' creates the repository. In fact, if you create a Git repo on your machine the above lines of code works just fine. FYI I'm running Pharo 2.0 on a 64-bit MacBook Pro (Mac OS X 10.8.2). Do you have any suggestion for that? Anyone experienced this problem? Thanks in advance, Roberto On Nov 7, 2012, at 10:59 AM, Max Leske <maxleske@gmail.com> wrote:
Weird typoâ¦
Otherwise you can try this: 1. create a new Monticello repo with the following: MCHttpRepository location: 'http://ss3.gemstone.com/ss/FileSystem-Git' user: '' password: '' 2. open this repository and load the latest versions of FileSystem-Git and SystemHashing
BTW: theres a tutorial in the help (after you've loaded the packages), so go to World menu -> Help -> Help Browser
Max
I'll move this thread to the smalltalk-git mailing list and respond there. On 07.11.2012, at 17:35, roberto.minelli@usi.ch wrote:
Hi Max,
At the end of the day I managed to install and use FileSystem-Git.
I was not able to run the quick start guide in the help browser, but i managed to run the ** Working with repositories ** guide.
However, I encountered a weird error. Here are the steps to reproduce:
1. Clone an existing Git repo (git clone https://github.com/aptana/studio3.git) 2. Execute the following snippet: repoReference := FileSystem disk root resolve: '/Users/roby/Documents/University/repository'. repo := FileSystemGitRepository on: repoReference.
The error is the following: Error: Invalid utf8 input detected
I investigated and discovered that this is somehow related to how the 'git clone' creates the repository. In fact, if you create a Git repo on your machine the above lines of code works just fine.
FYI I'm running Pharo 2.0 on a 64-bit MacBook Pro (Mac OS X 10.8.2).
Do you have any suggestion for that? Anyone experienced this problem?
Thanks in advance, Roberto
On Nov 7, 2012, at 10:59 AM, Max Leske <maxleske@gmail.com> wrote:
Weird typoâ¦
Otherwise you can try this: 1. create a new Monticello repo with the following: MCHttpRepository location: 'http://ss3.gemstone.com/ss/FileSystem-Git' user: '' password: '' 2. open this repository and load the latest versions of FileSystem-Git and SystemHashing
BTW: theres a tutorial in the help (after you've loaded the packages), so go to World menu -> Help -> Help Browser
Max
On 7 November 2012 06:23, Damien Cassou <damien.cassou@gmail.com> wrote:
On Wed, Nov 7, 2012 at 10:08 AM, roberto.minelli@usi.ch <roberto.minelli@usi.ch> wrote:
I tried to install what you proposed in a clean Pharo 1.4 image, but I got a MessageNotUnderstood: ByteString>>golferReferences.
you may try changing golferReferences to goferReferences
noooo! keep golfer! i like the name :)
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
-- Best regards, Igor Stasenko.
Igor Stasenko wrote
you may try changing golferReferences to goferReferences noooo! keep golfer! i like the name :)
+1 :) -- View this message in context: http://forum.world.st/Git-API-for-Pharo-tp4654219p4654383.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
We have a almost 100% working git library for the low-level api. We have the git:// and dumb http:// protocol almost fully defined, we still miss smart http://. The only thing we cannot do yet properly is cloning a repository, but that can be easily scripted with OSProcess. The latest sources with plenty of tests are available here: http://ss3.gemstone.com/ss/FSGit-Experimental.html On 2012-11-07, at 09:08, "roberto.minelli@usi.ch" <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
There is also no support for working copies (i.e. we track changes in the image at the moment but command-line Git won't know about it). That's the wrong repo Camillo :) Use the Filesystem-Git repository I pointed you to. Max On 07.11.2012, at 09:36, Camillo Bruni <camillobruni@gmail.com> wrote:
We have a almost 100% working git library for the low-level api. We have the git:// and dumb http:// protocol almost fully defined, we still miss smart http://.
The only thing we cannot do yet properly is cloning a repository, but that can be easily scripted with OSProcess.
The latest sources with plenty of tests are available here: http://ss3.gemstone.com/ss/FSGit-Experimental.html
On 2012-11-07, at 09:08, "roberto.minelli@usi.ch" <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
On 2012-11-07, at 09:45, Max Leske <maxleske@gmail.com> wrote:
There is also no support for working copies (i.e. we track changes in the image at the moment but command-line Git won't know about it).
That's the wrong repo Camillo :)
dammit! :D we should delete the old ones then, it's such a mess I never know where to look..
Use the Filesystem-Git repository I pointed you to.
Max
On 07.11.2012, at 09:36, Camillo Bruni <camillobruni@gmail.com> wrote:
We have a almost 100% working git library for the low-level api. We have the git:// and dumb http:// protocol almost fully defined, we still miss smart http://.
The only thing we cannot do yet properly is cloning a repository, but that can be easily scripted with OSProcess.
The latest sources with plenty of tests are available here: http://ss3.gemstone.com/ss/FSGit-Experimental.html
On 2012-11-07, at 09:08, "roberto.minelli@usi.ch" <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
Agreed. But we should make sure that we keep the old packages. Just to be sure. On 07.11.2012, at 09:46, Camillo Bruni <camillobruni@gmail.com> wrote:
On 2012-11-07, at 09:45, Max Leske <maxleske@gmail.com> wrote:
There is also no support for working copies (i.e. we track changes in the image at the moment but command-line Git won't know about it).
That's the wrong repo Camillo :)
dammit! :D we should delete the old ones then, it's such a mess I never know where to look..
Use the Filesystem-Git repository I pointed you to.
Max
On 07.11.2012, at 09:36, Camillo Bruni <camillobruni@gmail.com> wrote:
We have a almost 100% working git library for the low-level api. We have the git:// and dumb http:// protocol almost fully defined, we still miss smart http://.
The only thing we cannot do yet properly is cloning a repository, but that can be easily scripted with OSProcess.
The latest sources with plenty of tests are available here: http://ss3.gemstone.com/ss/FSGit-Experimental.html
On 2012-11-07, at 09:08, "roberto.minelli@usi.ch" <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
On 7 November 2012 08:08, roberto.minelli@usi.ch <roberto.minelli@usi.ch> wrote:
Hello,
I need to access a Git repository programmatically from Pharo.
Is there any API to work with Git working copies, access and manipulate repositories programmatically?
In short I need to checkout each revision of a project and extract some meta-data from each revision.
Thanks in advance, Roberto
Gitocello (https://github.com/timfel/gitocello) will do a lot of what you ask, and anything extra will be easy to add if you follow the examples of what's already there. I doubt it'd be as shiny and complete as Camillo et al's work, but it might be good enough for now. frank
participants (8)
-
Camillo Bruni -
Damien Cassou -
Esteban A. Maringolo -
Frank Shearar -
Igor Stasenko -
Max Leske -
roberto.minelli@usi.ch -
Stéphane Ducasse