====== Documentation sommaire ======

Petit tour d'horizon des commandes de base avec subversion:

Créer un repository

# cd /home/svn
# svnadmin create cfengine

__ Se synchroniser à un dépot pour rapatrier les fichiers :__

# cd ~/svn
# svn co http://localhost/cfengine .
Checked out revision 0.

Nous venons de se synchroniser avec le repository (checkout). Généralement, cette opération ne se fait que la première fois.

Créer un nouveau repository

# touch txt.info
# svn import http://localhost/cfengine -m "1er"
Adding         txt.info

Committed revision 1.

Pour se synchroniser au repository

# svn update
A    txt.info
Updated to revision 1.

Soumettre une nouvelle version

# echo "wOOt" >> txt.info
# svn commit -m "wOOt upate"
Sending        txt.info
Transmitting file data .
Committed revision 2.

Récupérer une version antérieure

# svn update -r 1 txt.info
U    txt.info
Updated to revision 1.
# cat txt.info
#
# svn update
U    txt.info
Updated to revision 2.
# cat txt.info 
wOOt

Ajouter un fichier

# svn add plop.txt
A         plop.txt

Supprimer un fichier

# svn delete plop.txt
D         plop.txt

Renommer un fichier

# svn move txt.info info.txt
A         info.txt
D         txt.info
# svn commit -m "swapname"
Adding         info.txt
Deleting       txt.info

Remettre un fichier dans l'état de son dernier update

# svn revert txt.info
Reverted 'txt.info'

Permet d'annuler toutes les modifications faites sur le fichier depuis le dernier update

Pour obtenir des informations sur le repository

# svn info
Path: .
URL: http://localhost/cfengine
Repository Root: http://localhost/cfengine
Repository UUID: 835a75e8-51a8-11dc-aee2-235a21debaf3
Revision: 2
Node Kind: directory
Schedule: normal
Last Changed Rev: 2
Last Changed Date: 2007-08-23 21:52:14 +0200 (jeu, 23 aoû 2007)

Pour obtenir l'historique d'un fichier

# svn log info.txt
------------------------------------------------------------------------
r4 | (no author) | 2007-08-23 22:12:51 +0200 (jeu, 23 aoû 2007) | 1 line

swapname
------------------------------------------------------------------------
r2 | (no author) | 2007-08-23 21:52:14 +0200 (jeu, 23 aoû 2007) | 1 line

wOOt upate
------------------------------------------------------------------------
r1 | (no author) | 2007-08-23 21:34:56 +0200 (jeu, 23 aoû 2007) | 1 line

1er
------------------------------------------------------------------------

Voilà déjà de quoi commencer à bosser :)