2.3. Populating the New Repository
At the end of this section, the Rails application directory will be registered with Subversion as a working copy of the code stored in the Subversion repository. Subversion has an import command that is often used to place existing code trees into a Subversion repository. However, adding code to a Subversion repository via import does not associate the existing code tree with the Subversion repository. You'd still need to create a working copy of your code someplace else on your hard drive.
2.3.1. Checking Out and Adding Files
To allow your existing code tree to become your Subversion working copy, you need to start by checking out a copy of the (currently blank) repository directory. Open a command prompt at the top level of your new Rails application — the soupsonline directory — and type the following command:
$ svn checkout "file:///<dir>/soupsonline/trunk" . Checked out revision 1.
This command does the following:
svn invokes the Subversion command line client.
checkout tells Subversion which command to actually run. In Subversion, all a checkout does is make a working copy from a location in a Subversion repository and place it in a location on the local hard drive.
The URL specifies the location of the repository.
The . specifies the destination location — in this case, the current directory.
In this case, the repository is still empty, so nothing is actually copied. However, Subversion has now noted that the remote and local file systems ...
Get Professional Ruby on Rails™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.