svn basics

svn basics

Search for: svn basics

there is a concept of repositories

Seem like a decent read


branches
tags
trunks

Right click on any directory and you will see an svn menu list with a link to the svn browser


patch
merge

an svn repository can contain multiple sub trees

each sub directory has .svn sub directory on the client

This is maintained and used by svn to track, merge, publish etc.


/tree1/file1, file2, file3
/tree2/file1, file2, file3

svn checkout http://yourserver/repos/tree1

that you have a sub directory called .svn that contains meta info abou the files and directories and accordingly do its work

So if you right click on a file or a directory on windows svn knows what to do and what commands are applicable in that context

use update command to bring down what is new

Unlike those of many other version control systems, Subversion's revision numbers apply to entire trees, not individual files.


what is the revision
when was it last downloaded

/proj1/trunk/all-sub-directories
      /brances/*

A trunk is where your regular development tree is

A branch is a trunck copied at a certain point of time as a sub directory of /branches and continues its life there with its own checkin/checkouts.


There is one trunk but many brances.
branches start off as copies of trunk
brances can be merged back into trunk
(it may be equally possible to merge branches as well)
You can see this as:
   There are many branches out of which
   the main branch is called a trunck

You will see many trees of the project one for each revision

This will result in less number of revisions.

using the windows ui when you commit the system will tell you the differences in files and directories. You can cancel out of it

It will bring down the files and replace your files and merge if necessary. If there is no conflict you will not know that your files have changed. You will see the files indicated with conflict that need resolution

You can use the command "check for modifications" (right click off of a directory)

TortoiseSVN. An excellent tool.

You can download tortoise svn from here

as documented at the link above.

You will need an http url for the server hosting the svn repositories.

You will see a list of project trees. It is possible that there is only one project. Under each project you will see three trees

trunk
branches
tags

at this point you need a convention or direction from the maintainer where to get the latest. Depending on the team it may any one of these.

when it is made public most likely you will the trunk having the latest.


Take any local directory. 
Right click on it. 
Use checkout
it will ask you the URL for the repository
You can pick either
   a trunk
   or a branch
   or a tag

This will attach your local directory to the server tree and create a bunch of .svn subdirectories. These .svn sub directories then onwaards guide the tortoisesvn to communicate with the server for your updates, commits etc.

right click and update


right click 
tortoisesvn submenu
check for modifications

right click
commit

This will tell you what is going to be checkedin. You can selectively choose the list of items to be uploaded to server.

There is no visual indicator on the desktop like an icon. It is only visible through the file explorer.

the starting point is this

You know the server location of an SVN repository
Then you hook up a local directory to it
This is done by right clicking on yoru local directory

there is a server side url where a project is available
the project tree can be in
  a) trunk
  b) branch
  c) tag
install tortoise svn
point local directory to one of the above
Then you can
  a) get latest (udpate)
  b) check for modifications
  c) commit (checkin)