NBDemoSubversion

Subversion Demo (5 Minutes)

Description

This demo shows subversion support in NetBeans. The script will be used during NetBeans Days FY07.

Points to Hit

  • Subversion is a versioning system which is in many ways more powerfull than the widely used CVS.
  • New projects are often being versioned in Subversion instead of CVS, so Subversion is gaining popularity.
  • NetBeans has great support for Subversion.
  • This support is very well integrated into UI of NetBeans.
  • Subversion support understands which files belong to a project and which don't.
  • You can refactor code and Subversion adds/removes/moves files as necessary.
  • Subversion support is very much similar to CVS support so if you're used to it, it will be easy to use for

Demo Prep

  • Download latest SVN-stable from here here.
  • Install - just next, next next.
  • Create repositories by: svnadmin create c:\svn
  • Run svn daemon by: svnserve --daemon --root c:\svn
  • Test SVN - import a project into repository. It should work. Repository URL: file:///c:/svn.
  • Then install SVN as service - download SVNService from here.
  • Unpack SVNService.exe to bin subdirectory of Subversion.
  • Run: svnservice -install --daemon --root c:\svn
  • Now you can work with SVN server which is running on background.
  • Download and unzip the CalculatorNB project.

Demo

Subversion Basics

  • Open the CalculatorNB project.
  • Import the project into repository from project context menu - SVN | Import into Subversion.
  • Specify path to the repository - should be file:///c:/svn.
  • Specify import message, e.g. initial import, click next.
  • Show the next screen where you can choose which files to include and if they are binary or text (autodetected).
  • Project is imported.
  • Show Window | Output for people who like to see command line communication with the server.
  • Go to context menu on project | Subversion and explain briefly individual actions.
  • Choose Subversion > Show All Changes to see what changes are done on this project (if any).
  • Changed the name of CalcEngine to CalcMotor.
  • Notice how the changes window dynamically picked up the changed files. Explain that colors are used to show new/modified/removed files. Also point out the badges in the projects view.
  • Execute the Diff All action and go though the list of changes by pressing arrows. Explain that it's a good idea to check changes before committing them.
  • Commit all changes. Explain the dialog, that you can choose which files to exclude, if it's text/binary and write a commit message (e.g. class xyz refactored). Commit all changes.
  • Show that the changes window is now empty and badges are gone.

Search History

  • Explain the search history feature.
  • Open Seach history from main menu. Explain that you can use both context menu and main menu which is context sensitive, too.
  • Search for commit message written during last commit.
  • Show the list of commits and click on individual diffs.
  • Explain that this feature is usable if you want to search quickly for changes you did during some commit. You can also use dates and username to find the correct commit.

Conclusion

  • There are many other features we didn't show in this demo, e.g.
  • Updating and updating with dependencies.
  • Branching and merging.
  • Reverting modifications.
  • Resolving of conflicts.
  • Working with diffs and patches.
  • Much more...
  • We're excited that NetBeans has excellent Subversion support as the popularity of this versioning system is growing rapidly.

Demo Cleanup

  • Remove SVN directories you created during the demo from the repository. Run: svn delete -m"comment" file:///c:/svn/CalculatorNB

Alternatively you can also install the Rapid SVN GUI tool and then go to Bookmarks | Add existing repository. Point to your repository (e.g. file:///c:/svn). Then delete the demo project by executing Modify | Delete on the project directory.

  • The IDE needs to be restarted, so that it doesn't remember that this project is versioned.
  • Remove the project CalculatorNB from hard disk (better to do it when the IDE is not running).
  • If there are any troubles, remove the nb cache $netbenas_user_dir/var/cache/svncache (just for

sure).

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo