This is an old revision of the document!
It goes without saying that this book exists to be a source of information and assistance for Subversion users new and old. Conveniently, though, the Subversion command-line is self-documenting, alleviating the need to grab a book off the shelf (wooden, virtual, or otherwise). The svn help command is your gateway to that built-in documentation:
$ svn help
Before you start using svn you have to start svn shell (or provide keys to ssh client in diferent way)
svnshell
You should see modified prompt :
[SVN] promt$
To get local copy of repository :
svn checkout svn+ssh://[email protected]/REPOSITORY_NAME
or optionaly
svn checkout svn+ssh://[email protected]/REPOSITORY_NAME/trunk REPOSITORY_NAME
To download most recent version form repository use:
svn update
To commit (send to server) yours changes use:
svn commit
You may also add specific resource to be added:
svn commit dir/filename
In addition you may provide commit comment from command line using -m option:
svn commit -m "comment to my commit"
To add new resource (file / directory) use:
svn add file
NOTE: Be careful, adding directory means adding directory itself and all files inside it.
To add only directory without files inside you need to:
svn add -N dirname
To remove resource (file / directory) use:
svn del file
In order to simplify process of adding new resources created during work with Cadence an helper script smartsvn.py was prepared. The main aim of this script is to scan over directory tree and look for new cells / views to be added to repository. To run script use:
smartsvn.py
Access to repository is granted based on public/private-key authorization mechanism. You need to generate ssh key pair:
ssh-keygen -t rsa -b 2048 -f ~/.ssh/svn
Send generated key to SVN Administrator.
In file ~/.bashrc
you have to specify editor wich will be used to edit commit description:
export SVN_EDITOR=gedit
You have to add scripts
directory to You PATH:
export PATH=~/AMS400/EUDET_V/scripts:$PATH
cd ~AMS400/EUDET_V
svn update
svn update
svn_helper.py add [dir/file]
svn commit
You should put (not to long, but having sense) comment
scripts/svn_helper.py
scripts/files.cnf
- tells which files should be addedscripts/dirs.cnf
- tells which directories should be addedkulis@lumifun:~/EUDET_V$ svn_helper.py add Creating /home/kulis/EUDET_V/scripts/logs/svn_helper_2010_05_10_14_21_50.sl scripts/known_type.py [file] [PY ] [+] scripts/unknow_type.123 [file] [!!!] [-] scripts/logs/svn_helper_2010_05_10_14_21_50.sl [file] [SL ] [-] Unmached files: scripts/unknow_type.123
svn update
svn del A
svn_helper.py del_svn_info B
svn_helper.py add B
$cd YOUR_REPO $ svn info Path: . URL: http://svn.lumifun.ftj.agh.edu.pl/YOUR_REPO Repository Root: http://svn.lumifun.ftj.agh.edu.pl/YOUR_REPO Repository UUID: ... Revision: ... Node Kind: directory Schedule: normal Last Changed Author: ... Last Changed Rev: ... Last Changed Date: ... $svn switch --relocate http://svn.lumifun.ftj.agh.edu.pl/YOUR_REPO svn+ssh://[email protected]/YOUR_REPO .