Description

When a user creates a new project then with an optional switch a local git repo could be created.

This git repo can be used to store the state of all the actions performed on a roo script. A user could do it by hand as well, but this option would make this best practice of storing things in repo easier. Then with each command if it changes files an git commit could be done with relevant comment

if when command is : field string blah (git can store adding field blah to entity Blah)

All of this can be done manually with some effort. Doing this can make easy to implement an undo functionality, ie going a few steps back and branching from that step and getting rid of the changes done from there on.

The approach to have an integrated state maintaince is valid, but the point of ROO (as I understand) is to leverage existing technologies.

You could argue the same about inclusion of maven, (why not ROO fetch the dependencies it's self) The reason I understand is that there is already a well established tool to do such a thing (you can argue about the choice of maven with respect to ant/ivy). Similarly there are already great tools to maintain state (namely various version control systems) so why not use them. Choosing git would encourage ploifration of this practice amongst new java/roo devs. Any one who has a good reason to not use git could easily swap in their own VCS or implementation (if the undo feature is built upon IRooStateMaintainer interface)

Shahzada Hatim
added a comment - 18/Jun/10 12:21 AM The approach to have an integrated state maintaince is valid, but the point of ROO (as I understand) is to leverage existing technologies.
You could argue the same about inclusion of maven, (why not ROO fetch the dependencies it's self) The reason I understand is that there is already a well established tool to do such a thing (you can argue about the choice of maven with respect to ant/ivy). Similarly there are already great tools to maintain state (namely various version control systems) so why not use them. Choosing git would encourage ploifration of this practice amongst new java/roo devs. Any one who has a good reason to not use git could easily swap in their own VCS or implementation (if the undo feature is built upon IRooStateMaintainer interface)

With commit e53eb5f215a7d5db71c94a54388c1ec6aaf9efab the first incarnation of this add-on is complete.

To initialize the git via the Roo shell use the 'git setup' command. Once the repository has been setup you can use the 'git config' command to define user name, email, repository URL, as well as enabling shell color in the .git/config file.

This add-on will automatically commit all changes in the project directory after a shell command has been completed successfully. Furthermore, 'git commit all' allows manual triggering of a commit via the Roo shell. Finally, the 'git revert last commit' and 'git revert commit' allow reverting of previous commits (a branch of the repository before the revert is automatically created).

This add-on will not be included in the Roo distribution until the underlying jGit dependency has been updated to version 0.9 (current 0.8.4) which supports .gitignore.

Stefan Schmidt
added a comment - 01/Sep/10 7:50 AM With commit e53eb5f215a7d5db71c94a54388c1ec6aaf9efab the first incarnation of this add-on is complete.
To initialize the git via the Roo shell use the 'git setup' command. Once the repository has been setup you can use the 'git config' command to define user name, email, repository URL, as well as enabling shell color in the .git/config file.
This add-on will automatically commit all changes in the project directory after a shell command has been completed successfully. Furthermore, 'git commit all' allows manual triggering of a commit via the Roo shell. Finally, the 'git revert last commit' and 'git revert commit' allow reverting of previous commits (a branch of the repository before the revert is automatically created).
This add-on will not be included in the Roo distribution until the underlying jGit dependency has been updated to version 0.9 (current 0.8.4) which supports .gitignore.

Stanislav, at this point we are not planning to offer add-ons for SVN/CVS/VSS/TFS as Roo core add-ons (meaning developed by us). However, I hope that the Git add-on can be used as a reference to get you (the community) started to develop add-ons for the aforementioned version control systems.

Stefan Schmidt
added a comment - 13/Mar/11 3:26 PM Stanislav, at this point we are not planning to offer add-ons for SVN/CVS/VSS/TFS as Roo core add-ons (meaning developed by us). However, I hope that the Git add-on can be used as a reference to get you (the community) started to develop add-ons for the aforementioned version control systems.
The sources for the Git add-on are available in Roo master http://git.springsource.org/roo/roo/trees/master/addon-git
I am looking forward to seeing more add-ons in this direction!
Cheers,
Stefan

Stefan Schmidt
added a comment - 13/Mar/11 3:28 PM I'll go ahead and resolve this add-on given it is now available through the 'addon install' command via the Roo shell. Any bugs or feature improvement requests should be placed in a new Jira ticket.