SubVersion Presentation
SubVersion Presentation
5 Version
Control Tool
What is Subversion
Fundamental Concepts
Repository
How Subversion handles Repository
Difference between Subversion and clearcase
Working copy
Revisions
CollabNet Subversion1.5 2
What is Subversion
Subversion is a free/open-source version control system. Collabnet is a company
hosting Subversion tool as a service
CollabNet Subversion manages files and directories, and the changes made to
them
This tool allows you to recover older versions of your data, or examine the
history of how data changed.
CollabNet Subversion1.5 3
Fundamental Concepts
The Repository
CollabNet Subversion1.5 4
Fundamental Concepts
CollabNet Subversion1.5 5
Fundamental Concepts
This will be used in downloading needed files and directories from the
repository to the working copy.
CollabNet Subversion1.5 6
Fundamental Concepts
Working Copy
Conti….
CollabNet Subversion1.5 7
Fundamental Concepts
Working Copy
Working directory will contain some extra files created and maintained
by subversion to carry out these operations. In particular .svn subdirectory
will be there in each directory.
CollabNet Subversion1.5 8
Fundamental Concepts
Revisions
A.c B.c C.c
1 2 3 Revision 3
CollabNet Subversion1.5 9
Fundamental Concepts
Revisions
Exp Shown Here :
A.c B.c C.c
1 2 3
Revision 4
CollabNet Subversion1.5 10
Fundamental Concepts
Revisions
Exp Shown Here :
CollabNet Subversion1.5 11
Fundamental Concepts
Revisions
Each revision is assigned a unique natural number, one greater than the
number of the previous revision.
CollabNet Subversion1.5 12
Working Copy detailed discussion
Basic usage
Example :
CollabNet Subversion1.5 13
Working Copy detailed discussion
• TortoiseSVN (GUI ) Version
CollabNet Subversion1.5 14
Working Copy detailed discussion
CollabNet Subversion1.5 15
Working Copy detailed discussion
Select the top-level folder of project directory structure in the windows explorer and right
click to open the context menu. Select the command TortoiseSVN → Import... which brings
up a dialog box.
CollabNet Subversion1.5 16
Working Copy detailed discussion
CollabNet Subversion1.5 17
Working Copy detailed discussion
Update :
Command: svn update
This will update repository, as changes made in working copy.
Exp: svn update
U Testing.c
Updated to revision 7.
CollabNet Subversion1.5 18
Working Copy detailed discussion
Make Changes in Working Copy
CollabNet Subversion1.5 19
Working Copy detailed discussion
Make Changes in Working Copy
History:
To find information about the history of a file or directory,
There are several commands that can provide you with historical data
from the repository.
svn log
Shows you broad information: log messages with date and author
information attached to revisions, and which paths changed in each
revision.
Command: svn log
This command provides the information about who made the changes,
which revision, date and time etc ….
CollabNet Subversion1.5 20
Working Copy detailed discussion
Make Changes in Working Copy
Exp:
svn log
-----------------------------------------------------------------------
r3 | Srikanth | Mon, 15 Jul 2002 18:03:46 -0500 | 1 line
Added include lines and corrected # of cheese slices.
-----------------------------------------------------------------------
r2 | Srikanth| Mon, 15 Jul 2002 17:47:57 -0500 | 1 line
Added first method!!!
------------------------------------------------------------------------
r1 | Srikanth| Mon, 15 Jul 2002 17:40:08 -0500 | 1 line
Initial check-in
-----------------------------------------------------------------------
CollabNet Subversion1.5 . 21
Working Copy detailed discussion
svn diff
CollabNet Subversion1.5 . 22
Working Copy detailed discussion
svn cat
• Retrieves a file as it existed in a particular revision number
and display it on your screen.
• Command: svn cat –r <Number> <file_name>
• Will fetch the content of the file @ revision <number>.
svn list
• Displays the files in a directory for any given revision.
• Command: svn list –r <number>
CollabNet Subversion1.5 . 23
Branching and Merging
Branch:
Concept of Branching is to maintain line of development
independent of each other.
CollabNet Subversion1.5 . 24
Branching and Merging
Exp:
D:\Srikanth_Rep\Play>svn copy trunk/*.*
branches/Dev_Test
svn: Skipping argument: 'trunk/.svn' ends in a reserved name
A branches\Dev_Test\First.txt
A branches\Dev_Test\second.txt
This will copy (add) all files and folders in trunk folder
to branches/Dev_test folder.
Then if you commit branches folder to
repository then the revision graph of file first.txt looks
something similar to this.
CollabNet Subversion1.5 . 25
Branching and Merging
Branches
CollabNet Subversion1.5 . 26
Branching and Merging
Merge :
Branches are used to maintain separate lines of development, at some stage it has to merge
back into the Main development branch
Merge always happen with the working copy to the branch from which we need to merge
CollabNet Subversion1.5 . 27
Branching and Merging
Merge :
Reintegrate a branch
This Method covers the case where from branch is in sync with to branch changes and
extra changes done in from branch.
After the merge from branch and to branch are same.
CollabNet Subversion1.5 . 28
Branching and Merging
Merge :
CollabNet Subversion1.5 . 29
Branching and Merging
Merge :
CollabNet Subversion1.5 . 30
Branching and Merging
Merge :
CollabNet Subversion1.5 . 31
Branching and Merging
Merge :
CollabNet Subversion1.5 . 32
Branching and Merging
Merge :
Merge :
CollabNet Subversion1.5 . 34
Branching and Merging
Merge :
Conflict in Merge
FIDELITY INVESTMENTS I CONFIDENTIAL INFORMATION 2006
CollabNet Subversion1.5 . 35
Branching and Merging
Merge :
Conflict in Merge
FIDELITY INVESTMENTS I CONFIDENTIAL INFORMATION 2006
CollabNet Subversion1.5 . 36
Working Copy detailed discussion
CollabNet Subversion1.5 . 37
Working Copy detailed discussion
CollabNet Subversion1.5 . 38
Installation instruction
CollabNet Subversion1.5 . 39
Q&A
Thank You
CollabNet Subversion1.5 . 40