[ANN] GitFileTree with no git command line at all

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] GitFileTree with no git command line at all

Goubier Thierry
Hi all,

I'm announcing a GitFileTree for Pharo3.0 version with full support for
working from github (and probably all other git remote repositories such
as bitbucket) without touching any git command line, for Linux and Mac
at least (and Windows as soon as someone on windows will write the two
or three lines necessary to use the OSWindows extension).

In short, give gitfiletree: a full url to a github project and a few
other parameters, and it will do :
- clone the repo from github
- set it up as you asked for (branch and all)
- create the right local MC repository
and load whatever you want from a configuration or a Gofer script.

Example :
        MCFileTreeGitRepository fromZnUrl: (ZnUrl fromString:
'gitfiletree://github.com/ThierryGoubier/filetree.git?protocol=git&dir=repository&branch=pharo3.0'
).
        Creates a MC repository on a git clone of
github.com/ThierryGoubier/filetree.git,
        on branch pharo3.0
        stored in a directory named filetree under the Pharo working directory,
        and pointing to the repository/ subdirectory where the filetree
packages  are kept.

It is possible to add a readOnly parameter to the url: in this case, the
git clone is done with a depth of 1 and the repository disable pull and
push.

For configurations of a project on github, it becomes possible to ensure
a load of ConfigurationOfGitFileTree and then use a gitfiletree url to
clone, setup the local repository and load the package, as is done in
the latest ConfigurationOfAltBrowser.

For newcomers to git and Pharo interested in github, the process is simply:
- create a project in github
        - don't forget to register your ssh key (see the doc at github)
- install the configuratonOfGitFileTree in Pharo, either with the
ConfigurationBrowser or with:
Gofer new
        url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main';
        configurationOf: 'GitFileTree';
        loadStable.
- Add a Git remote repository
        location: the ssh clone URL from github

- you can then start to create packages and save them into that
repository. To propagate changes to github, open the repository and
select Push. To update your local copy from github, open the repository
and select Pull. If you are a git regular user, you can keep your usual
workflow with git and gitfiletree will keep up with you.
       
Enjoy!

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

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Max Leske
Great stuff Thierry!


On 30.01.2014, at 11:12, Goubier Thierry <[hidden email]> wrote:

> Hi all,
>
> I'm announcing a GitFileTree for Pharo3.0 version with full support for working from github (and probably all other git remote repositories such as bitbucket) without touching any git command line, for Linux and Mac at least (and Windows as soon as someone on windows will write the two or three lines necessary to use the OSWindows extension).
>
> In short, give gitfiletree: a full url to a github project and a few other parameters, and it will do :
> - clone the repo from github
> - set it up as you asked for (branch and all)
> - create the right local MC repository
> and load whatever you want from a configuration or a Gofer script.
>
> Example :
> MCFileTreeGitRepository fromZnUrl: (ZnUrl fromString: 'gitfiletree://github.com/ThierryGoubier/filetree.git?protocol=git&dir=repository&branch=pharo3.0' ).
> Creates a MC repository on a git clone of github.com/ThierryGoubier/filetree.git,
> on branch pharo3.0
> stored in a directory named filetree under the Pharo working directory,
> and pointing to the repository/ subdirectory where the filetree packages  are kept.
>
> It is possible to add a readOnly parameter to the url: in this case, the git clone is done with a depth of 1 and the repository disable pull and push.
>
> For configurations of a project on github, it becomes possible to ensure a load of ConfigurationOfGitFileTree and then use a gitfiletree url to clone, setup the local repository and load the package, as is done in the latest ConfigurationOfAltBrowser.
>
> For newcomers to git and Pharo interested in github, the process is simply:
> - create a project in github
> - don't forget to register your ssh key (see the doc at github)
> - install the configuratonOfGitFileTree in Pharo, either with the ConfigurationBrowser or with:
> Gofer new
> url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main';
> configurationOf: 'GitFileTree';
> loadStable.
> - Add a Git remote repository
> location: the ssh clone URL from github
>
> - you can then start to create packages and save them into that repository. To propagate changes to github, open the repository and select Push. To update your local copy from github, open the repository and select Pull. If you are a git regular user, you can keep your usual workflow with git and gitfiletree will keep up with you.
>
> Enjoy!
>
> 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
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

EstebanLM
In reply to this post by Goubier Thierry
supercool Thierry, thank you very much :)
I suppose we should integrate this to early Pharo4 (we then can check how to improve, if needed) :))

Esteban

On 30 Jan 2014, at 11:12, Goubier Thierry <[hidden email]> wrote:

> Hi all,
>
> I'm announcing a GitFileTree for Pharo3.0 version with full support for working from github (and probably all other git remote repositories such as bitbucket) without touching any git command line, for Linux and Mac at least (and Windows as soon as someone on windows will write the two or three lines necessary to use the OSWindows extension).
>
> In short, give gitfiletree: a full url to a github project and a few other parameters, and it will do :
> - clone the repo from github
> - set it up as you asked for (branch and all)
> - create the right local MC repository
> and load whatever you want from a configuration or a Gofer script.
>
> Example :
> MCFileTreeGitRepository fromZnUrl: (ZnUrl fromString: 'gitfiletree://github.com/ThierryGoubier/filetree.git?protocol=git&dir=repository&branch=pharo3.0' ).
> Creates a MC repository on a git clone of github.com/ThierryGoubier/filetree.git,
> on branch pharo3.0
> stored in a directory named filetree under the Pharo working directory,
> and pointing to the repository/ subdirectory where the filetree packages  are kept.
>
> It is possible to add a readOnly parameter to the url: in this case, the git clone is done with a depth of 1 and the repository disable pull and push.
>
> For configurations of a project on github, it becomes possible to ensure a load of ConfigurationOfGitFileTree and then use a gitfiletree url to clone, setup the local repository and load the package, as is done in the latest ConfigurationOfAltBrowser.
>
> For newcomers to git and Pharo interested in github, the process is simply:
> - create a project in github
> - don't forget to register your ssh key (see the doc at github)
> - install the configuratonOfGitFileTree in Pharo, either with the ConfigurationBrowser or with:
> Gofer new
> url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main';
> configurationOf: 'GitFileTree';
> loadStable.
> - Add a Git remote repository
> location: the ssh clone URL from github
>
> - you can then start to create packages and save them into that repository. To propagate changes to github, open the repository and select Push. To update your local copy from github, open the repository and select Pull. If you are a git regular user, you can keep your usual workflow with git and gitfiletree will keep up with you.
>
> Enjoy!
>
> 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
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Goubier Thierry


Le 30/01/2014 11:17, Esteban Lorenzano a écrit :
> supercool Thierry, thank you very much :)
> I suppose we should integrate this to early Pharo4 (we then can check how to improve, if needed) :))

That would be great! And testing, jumping on it, crashing it is a good
workout to design the next iteration based on our experience with it.
And don't worry, there is a lot of space for improvements :)

I'm especially happy now to be able to work directly on github with a
single configurationOfMyProject load ;)

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

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Damien Cassou
In reply to this post by Goubier Thierry
On Thu, Jan 30, 2014 at 11:12 AM, Goubier Thierry
<[hidden email]> wrote:
> For configurations of a project on github, it becomes possible to ensure a
> load of ConfigurationOfGitFileTree and then use a gitfiletree url to clone,
> setup the local repository and load the package, as is done in the latest
> ConfigurationOfAltBrowser.


how would you write a configuration for a project on smalltalkhub that
depends on a project on github?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Goubier Thierry


Le 30/01/2014 11:42, Damien Cassou a écrit :

> On Thu, Jan 30, 2014 at 11:12 AM, Goubier Thierry
> <[hidden email]> wrote:
>> For configurations of a project on github, it becomes possible to ensure a
>> load of ConfigurationOfGitFileTree and then use a gitfiletree url to clone,
>> setup the local repository and load the package, as is done in the latest
>> ConfigurationOfAltBrowser.
>
>
> how would you write a configuration for a project on smalltalkhub that
> depends on a project on github?

If I have to load a few packages from the project on github:

add the code to ensure ConfigurationOfGitFileTree is loaded, and then
add a dependency with a gitfiletree url (on the github project) as usual.

To ensure ConfigurationOfGitFileTree, I have modified the project method
in the configuration (right after the bootstrap Metacello...)

project
        ^ project
                ifNil: [
                        | constructor |
                                "Bootstrap Metacello if it is not already loaded"
                        (self class baseConfigurationClassIfAbsent: [  ]) ensureMetacello.
                                "Load gitfiletree support if not already loaded."
                        Smalltalk
                                at: #MCFileTreeGitRepository
                                ifAbsent: [
                                        Gofer new
                                                url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main';
                                                configurationOf: 'GitFileTree';
                                                loadDevelopment ].
                                "Construct Metacello project"
                        project := MetacelloMCProject new projectAttributes: self
customProjectAttributes.
                        constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self
project: project.
                        project loadType: #linear. "change to #atomic if desired"
                        project ]

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

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Torsten Bergmann
There is no MCFileTreeGitRepository(class)>>fromZnUrl: method
when loading cleanly from a config browser in Pharo 3.0 latest.
So your example in the announcement will not work.


I guess this is due to ConfigurationOfGitFileTree-ThierryGoubier.8
in MetaRepoForPharo30 but there is a more recent
"ConfigurationOfGitFileTree-ThierryGoubier.9" which loads the
new package "MonticelloFileTree-Git-ThierryGoubier.51".

Can you please copy the new config to MetaRepoForPharo30...

Thx
T.
 

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Philippe Marschall-2
In reply to this post by Goubier Thierry
On 30.01.14 11:12, Goubier Thierry wrote:

> Hi all,
>
> I'm announcing a GitFileTree for Pharo3.0 version with full support for
> working from github (and probably all other git remote repositories such
> as bitbucket) without touching any git command line, for Linux and Mac
> at least (and Windows as soon as someone on windows will write the two
> or three lines necessary to use the OSWindows extension).
>
> In short, give gitfiletree: a full url to a github project and a few
> other parameters, and it will do :
> - clone the repo from github
> - set it up as you asked for (branch and all)
> - create the right local MC repository
> and load whatever you want from a configuration or a Gofer script.
>
> Example :
>      MCFileTreeGitRepository fromZnUrl: (ZnUrl fromString:
> 'gitfiletree://github.com/ThierryGoubier/filetree.git?protocol=git&dir=repository&branch=pharo3.0'
> ).
>      Creates a MC repository on a git clone of
> github.com/ThierryGoubier/filetree.git,
>      on branch pharo3.0
>      stored in a directory named filetree under the Pharo working
> directory,
>      and pointing to the repository/ subdirectory where the filetree
> packages  are kept.
>
> It is possible to add a readOnly parameter to the url: in this case, the
> git clone is done with a depth of 1 and the repository disable pull and
> push.
>
> For configurations of a project on github, it becomes possible to ensure
> a load of ConfigurationOfGitFileTree and then use a gitfiletree url to
> clone, setup the local repository and load the package, as is done in
> the latest ConfigurationOfAltBrowser.
>
> For newcomers to git and Pharo interested in github, the process is simply:
> - create a project in github
>      - don't forget to register your ssh key (see the doc at github)
> - install the configuratonOfGitFileTree in Pharo, either with the
> ConfigurationBrowser or with:
> Gofer new
>      url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo30/main';
>      configurationOf: 'GitFileTree';
>      loadStable.
> - Add a Git remote repository
>      location: the ssh clone URL from github
>
> - you can then start to create packages and save them into that
> repository. To propagate changes to github, open the repository and
> select Push. To update your local copy from github, open the repository
> and select Pull. If you are a git regular user, you can keep your usual
> workflow with git and gitfiletree will keep up with you.

How does it interact with git? Does it shell out, call a library or have
a full git implementation in Smalltalk?

Cheers
Philippe



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Goubier Thierry
It rely on OSProcess for Mac and Linux to call the appropriate git commands.

Thierry
________________________________________
De : Pharo-dev [[hidden email]] de la part de Philippe Marschall [[hidden email]]
Date d'envoi : vendredi 31 janvier 2014 12:15
À : [hidden email]
Objet : Re: [Pharo-dev] [ANN] GitFileTree with no git command line at all

How does it interact with git? Does it shell out, call a library or have
a full git implementation in Smalltalk?

Cheers
Philippe




Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

pharo4Stef@free.fr
In reply to this post by Philippe Marschall-2
It uses OS Process.


> How does it interact with git? Does it shell out, call a library or have a full git implementation in Smalltalk?
>
> Cheers
> Philippe
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Stephan Eggermont-3
In reply to this post by Goubier Thierry
Hmm, I think it needs a bit more detailed explanation.
- it doesn’t find installed git. It assumes you installed git by loading apple command line developer tools
(instead of brew, or fink)
- after installing them,trying to install SmaCC
'Git error: ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
'
Pharo 30745 on Mac 10.9

Stephan
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Goubier Thierry


Le 06/02/2014 12:05, Stephan Eggermont a écrit :
> Hmm, I think it needs a bit more detailed explanation.
> - it doesn’t find installed git. It assumes you installed git by loading apple command line developer tools
> (instead of brew, or fink)

Hum, good question: it doesn't assumes anything apart from a git command
available in the default path when opening a shell.

I would have expected the open source tools to be up to date on that...

The last version of Mac I used was 10.3

> - after installing them,trying to install SmaCC
> 'Git error: ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
> Host key verification failed.
> fatal: Could not read from remote repository.

You need to register to github.com and record your ssh key. I will look
if a read only access exists; there is some code inside Metacello
(github: urls) but I have no idea about how to use it (and I asked).

Thanks for trying all this :)

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

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] GitFileTree with no git command line at all

Tobias Pape
On 06.02.2014, at 12:58, Goubier Thierry <[hidden email]> wrote:

> Le 06/02/2014 12:05, Stephan Eggermont a écrit :
>> Hmm, I think it needs a bit more detailed explanation.
>> - it doesn’t find installed git. It assumes you installed git by loading apple command line developer tools
>> (instead of brew, or fink)
>
> Hum, good question: it doesn't assumes anything apart from a git command available in the default path when opening a shell.

what should this default path be?
It could be anything on $PATH …

Best
        -Tobias

>
> I would have expected the open source tools to be up to date on that...
>
> The last version of Mac I used was 10.3
>
>> - after installing them,trying to install SmaCC
>> 'Git error: ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
>> Host key verification failed.
>> fatal: Could not read from remote repository.
>
> You need to register to github.com and record your ssh key. I will look if a read only access exists; there is some code inside Metacello (github: urls) but I have no idea about how to use it (and I asked).
>
> Thanks for trying all this :)
>
> Thierry



signature.asc (1K) Download Attachment