svn basic commands

$Id: svnbasiccommands.xml 7 2008-12-12 10:39:06Z pinsard $


Table of Contents

1. svn help
2. Download ircaam
3. Update ircaam
4. Compare your version with the reference deposit
5. Add a new file
6. Create a directory file
7. Delete an existing file
8. Add automatic version number in a file
9. Commit your changes
10. More info on your version

 $ svn help

Help on a specific command (for example add):

 $ svn help add 

To download ircaam in the directory ~/ircaam execute (with the appropriate login)

 $ svn co svn+ssh://YOUR_LOGIN@forge.ipsl.jussieu.fr/ipsl/forge/projets/ircaam/svn/trunk ~/ircaam

To update everything, go to the directory where you installed ircaam (for example ~/ircaam) and execute

 $ svn update

You can also specify ircaam when calling svn update, for example:

 $ svn update ~/ircaam

Or you can specify one or several files you want to update

 $ svn update ~/ircaam/src/*.m

To compare your version with the reference deposit as it was at the time you download (or updated) ircaam, execute:

 $ svn status

To compare your version with the latest version of the reference deposit, execute:

 $ svn status -u

Add a new file to ircaam

 $ svn add file_name

For example, directly

 $ touch aaa create a aaa file
 $ ls -l aaa

-rw-r--r-- 1 smasson lodyc 0 Oct 29 09:59 aaa

 $ svn status check your deposit, aaa file is signaled as unknown

?      aaa

 $ svn add aaa add aaa file to the svn deposit


A         aaa

 $ svn status check that aaa has been add to the deposit

A      aaa

 $ svn mkdir directory_name

For example:

 $ svn mkdir AAA create the directory and add it to the svn deposit in one unique command

A         AAA

or

 $ mkdir AAA create the directory
 $ svn status check your deposit, AAA is signaled as unknown

?      AAA


 $ svn add AAA add it to the svn deposit

A         AAA

 $ svn rm --force aaa works for file or directory

Edit you file and add somewhere:

$Id$

Next execute the following svn command:

 $ svn propset svn:keywords Id YOUR_FILE_NAME

Next time you download/update you file, $Id$ will be automatically replaced by the version tag.

Commit all your changes with one command

 $ svn commit --username YOUR_LOGIN --message "A SHORT DESCRIPTION" ~/ircaam

or commit your change on one specific file (for example ~/ircaam/src/aaa)

 $ svn commit --username YOUR_LOGIN --message "A SHORT DESCRIPTION" ~/ircaam/src/aaa

 $ svn info ~/ircaam