Spring Roo
  1. Spring Roo
  2. ROO-911

setup git/svn when building new project

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.1.3.RELEASE
    • Component/s: SCM
    • Labels:
      None

      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)

      http://forum.springsource.org/showthread.php?t=90056

      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.

        Issue Links

          Activity

          Hide
          cometta added a comment -

          rather than requierd to have git/svn would be nice if roo has built in such repository so that we do not need to setup git/svn to get undo feature

          Show
          cometta added a comment - rather than requierd to have git/svn would be nice if roo has built in such repository so that we do not need to setup git/svn to get undo feature
          Hide
          Shahzada Hatim added a comment -

          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)

          Show
          Shahzada Hatim added a comment - 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)
          Hide
          Stefan Schmidt added a comment -

          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.

          Show
          Stefan Schmidt added a comment - 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.
          Hide
          Stefan Schmidt added a comment -

          JGit 0.9.3 now supports .gitignore. Updated the this add-on with commit 8cf68430e103222e5fc9f90017db2c2c24b5a124 and 6d0a2d0d75074380ba44b4a972928ac3217c7a56 for release in Roo 1.1.1.

          Show
          Stefan Schmidt added a comment - JGit 0.9.3 now supports .gitignore. Updated the this add-on with commit 8cf68430e103222e5fc9f90017db2c2c24b5a124 and 6d0a2d0d75074380ba44b4a972928ac3217c7a56 for release in Roo 1.1.1.
          Hide
          Stefan Schmidt added a comment -

          added add-on description with commit 7159d90c3f50b372abefaad89cbe59b6fc12345a.

          Show
          Stefan Schmidt added a comment - added add-on description with commit 7159d90c3f50b372abefaad89cbe59b6fc12345a.
          Hide
          Stanislav Jursky added a comment -

          nice are you planning to add other source control systems as well (SVN/CVS/VSS...)?
          Thanks

          Show
          Stanislav Jursky added a comment - nice are you planning to add other source control systems as well (SVN/CVS/VSS...)? Thanks
          Hide
          Stanislav Jursky added a comment -

          also TFS integration would be great

          Show
          Stanislav Jursky added a comment - also TFS integration would be great
          Hide
          Stefan Schmidt added a comment -

          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

          Show
          Stefan Schmidt added a comment - 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
          Hide
          Stefan Schmidt added a comment -

          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.

          Show
          Stefan Schmidt added a comment - 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.

            People

            • Assignee:
              Stefan Schmidt
              Reporter:
              Shahzada Hatim
            • Votes:
              9 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: