Difference between revisions of "Subversion Repositories"

From CS Support Wiki
Jump to: navigation, search
 
Line 8: Line 8:
 
  svnadmin create svnroot
 
  svnadmin create svnroot
 
This creates a repository called svnroot. It will appear as a folder, but you will not need to deal directly with this folder. Instead, you will use subversion commands to interact with your repository.
 
This creates a repository called svnroot. It will appear as a folder, but you will not need to deal directly with this folder. Instead, you will use subversion commands to interact with your repository.
 +
 +
 +
====Import Files====
 +
Once the repository has been created, the svn tool can be used to manage it. Before you can import a project, you need to create a folder for it - the command for this is svn mkdir.
 +
svn mkdir file:///home/reh4j/svnroot/project1
 +
Subversion will open up a text editor and request a log message. Cd into the directory that you want to import, and then use svn import.
 +
cd /home/reh4j/.../project1
 +
svn import file:///home/reh4j/svn/project1
 +
 +
 +
====Checkout Files====
 +
Even though the repository now stores a copy of your files, you won't interact directly with those files. Instead, you will check out a working copy, which you can then modify. Change directory to wherever you want the working copy to exist, and then run svn checkout.
 +
cd /home/reh4j/svn_work
 +
svn checkout file:///home/reh4j/svnroot

Revision as of 15:31, 31 July 2006

This page is under construction!

Quick SVN Introduction

Create a Repository

Svnadmin is the tool subversion uses for administrative tasks, such as making repositories and backups. To create a repository, first you need to change directory to where you want to create the repository. Then use the create command.

cd /home/reh4j
svnadmin create svnroot

This creates a repository called svnroot. It will appear as a folder, but you will not need to deal directly with this folder. Instead, you will use subversion commands to interact with your repository.


Import Files

Once the repository has been created, the svn tool can be used to manage it. Before you can import a project, you need to create a folder for it - the command for this is svn mkdir.

svn mkdir file:///home/reh4j/svnroot/project1

Subversion will open up a text editor and request a log message. Cd into the directory that you want to import, and then use svn import.

cd /home/reh4j/.../project1
svn import file:///home/reh4j/svn/project1


Checkout Files

Even though the repository now stores a copy of your files, you won't interact directly with those files. Instead, you will check out a working copy, which you can then modify. Change directory to wherever you want the working copy to exist, and then run svn checkout.

cd /home/reh4j/svn_work
svn checkout file:///home/reh4j/svnroot