How to get started with Git and Pharo?

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

Re: How to get started with Git and Pharo?

Goubier Thierry


Le 26/06/2014 19:11, Yuriy Tymchuk a écrit :
> I can only suggest you to read my blogpost about configurations and versioning: http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo.html
>
> I usually mix filetree and gitfiletree. Last one is better, because you don’t have to remember to commit in git each time you commit in pharo.
> (Also I think that gitfiletree is not working with Pharo4)

Now it works with Pharo4!

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: How to get started with Git and Pharo?

Uko2

On 27 Jun 2014, at 15:53, Goubier Thierry <[hidden email]> wrote:

>
>
> Le 26/06/2014 19:11, Yuriy Tymchuk a écrit :
>> I can only suggest you to read my blogpost about configurations and versioning: http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo.html
>>
>> I usually mix filetree and gitfiletree. Last one is better, because you don’t have to remember to commit in git each time you commit in pharo.
>> (Also I think that gitfiletree is not working with Pharo4)
>
> Now it works with Pharo4!

Cool. Thanks!

>
> 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: How to get started with Git and Pharo?

stepharo
In reply to this post by Dale Henrichs-3
thank dale. I'm using thunderbid and sometimes I have some mails that I do not see and I have to query explicitly. I will read this full thread and the doc.

stef

On 26/6/14 19:07, Dale Henrichs wrote:
Stef,

My introduction to git came largely from reading "A successful Git branching model"[1]. I tried to think how to map this particular git work flow to Metacello and long story short, decided to adapt Metacello to git:)

It is also probably worth reading "What is a good Git workflow?"[2]. This article is more about how to use GitHub, but frankly the appeal of git to me goes hand in hand with a good collaboration model and GitHub does a good job supporting that.

The first time you read these articles don't pay attention to the details, but try to get the overall flow/functionality and try to draw parallels to the work the you do with Monticello and Metacello ... let the thoughts marinate, ask some questions.

"Pro Git"[3] is a book/web site and would recommend that you take a run through Chapter 2[4] to get a taste of git in action at the command line and virtually everything that you need to know to work on your own with git is covered in this chapter. Chapter 3[5] is on the nitty gritty of branching ... but again at this stage you want to just skim through the docs and get a feel of what is possible ... if something doesn't make sense at this stage ... 
ignore it:)

Now go back to the  "What is a good Git workflow?"[2] paper and read it in detail ... if you see a command/operation that you don't understand google it or look it up in "Pro Git" or ask questions ...

Basically I am recommending that for your first foray into Git and Smalltalk you will be trying to follow the  "What is a good Git workflow?"[2] model.

FileTree allows you save Monticello packages into a git repository, but with FileTree you have to do all of the git commands from the command line. 

I'll let Thierry Goubier describe GitFileTree because I think it that package does a bit of remote control ....

I think that it is possible to most if not all of the git work support into the Smalltalk development environment ... I am doing that for GemStone with tODE[6] and I do find myself going to the go to the command line much less frequently ... but in tODE I have built a git merge tool and a git diff tool ... you can get the git history of a method from the browser, etc. 

Without a relatively high degree of tool integration it can be clunky to use git ... I am very willing to share what I've done/learned in tODE with Pharo tool builders and of course I think Thierry Goubier has actually been ahead of me in several different areas ...

Of course there are other git workflows out there and other git collaboration sites besides GitHub...but is worth keeping things simple at first (I think) and when you have mastered git/github basics both personally and from a tool level, then it is a perfectly good time to start looking at other workflows and tools, because then you are able to make informed judgements ...

HTH,

Dale


On Thu, Jun 26, 2014 at 9:27 AM, stepharo <[hidden email]> wrote:
Hi

I do not know the dif between git file tree, file tree.... and I would like to know how to get
started with git in Pharo?

What should I read?

Stef



Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

stepharo
In reply to this post by EstebanLM
Esteban

My old age taught me to be suspicious when everything is so black and
white. I do not think that everything will be so nice.
And for me git is not github.

Stef

On 26/6/14 20:52, Esteban Lorenzano wrote:

> On 26 Jun 2014, at 14:56, Sven Van Caekenberghe <[hidden email]> wrote:
>
>> On 26 Jun 2014, at 19:07, Dale Henrichs <[hidden email]> wrote:
>>
>>> I think that it is possible to most if not all of the git work support into the Smalltalk development environment ... I am doing that for GemStone with tODE[6] and I do find myself going to the go to the command line much less frequently ... but in tODE I have built a git merge tool and a git diff tool ... you can get the git history of a method from the browser, etc.
>>>
>>> Without a relatively high degree of tool integration it can be clunky to use git ... I am very willing to share what I've done/learned in tODE with Pharo tool builders and of course I think Thierry Goubier has actually been ahead of me in several different areas ...
>> That is my analysis: it works today, 'perfectly', but there is not enough tools support to make it as easy as Monticello as a whole is today.
>>
>> If these tools exist, or we can build them quickly based Dale's code, that would be cool (I guess its all OSProcess underneath, which I find so/so, a direct integration is better) that would be good.
>>
>> Would having this change our world fundamentally ? No, IMHO
>> Is it worth the effort, is the ROI there ? I don't think so
> I disagree here. I think moving our development to git will change deeply (for good) our community processes and then I think it totally worths the effort.
> Of course, important part of the advantages came from the tools around git (like github) more than git itself, but all is one and the same :)
> A couple of examples of what I think will improve our work:
> - pull requests instead SLICES
> - submodules (with different people taking care of them)
> - traceability: you can map an issue with a pull requests directly making it a lot better to query
>
> Then there is other kind of advantages like:
> - better entry-point for newbies to the community (they all expect something like git this days)
> - better visibility
> - confidence. This is subjective but important: companies feel more confident with something like git than a specific tool to keep their sources.
> - we can stop maintaining things like smalltalkhub and important parts of monticello itself and concentrate our efforts in other, more interesting areas
>
> … and there are more.
>
> In conclusion, I think expending time in git integration is one of the best ways to contribute to the develop of Pharo nowadays.
>
> Esteban
>
>> Anyway, it is a delicate subject as it also touches on the representation of the file format.
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

stepharo
In reply to this post by philippeback
I use git for my books. Now the simple fact that a tool has to help me to do simple action is a sign
of strange design. This is the same as Java design and eclipse. When you code without eclipse you will a real pain :)
I found the git API far to low level from my developer perspective and this is what I would like the pharo abstraction to
protect our users (while getting the benefits from git).
And this is why when esteban is telling that this is what newbies expect I cannot believe such kind of statements
because there are simply bullshit. :)

Stef
Stef,

You need to cut your teeth for a decent couple hours to get to terms with Git.
Especially when using a workflow with branches, with merges, and several contributors.
I knew of quite a couple of SCMs (including Hg) but Git is a special beast.

I liked Git Recipes: A Problem Solution Approach as it was very pragmatic.

HTH
Phil


On Thu, Jun 26, 2014 at 7:09 PM, stepharo <[hidden email]> wrote:
I read

http://www.stic.st/wp-content/conferences/2012/Wednesday/1415-Practical_Git_for_Smalltalk-Henrichs.pdf
    and I found
    http://forum.world.st/Pharo-git-td4693999.html

But is there something that works and it simple?

Stef


On 26/6/14 18:27, stepharo wrote:
Hi

I do not know the dif between git file tree, file tree.... and I would like to know how to get
started with git in Pharo?

What should I read?

Stef




Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

stepharo
In reply to this post by Goubier Thierry
thanks

Now is there a tutorial? Beause
http://forum.world.st/Pharo-git-td4693999.html scared me.


On 27/6/14 15:53, Goubier Thierry wrote:

>
>
> Le 26/06/2014 19:11, Yuriy Tymchuk a écrit :
>> I can only suggest you to read my blogpost about configurations and
>> versioning:
>> http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo.html
>>
>> I usually mix filetree and gitfiletree. Last one is better, because
>> you don’t have to remember to commit in git each time you commit in
>> pharo.
>> (Also I think that gitfiletree is not working with Pharo4)
>
> Now it works with Pharo4!
>
> Thierry


Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

sebastianconcept@gmail.co
In reply to this post by stepharo
On Jun 28, 2014, at 5:10 AM, stepharo <[hidden email]> wrote:

And this is why when esteban is telling that this is what newbies expect I cannot believe such kind of statements
because there are simply bullshit. :)

Hey Stef, we can believe that is bullshit all we want and at the end of the day this is what happens:


With the current demand, if you weren’t pitched yet from your github profile is because you’re forcing yourself to stay out of the game

Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

Dale Henrichs-3
In reply to this post by stepharo
Stef,

Git is not perfect. Monticello is not perfect. Metacello is not perfect. GitHub is not perfect.

Git and Github brings some things to the table that make Monticello and Metacello and collaborative development in Smalltalk better...

Half of Metacello - the bit where you must "manually" record the version number for every .mcz file used - one of the most tedious parts - becomes unnecessary with git. With git a Metacello version references a specific commit, tag or branch. 

When we release a version of Seaside3 for GemStone, we just tag a repository and record the tag in the configuration of ... no need for "flattening" or meticulously recording of mcz file versions ... this simple fact by itself is almost enough to make the "complexity of git" worthwhile... Here's the complete version specification for Seaside3.1.1 in the ConfigurationOfSeaside3:

  spec
    for: #'gs3.x'
    do: [ 
      spec
        baseline: 'Seaside3'
        with: [ spec repository: 'github://glassdb/Seaside31:3.1.1-gs31/repository' ] ].

That's it ... done...

95% of my git interactions are:

  git add ...
  git commit ...
  git push ...
  git pull ...


This isn't that complicated to understand ... there are certainly times when it is necessary to use some of the more arcane commands, but frankly there are complicated operations in the Monticello/Metacello universe.

How do you merge two Metacello versions?  
How do you merge changes to multiple mcz files?
How do you fork/branch a large project like Seaside3 and still retain the ability to track changes from the master?

I have done all of these things without git and it is not pretty .... not by a long shot...I wish we did have some arcane commands to help:)

With git, all three of those operations are just part of eco-system...

With github, I can merge a multiple mcz file contribution into my project  ... WITH THE PUSH OF A BUTTON! 

GiHub arranges to run the tests using travis-ci, so before I dare push the button, I can be assured that all of the tests are passing.

Before pushing the button, I can easily review all of the proposed changes and critique the proposed changes on a line by line basis and the contributor and I can engage in an online conversion ... on a line by line basis ...

The contributor can make changes in her repository and they are reflected in the original pull request and the tests are automatically rerun...

When the tests are green and I am satisfied with the review ... I press a button ... and the code is merged into my project and I can go back to work ...

_This_ feature by itself is worth the price of admission for git ...

It takes a bit of time to become comfortable with git, but if you are feeling any of pain that I have mentioned above, then it is worth taking the time to become comfortable with git ...

If you are not feeling that pain, then I envy you:) and by all means ... do not learn git:)

Dale



On Sat, Jun 28, 2014 at 1:10 AM, stepharo <[hidden email]> wrote:
I use git for my books. Now the simple fact that a tool has to help me to do simple action is a sign
of strange design. This is the same as Java design and eclipse. When you code without eclipse you will a real pain :)
I found the git API far to low level from my developer perspective and this is what I would like the pharo abstraction to
protect our users (while getting the benefits from git).
And this is why when esteban is telling that this is what newbies expect I cannot believe such kind of statements
because there are simply bullshit. :)

Stef

Stef,

You need to cut your teeth for a decent couple hours to get to terms with Git.
Especially when using a workflow with branches, with merges, and several contributors.
I knew of quite a couple of SCMs (including Hg) but Git is a special beast.

I liked Git Recipes: A Problem Solution Approach as it was very pragmatic.

HTH
Phil


On Thu, Jun 26, 2014 at 7:09 PM, stepharo <[hidden email]> wrote:
I read

http://www.stic.st/wp-content/conferences/2012/Wednesday/1415-Practical_Git_for_Smalltalk-Henrichs.pdf
    and I found
    http://forum.world.st/Pharo-git-td4693999.html

But is there something that works and it simple?

Stef


On 26/6/14 18:27, stepharo wrote:
Hi

I do not know the dif between git file tree, file tree.... and I would like to know how to get
started with git in Pharo?

What should I read?

Stef





Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

Johan Brichau-2
In reply to this post by stepharo
Stef, all,

First, you need to know how to work with git and understand the vocabulary. Otherwise, you _will_ get confused, and probably get disgusted.
So, beware... git was made for and by linux people, which is all I am going to say about that...

In my experience, tools always help and I can recommend sourcetree [1] or git tower [2].
Reading the links that Dale mentioned is a very good idea too.

Next, Dale's 'getting started with github' [3] is a good intro to make your first git project work and understand the extra steps you need to make to manage source code.
It does not have to be a github project.

Let me also comment a bit on why we (at Yesplan) are now trying to switch from monticello to git for our daily work. I am using git for over a year now and we are actively switching to use it on a daily basis.

First of all, in our daily work, we need continuous deployment. When a feature is ready, it must be shipped into production as soon as possible. If you are not the only one working on a codebase, continuous deployment requires that each feature is developed in its own branch and can only be integrated with the main codebase when it's ready and stable. Monticello just does not support branching well. In Git, this is natural. You can easily create feature branches, do partial publishes, merge the changes from the main codebase back into your feature branch, explore the version history, etc. I must also add that github's pull request and code commenting feature is a very productive way of working together on the same codebase in a structured way.

About a year ago, I almost only used git tools to merge in the changes from Zinc 1.7 to 2.3.2 for the Gemstone port. In that change, Sven made a huge amount of package changes, which is about the worst case scenario to understand any evolution and merge it in a port (which has code changes itself). In about an afternoon of work, most of the dust had settled and I was using the git merge to understand code moves and to prevent gemstone-specific changes from being overwritten again. The best part there was probably the sub-method-level merges. Also, the reason I did not need any Smalltalk browser to do the merges is because filetree exports packages and classes as directories and methods as files. If you use the column layout of the Finder on Mac, the Finder becomes the System Browser (at least for understanding and navigating the structure of the source code, which is what you need at that level). Sourcetree had such a browser internally until very recently... so I am disappointed they removed that.

Besides numerous other projects, we have Seaside hosted in a github repository too. The advantages are that we can test every feature branch and every platform automatically with Travis CI. We don't use pull requests in the community, but if we did, it would be way easier for contributors and maintainers. Forking and pulling makes it easy for people to patch something and contribute the code back, while at the same time, it allows the maintainers to protect the code base from harmful changes.

Finally, the biggest pain with filetree is that it carries the monticello metadata. If you work together on the same branch, you _will_ get stupid merge conflicts on that metadata. Here, Thierry Goubier's FileTreeMerge tool [5] is a wonderful tool. Since I started using that, merges of the metadata are done by git automatically and I just forget about them. Nice work Thierry!

Another pain is that publishing and loading code is a two-step process: files on disk and code in your image. You need to very carefully synchronize these. You may switch a branch on disk but forget to load it in the image, or start publishing code from the image to the disk where a different branch was checked out. This is where better tools for git from within the image will help.

those were my 2 cents ;-)
Johan

[1] http://www.sourcetreeapp.com
[2] http://www.git-tower.com
[3] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md
[4] https://github.com/glassdb/Seaside31
[5] https://github.com/ThierryGoubier/GitFileTree-MergeDriver

On 28 Jun 2014, at 10:12, stepharo <[hidden email]> wrote:

> thanks
>
> Now is there a tutorial? Beause http://forum.world.st/Pharo-git-td4693999.html scared me.
>
>
> On 27/6/14 15:53, Goubier Thierry wrote:
>>
>>
>> Le 26/06/2014 19:11, Yuriy Tymchuk a écrit :
>>> I can only suggest you to read my blogpost about configurations and versioning: http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo.html
>>>
>>> I usually mix filetree and gitfiletree. Last one is better, because you don’t have to remember to commit in git each time you commit in pharo.
>>> (Also I think that gitfiletree is not working with Pharo4)
>>
>> Now it works with Pharo4!
>>
>> Thierry
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

philippeback

You just got me convinced to go with Thierry's tooling...

Phil

Le 28 juin 2014 17:13, "Johan Brichau" <[hidden email]> a écrit :
Stef, all,

First, you need to know how to work with git and understand the vocabulary. Otherwise, you _will_ get confused, and probably get disgusted.
So, beware... git was made for and by linux people, which is all I am going to say about that...

In my experience, tools always help and I can recommend sourcetree [1] or git tower [2].
Reading the links that Dale mentioned is a very good idea too.

Next, Dale's 'getting started with github' [3] is a good intro to make your first git project work and understand the extra steps you need to make to manage source code.
It does not have to be a github project.

Let me also comment a bit on why we (at Yesplan) are now trying to switch from monticello to git for our daily work. I am using git for over a year now and we are actively switching to use it on a daily basis.

First of all, in our daily work, we need continuous deployment. When a feature is ready, it must be shipped into production as soon as possible. If you are not the only one working on a codebase, continuous deployment requires that each feature is developed in its own branch and can only be integrated with the main codebase when it's ready and stable. Monticello just does not support branching well. In Git, this is natural. You can easily create feature branches, do partial publishes, merge the changes from the main codebase back into your feature branch, explore the version history, etc. I must also add that github's pull request and code commenting feature is a very productive way of working together on the same codebase in a structured way.

About a year ago, I almost only used git tools to merge in the changes from Zinc 1.7 to 2.3.2 for the Gemstone port. In that change, Sven made a huge amount of package changes, which is about the worst case scenario to understand any evolution and merge it in a port (which has code changes itself). In about an afternoon of work, most of the dust had settled and I was using the git merge to understand code moves and to prevent gemstone-specific changes from being overwritten again. The best part there was probably the sub-method-level merges. Also, the reason I did not need any Smalltalk browser to do the merges is because filetree exports packages and classes as directories and methods as files. If you use the column layout of the Finder on Mac, the Finder becomes the System Browser (at least for understanding and navigating the structure of the source code, which is what you need at that level). Sourcetree had such a browser internally until very recently... so I am disappointed they removed that.

Besides numerous other projects, we have Seaside hosted in a github repository too. The advantages are that we can test every feature branch and every platform automatically with Travis CI. We don't use pull requests in the community, but if we did, it would be way easier for contributors and maintainers. Forking and pulling makes it easy for people to patch something and contribute the code back, while at the same time, it allows the maintainers to protect the code base from harmful changes.

Finally, the biggest pain with filetree is that it carries the monticello metadata. If you work together on the same branch, you _will_ get stupid merge conflicts on that metadata. Here, Thierry Goubier's FileTreeMerge tool [5] is a wonderful tool. Since I started using that, merges of the metadata are done by git automatically and I just forget about them. Nice work Thierry!

Another pain is that publishing and loading code is a two-step process: files on disk and code in your image. You need to very carefully synchronize these. You may switch a branch on disk but forget to load it in the image, or start publishing code from the image to the disk where a different branch was checked out. This is where better tools for git from within the image will help.

those were my 2 cents ;-)
Johan

[1] http://www.sourcetreeapp.com
[2] http://www.git-tower.com
[3] https://github.com/dalehenrich/metacello-work/blob/master/docs/GettingStartedWithGitHub.md
[4] https://github.com/glassdb/Seaside31
[5] https://github.com/ThierryGoubier/GitFileTree-MergeDriver

On 28 Jun 2014, at 10:12, stepharo <[hidden email]> wrote:

> thanks
>
> Now is there a tutorial? Beause http://forum.world.st/Pharo-git-td4693999.html scared me.
>
>
> On 27/6/14 15:53, Goubier Thierry wrote:
>>
>>
>> Le 26/06/2014 19:11, Yuriy Tymchuk a écrit :
>>> I can only suggest you to read my blogpost about configurations and versioning: http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo.html
>>>
>>> I usually mix filetree and gitfiletree. Last one is better, because you don’t have to remember to commit in git each time you commit in pharo.
>>> (Also I think that gitfiletree is not working with Pharo4)
>>
>> Now it works with Pharo4!
>>
>> Thierry
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

Sean P. DeNigris
Administrator
In reply to this post by EstebanLM
EstebanLM wrote
- better visibility
+1. I found an online tool that analyzes a person's programming contributions that described me as (paraphrase): "a Javascript expert who dabbles in Smalltalk" or some such nonsense, because it could see my (very) few Amber contributions on GitHub, but was blissfully unaware of my countless MC commits.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

Sean P. DeNigris
Administrator
In reply to this post by Sven Van Caekenberghe-2
Sven Van Caekenberghe-2 wrote
we are on github
I don't think that code mirrored by a robot tells us much about the potential impact of using GitHub the way it was designed - discussions directly in commit diffs; integration of issues, commits, users; a real depiction of who contributed what and when...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: How to get started with Git and Pharo?

Eliot Miranda-2
In reply to this post by Dale Henrichs-3
Hi Dale,


On Thu, Jun 26, 2014 at 3:16 PM, Dale Henrichs <[hidden email]> wrote:
My favorite feature by far is the ability to look at the git history of the methods themselves ... just the other day I had a bug that I was tracking down, and by looking at the git history I discovered that a critical change had been made to that method 1 year 12 days ago ... from that I was able to look at all of the changes to all of the packages that had been made in the same commit (the critical code had not only been moved to a different class but the critical method had been moved to a separate package ... and from that I was able to see that a bug had been introduced when not all of the critical method was moved ... bug fixed ...

Chris Muller has recently done some superb work in Squeak with his Magma database that provides exactly this within the existing Monticello framework.  In current Squeak 4.5 images if you add the repository

MCHttpRepository
user: 'squeak'
password: 'squeak'

to the Monticello Browser and then add it to the packages one is interested in (a script to add it to all is trivial), then a "Browse mc history" menu item becomes available on the class and method lists in the browser and voila, one can browse the entire class and/or method history.

This feature has been missing for a long time.  I really needed it this morning and wasn't quite aware that it was available already.   I expect this will become a standard feature of new Squeak releases.  The server can easily be duplicated on one's own machine for working detached from the internet (e.g. via http://localhost:8888/mchistory) and updates itself at regular intervals.
 

Besides method versions, you can look at the git history for a class, package or metacello project .... these are thing that would take a bit of work to accomplish using just Monticello ... and if you were to attempt to do it, the simplest thing to do would be to copy all of the packages into a git repository and just use git:) Frank Shearar wrote some code that did something along these lines a couple of years ago ...

But the work's mostly been done.  Chris's work provides class & method.  Package history is there already, with "search history" providing free text search through a specific package's history, and Chris will be providing keyword search across all packages soon.


Dale



On Thu, Jun 26, 2014 at 2:21 PM, kilon alios <[hidden email]> wrote:
another advantage of git is source code searches. It will essentially allow pharoers to search pharo code online and not just being isolated in their image. The search does not return just a whole library but even code fragments. 


On Fri, Jun 27, 2014 at 12:17 AM, Sebastian Sastre <[hidden email]> wrote:

On Jun 26, 2014, at 3:52 PM, Esteban Lorenzano <[hidden email]> wrote:

On 26 Jun 2014, at 14:56, Sven Van Caekenberghe <[hidden email]> wrote:


On 26 Jun 2014, at 19:07, Dale Henrichs <[hidden email]> wrote:

I think that it is possible to most if not all of the git work support into the Smalltalk development environment ... I am doing that for GemStone with tODE[6] and I do find myself going to the go to the command line much less frequently ... but in tODE I have built a git merge tool and a git diff tool ... you can get the git history of a method from the browser, etc. 

Without a relatively high degree of tool integration it can be clunky to use git ... I am very willing to share what I've done/learned in tODE with Pharo tool builders and of course I think Thierry Goubier has actually been ahead of me in several different areas ...

That is my analysis: it works today, 'perfectly', but there is not enough tools support to make it as easy as Monticello as a whole is today.

If these tools exist, or we can build them quickly based Dale's code, that would be cool (I guess its all OSProcess underneath, which I find so/so, a direct integration is better) that would be good.

Would having this change our world fundamentally ? No, IMHO
Is it worth the effort, is the ROI there ? I don't think so

I disagree here. I think moving our development to git will change deeply (for good) our community processes and then I think it totally worths the effort. 


big +1 here

The social benefit of having your code exposed in places like github outweighs by at an astronomical scale the current lack of amazing mergetools

If your code cannot be exposed without friction you’re done 

The noise of the jungle of 3-new-libraries-per-day-that-can-be-installed-in-one-shot will make your work invisible









--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: How to get started with Git and Pharo?

Chris Muller-3
On Thu, Jun 26, 2014 at 3:16 PM, Dale Henrichs <[hidden email]> wrote:
My favorite feature by far is the ability to look at the git history of the methods themselves ... just the other day I had a bug that I was tracking down, and by looking at the git history I discovered that a critical change had been made to that method 1 year 12 days ago ... from that I was able to look at all of the changes to all of the packages that had been made in the same commit (the critical code had not only been moved to a different class but the critical method had been moved to a separate package ... and from that I was able to see that a bug had been introduced when not all of the critical method was moved ... bug fixed ...

Chris Muller has recently done some superb work in Squeak with his Magma database that provides exactly this within the existing Monticello framework.  In current Squeak 4.5 images if you add the repository

Hey, glad it could be useful!  Just for clarity, one thing MC doesn't do is track single commits that include changes across multiple packages.  In Dale's story, the "critical code had not only been moved to a different class but the critical method had been moved to a separate package" -- MC doesn't have anything to track "multipackage commits"; (I don't think it needs it, even though it proved useful in Dale's example, because when we have a set of packages we care to work together, MC can instantiate a MCConfiguration to define it).

The reason you were able to see the history of WeakRegistry today even though it had been moved from Collections to System is that the MCDefinitions instances are indexed simply by their #description, which is package agnostic.  It didn't care that it moved packages.
 
MCHttpRepository
user: 'squeak'
password: 'squeak'

to the Monticello Browser and then add it to the packages one is interested in (a script to add it to all is trivial), then a "Browse mc history" menu item becomes available on the class and method lists in the browser and voila, one can browse the entire class and/or method history.

This feature has been missing for a long time.  I really needed it this morning and wasn't quite aware that it was available already.   I expect this will become a standard feature of new Squeak releases.  The server can easily be duplicated on one's own machine for working detached from the internet (e.g. via http://localhost:8888/mchistory) and updates itself at regular intervals.

It was released with Squeak 4.5.  The box4 server supporting it has been running for 7-8 months.

 
Besides method versions, you can look at the git history for a class, package or metacello project .... these are thing that would take a bit of work to accomplish using just Monticello ... and if you were to attempt to do it, the simplest thing to do would be to copy all of the packages into a git repository and just use git:) Frank Shearar wrote some code that did something along these lines a couple of years ago ...

But the work's mostly been done.  Chris's work provides class & method.  Package history is there already, with "search history" providing free text search through a specific package's history, and Chris will be providing keyword search across all packages soon.

TMK, Pharo did not adopt the MCRepository changes we did, so there would be issues in Pharo.  The box4 tool is intended only as a tool to help Monticello users..  Every kind of MC backend will have its own pluses and minuses, it's an area worth exploring in multiple directions..

12