O'Reilly logo

Professional Ruby on Rails™ by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.4. The Repository Life Cycle

Now that you have your repository, you need to keep it up to date. Any changes you make to your local copy of the code need to be registered back to the Subversion server before other developers can see it and the change can be assigned a revision tag.

2.4.1. Committing Normal Code Changes

Most of the time, the changes that you make to your code will simply involve changing text within an existing file. As you've seen, the svn commit command causes all of the changes in your local copy to be sent to the server. Subversion requires you to add a short message to the commit, describing the change by using the -m flag, as in svn commit -m "I fixed that really hairy bug. Hooray for me". If you don't include a descriptive message, Subversion will try to launch your system's default editor for you to type one in.

If you've lost track of the revisions you've made since your last commit, you can get a handy list by using the svn status command as follows:

$ svn status ? edge_update.sh ? soupsonline.tmproj M test/unit/ingredient_test.rb M test/functional/ingredients_controller_test.rb M test/functional/recipes_controller_test.rb M app/controllers/ingredients_controller.rb M app/views/recipes/show.html.erb ? app/views/ingredients/remote_update.html.erb M app/views/ingredients/remote_edit.html.erb ? db/schema.rb X vendor/rails ? public/images/spacer.gif ? public/images/img10.gif ? public/images/img01.gif ? public/images/img11.gif ? public/images/img02.gif ? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required