Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Collins-Sussman B.Version control with Subversion 1.1.pdf
Скачиваний:
9
Добавлен:
23.08.2013
Размер:
1.53 Mб
Скачать

Guided Tour

Initial Checkout

Most of the time, you will start using a Subversion repository by doing a checkout of your project. Checking out a repository creates a copy of it on your local machine. This copy contains the HEAD (latest revision) of the Subversion repository that you specify on the command line:

$ svn checkout http://svn.collab.net/repos/svn/trunk A trunk/subversion.dsw

A trunk/svn_check.dsp A trunk/COMMITTERS

A trunk/configure.in A trunk/IDEAS

Checked out revision 2499.

Repository Layout

If you're wondering what trunk is all about in the above URL, it's part of the way we recommend you lay out your Subversion repository which we'll talk a lot more about in Chapter 4, Branching and Merging.

Although the above example checks out the trunk directory, you can just as easily check out any deep subdirectory of a repository by specifying the subdirectory in the checkout URL:

$ svn checkout http://svn.collab.net/repos/svn/trunk/doc/book/tools A tools/readme-dblite.html

A tools/fo-stylesheet.xsl A tools/svnbook.el

A tools/dtd

A tools/dtd/dblite.dtd

Checked out revision 2499.

Since Subversion uses a “copy-modify-merge” model instead of “lock-modify-unlock” (see Chapter 2, Basic Concepts), you're already able to start making changes to the files and directories in your working copy. Your working copy is just like any other collection of files and directories on your system. You can edit and change them, move them around, you can even delete the entire working copy and forget about it.

Note

While your working copy is “just like any other collection of files and directories on your system”, you need to let Subversion know if you're going to be rearranging anything inside of your working copy. If you want to copy or move an item in a working copy, you should use svn copy or svn move instead of the copy and move commands provided by your operating system. We'll talk more about them later in this chapter.

Unless you're ready to commit a new file or directory, or changes to existing ones, there's no need to further notify the Subversion server that you've done anything.

What's with the .svn directory?

Every directory in a working copy contains an administrative area, a subdirectory named .svn. Usually, directory listing commands won't show this subdirectory, but it is nevertheless an important directory. Whatever you do, don't delete or change anything in the administrative area! Subversion depends on it to manage your working copy.

22

Соседние файлы в предмете Электротехника