The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Using subversion with rails: a real pain for dirs and files added?

We know that with subversion if i modfy files in my working copy everythink is transparent when i will do a commit. Instead if i add files or directory to the working copy i must use the related svn subcommands such as svn add for example. But this is a pain in rails where in a working day with my working copy i will add many autogenerated files and directory. At the end of the day when i'm ready to commit i have to remember every files in every directory or directories that rails (or me) added to the project and i have to run the svn add command for each of them. Am i wrong? What is at the end the benefit of using it?

wow i didn't know that option to the generator script
Is it documented somewhere?

Anyway someone has told me that a "svn add", with no argument, to the root rails app directory, will discover and schedule to add to the repository new files and directory whithin this rails app. Which way is the best and most used among rails developers? If i choose your way, do i have to do that only for generated stuff?

If you are running Windows as your development environment and using SVN, I would highly recommend installing TortoiseSVN. With that installed, you can right click on the root of your application and commit. The Explorer plug-in will then list all the files that may need including in the commit. The items that are controlled by SVN and have changed since the last commit will be checked, but also files that are not in the repository and may need to also be included in the commit, will also be listed but unchecked. If you review that list before confirming the commit, it is usually fairly simple to pick up any files you've forgotten.

Also, the alterations of file icons in Windows explorer make it fairly easy to detect files that are either out of step with the repository or not included.

This link shows the right click menu additions, alteration of icons and an example explorer view of files.

svn add with no options doesn't do anything. There's nothing odd about chaining powerful unix commands together once you get to know them. Besides, as I said I've set it up a bash alias for the whole command so all I actually have to type is:

As a side note, I wouldn't really recommend using the --svn switch with the generators unless you plan on checking the generated files in straight away; if you don't, then you'll have added files lying around that you might not necessarily want to check in at that point. Say an issue comes up that needs to be fixed there and then; you'd now have to go to the trouble of listing each individual file you want checking in so as not to check in all of the added files (that aren't relevant to that changeset).

Its almost always a good idea to not run svn add until you are ready to check in and only then svn add the files you need.