wiki:SvnBasicCommands

svn basic commands

svn help

 $ svn help

Help on a specific command (for example add):

 $ svn help add 

Download regyna

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

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

Update regyna

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

 $ svn update

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

 $ svn update ~/regyna

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

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

Compare your version with the reference deposit

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

 $ svn status

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

 $ svn status -u

Add a new file

Add a new file to regyna

 $ svn add file_name

If file_name is not in the working space (here ~/regyna), you must copy it. For example :

 $ cp -p another_directory ~/regyna/

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

Create a directory file

 $ 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

Delete an existing file

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

Add automatic version number in a file

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 your changes

Commit all your changes with one command

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

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

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

More info on your version

 $ svn info ~/regyna
Last modified 15 years ago Last modified on 01/12/09 10:20:14