Thursday 29 November 2012

What is SVN and how to use svn

SVN stands for Subversion , it allow developers to simultaneously work on a centralised project.

svn checkout

To check out means that you copy all the documents that your projects are working on to your computer.

The first commands
Go to home directory  and write cd  and give the following command:

svn co <user name>

where you have replaced <your_username> with the username you have aquired from the admin. This will enable you to check in your work. If you don't have a user name or just want to browse our code, just skip the username
Update your working copy
svn up
Scedule a file for addition
svn add filename ex(test.pl)

Schedule a file for deletion
svn delete filename
You may also copy and move files and directories with these two commands, but read about them in the svn 
svn copy filename ex(last.pl)
svn move filename ex(last1.pl)

Examine your changes
svn status
Examine the file history
svn log FILE
 
Change the commit message for a specific revision
svn propedit svn:log --revprop -r REV FILE
This will bring up the existing log text for the specified revision in your deta.This is useful if you accidentally committed some changes with an empty or uninformative log message.
Compare your modified file to the version in the repository
svn diff FILE
 
Compare some earlier versions, say here versions 100 and95
svn diff -r 100:95 FILE
 
Undo your local changes (ie revert to the repository status)
svn revert FILE
 
Resolve Conflicts  and Others' Changes
svn update
svn resolved

Commit your changes
svn ci -m "Your description of the changes here." FILE
 
  the above changes, add, delete, copy, move, must all be committed by ci in order to take effect