source:
trunk/adm/guides/svnbasiccommands.rst
@
154
Last change on this file since 154 was 110, checked in by pinsard, 12 years ago | |
---|---|
|
|
File size: 3.4 KB |
svn basic commands
Author: | Sébastien Masson <Sebastien.Masson_at_locean-ipsl.upmc.fr> |
---|
svn help
$ svn help
Help on a specific command (for example add):
$ svn help add
Download tropflux
To download tropflux in the directory :file:`${HOME}/tropflux_ws` execute (with the appropriate login):
$ svn checkout svn+ssh://**YOUR_LOGIN**@forge.ipsl.jussieu.fr/ipsl/forge/projets/tropflux/svn/trunk ${HOME}/tropflux_ws
Update tropflux
To update everything, go to the directory where you installed tropflux (for example :file:`${HOME}/tropflux_ws`) and execute:
$ svn update
You can also specify tropflux when calling svn update, for example:
$ svn update ${HOME}/tropflux_ws
Or you can specify one or several files you want to update:
$ svn update ${HOME}/tropflux_ws/src/*.pro
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) tropflux, 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 tropflux:
$ svn add **file_name**
If file_name is not in the working space (here :file:`${HOME}/tropflux_ws`), you must copy it:
$ cp -p **another_directory** ${HOME}/tropflux_ws/
For example
create a :file:`aaa` file
$ touch aaa $ ls -l aaa -rw-r--r-- 1 smasson lodyc 0 Oct 29 09:59 aaa
check your deposit, :file:`aaa` file is signaled as unknown
$ svn status ? aaa
add :file:`aaa` file to the svn deposit
$ svn add aaa A aaa
check that :file:`aaa` has been add to the deposit
$ svn status A aaa
Create a directory file
$ svn mkdir **directory_name**
For example:
# create the directory and add it to the svn deposit in one unique command $ svn mkdir AAA A AAA
or:
# create the directory $ mkdir AAA # check your deposit, :file:`AAA` is signaled as unknown $ svn status ? AAA # add it to the svn deposit $ svn add AAA A AAA
Delete an existing file
# works for file or directory $ svn rm --force aaa
Add automatic version number in a file
Edit your file and add somewhere $Id$.
Next execute the following svn command:
$ svn propset svn:keywords Id *YOUR_FILE_NAME*
Next time you download/update your 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" ${HOME}/tropflux_ws
or commit your change on one specific file (for example :file:`${HOME}/tropflux_ws/src/aaa`):
$ svn commit --username **YOUR_LOGIN** \ --message "A SHORT DESCRIPTION" \ ${HOME}/tropflux_ws/src/aaa
More info on your version
$ svn info ${HOME}/tropflux_ws