svn basics
satya - Wednesday, July 13, 2011 10:46:42 AM
there is a concept of repositories
there is a concept of repositories
satya - Wednesday, July 13, 2011 10:48:31 AM
concepts
branches
tags
trunks
satya - Wednesday, July 13, 2011 10:54:48 AM
on windows there is something called a repository browser
Right click on any directory and you will see an svn menu list with a link to the svn browser
satya - Wednesday, July 13, 2011 10:59:06 AM
more concepts
patch
merge
satya - Wednesday, July 13, 2011 11:03:52 AM
an svn repository can contain multiple sub trees
an svn repository can contain multiple sub trees
satya - Wednesday, July 13, 2011 11:04:50 AM
each sub directory has .svn sub directory on the client
each sub directory has .svn sub directory on the client
This is maintained and used by svn to track, merge, publish etc.
satya - Wednesday, July 13, 2011 11:06:23 AM
example of a repo
/tree1/file1, file2, file3
/tree2/file1, file2, file3
satya - Wednesday, July 13, 2011 11:07:33 AM
you can do this
svn checkout http://yourserver/repos/tree1
satya - Wednesday, July 13, 2011 11:10:34 AM
when you checkout svn knows
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
satya - Wednesday, July 13, 2011 11:15:08 AM
use update command to bring down what is new
use update command to bring down what is new
satya - Wednesday, July 13, 2011 11:17:33 AM
revisions are different from file revisions: surprise
Unlike those of many other version control systems, Subversion's revision numbers apply to entire trees, not individual files.
satya - Wednesday, July 13, 2011 11:20:50 AM
what does svn know about a file
what is the revision
when was it last downloaded
satya - Wednesday, July 13, 2011 11:26:48 AM
preferred trees
/proj1/trunk/all-sub-directories
/brances/*
satya - Wednesday, July 13, 2011 11:31:18 AM
trunck and branch explained
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.
satya - Wednesday, July 13, 2011 1:56:32 PM
what is the difference between trunk and a branch
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
satya - Wednesday, July 13, 2011 1:57:47 PM
what do i see inside a trunk or a branch
You will see many trees of the project one for each revision
satya - Wednesday, July 13, 2011 1:58:36 PM
It is better to checkin many files at once
This will result in less number of revisions.
satya - Wednesday, July 13, 2011 1:59:19 PM
Commiting in windows
using the windows ui when you commit the system will tell you the differences in files and directories. You can cancel out of it
satya - Wednesday, July 13, 2011 2:00:47 PM
when you update in windows
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
satya - Wednesday, July 13, 2011 2:02:27 PM
Before update you can check what has changed
You can use the command "check for modifications" (right click off of a directory)
satya - Wednesday, July 13, 2011 2:02:59 PM
what tool are you using: TortoiseSVN??
TortoiseSVN. An excellent tool.
satya - Wednesday, July 13, 2011 2:08:03 PM
You can download tortoise svn from here
satya - Wednesday, July 13, 2011 2:16:08 PM
Becareful to check the signature of the downloaded file
as documented at the link above.
satya - Wednesday, July 13, 2011 2:17:35 PM
Once you download
You will need an http url for the server hosting the svn repositories.
satya - Wednesday, July 13, 2011 2:20:29 PM
at a given svn repository location
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.
satya - Wednesday, July 13, 2011 2:24:34 PM
How to I attach a local directory to svn
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.
satya - Wednesday, July 13, 2011 2:24:53 PM
How can i get the latest code
right click and update
satya - Wednesday, July 13, 2011 2:26:44 PM
how can i see changes
right click
tortoisesvn submenu
check for modifications
satya - Wednesday, July 13, 2011 2:27:33 PM
how can i checkin
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.
satya - Wednesday, July 13, 2011 2:31:41 PM
what happens after I install tortoisesvn
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
satya - Wednesday, July 13, 2011 2:34:12 PM
what is the key to understand SVN in 30 minutes
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)