[ANN] GitFileTree with no git command line at all
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
Great stuff Thierry! On 30.01.2014, at 11:12, Goubier Thierry <thierry.goubier@cea.fr> 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
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 <thierry.goubier@cea.fr> 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
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
On Thu, Jan 30, 2014 at 11:12 AM, Goubier Thierry <thierry.goubier@cea.fr> 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
Le 30/01/2014 11:42, Damien Cassou a écrit :
On Thu, Jan 30, 2014 at 11:12 AM, Goubier Thierry <thierry.goubier@cea.fr> 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
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.
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
It rely on OSProcess for Mac and Linux to call the appropriate git commands. Thierry ________________________________________ De : Pharo-dev [pharo-dev-bounces@lists.pharo.org] de la part de Philippe Marschall [philippe.marschall@netcetera.ch] Date d'envoi : vendredi 31 janvier 2014 12:15 Ã : pharo-dev@lists.pharo.org 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
participants (8)
-
Damien Cassou -
Esteban Lorenzano -
GOUBIER Thierry -
Goubier Thierry -
Max Leske -
Pharo4Stef -
Philippe Marschall -
Torsten Bergmann