User Tools

Site Tools


svn:start

This is an old revision of the document!


SubVersion

Administrators

  • SVN administrator : Szymon Kulis
  • People who can help : Krzysztof Swientek, Kuba Moron

Using SVN

Help

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

Starting svn shell

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$ 

Getting repository

To get local copy of repository :

 svn checkout svn+ssh://svn@lumifun.ftj.agh.edu.pl/REPOSITORY_NAME 

or optionaly

 svn checkout svn+ssh://svn@lumifun.ftj.agh.edu.pl/REPOSITORY_NAME/trunk REPOSITORY_NAME 

Update

To download most recent version form repository use:

 svn update

Commit

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"

Adding

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 

Deleting

To remove resource (file / directory) use:

 svn del file 

Working with Cadence

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 

Setting up svn

getting access to svn server

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 PUBLIC KEY (~/.ssh/svn.pub) to SVN Administrator.

setting environment

SVN utilizes one of system editors to allow entering commit comments in interactive mode. Editor to be invoked is specified by environmental variable SVN_EDITOR. To change default editor you should set this variable in yours ~/.bashrc file, e.g:

 export SVN_EDITOR=vim 

typical use case

  1. going into repository directory
    cd YOUR_REPO
  2. getting latest version
    svn update
  3. work very hard
  4. work ending
    • getting latest version (someone may changed something while you were working on Yours local copy of data)
      svn update
    • if there are were any changes You should check if Your work is compatible with changes commited by someone
    • if You created any new files (cells, schematics, layouts, …) You should add them to repository
      smartsvn.py 
    • at the end You have to send changes to repository
      svn commit

      You should put (not to long, but having sense) comment

FAQ

rename cell

  • if You rename cell A to cell B under CADANCE, you have to :
    1. svn update
    2. svn del A
    3. svn_helper.py del_svn_info B
    4. svn_helper.py add B

switching to new access method

$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://svn@lumifun.ftj.agh.edu.pl/YOUR_REPO .

Example

$cd ~/IBM013/EUDET_VI_IBM

$ svn info                                                                                                                                                                                              
Ścieżka: .                                                                                                                                                                                                                                   
URL: http://svn.lumifun.ftj.agh.edu.pl/EUDET_VI_IBM/trunk                                                                                                                                                                                    
Katalog główny repozytorium: http://svn.lumifun.ftj.agh.edu.pl/EUDET_VI_IBM                                                                                                                                                                  
UUID repozytorium: 134063e6-8b79-43c4-80ea-df54b304f938                                                                                                                                                                                      
Wersja: 789                                                                                                                                                                                                                                  
Rodzaj obiektu: katalog                                                                                                                                                                                                                      
Zlecenie: normalne                                                                                                                                                                                                                           
Autor ostatniej zmiany: przyboro                                                                                                                                                                                                             
Ostatnio zmieniona wersja: 789                                                                                                                                                                                                               
Data ostatniej zmiany: 2012-05-18 15:57:54 +0200 (pią) 

$svn sw --relocate http://svn.lumifun.ftj.agh.edu.pl/EUDET_VI_IBM/trunk svn+ssh://svn@lumifun.ftj.agh.edu.pl/EUDET_VI_IBM/trunk .
[SVN] moron@hal:~/IBM013/EUDET_VI_IBM$ svn info                                                                                                                                                                                              
Ścieżka: .                                                                                                                                                                                                                                   
URL: svn+ssh://svn/EUDET_VI_IBM/trunk
Katalog główny repozytorium: svn+ssh://svn/EUDET_VI_IBM
UUID repozytorium: 134063e6-8b79-43c4-80ea-df54b304f938
Wersja: 789
Rodzaj obiektu: katalog
Zlecenie: normalne
Autor ostatniej zmiany: przyboro
Ostatnio zmieniona wersja: 789
Data ostatniej zmiany: 2012-05-18 15:57:54 +0200 (pią)
/services/www/http/wiki/data/attic/svn/start.1342778438.txt.gz · Last modified: 2019/03/08 14:06 (external edit)