SlideShare una empresa de Scribd logo
1 de 97
Subversion
How to use Tortoise SVN client
for Subversion
Current Versions of Server
• Subversion 1.4.6
• Open source from Tigris.Org
Current Version of client
• TortoiseSVN 1.4.8 works against
Subversion 1.4.6
• Available at Tigris.org
• It works in the Windows Explorer, and is
not bound to any software development
tool
• Is similar to most industrial strength Version
control systems
• More robust
– Atomic commits
– Concurrent usage possible
– Repository is stored in trees with differential data
– No options like ‘Leave local copy / checkout from
repository ?’
– Can be used remotely with greater confidence
Advantages of SVN over VSS
‘Check out’
• Check out is done the first time the client
working copy (working folder) is being set
up
• Create a folder as instructed by the TL
(maybe D:/SVNClient)
• Right click on this new folder and choose
‘SVN Checkout’
Check out
• Click on the ‘SVN Checkout’ option in the
pop up menu
• A Checkout dialog box will pop up
• Key in the URL of the Subversion
repository
(svn://chakravarthy:3691/myWebApp)
• Ensure checkout directory is correct
• Click ‘Ok’
Checkout
• The authentication dialog box will open up
• Key in your ‘Username’ and ‘password’
• Press ‘Ok’
• The checkout dialog box will list the files it
has checked out and it’s revision number
Checkout
• The SVNClient folder now has a green tick
mark to say that the client working folder
(called working copy) is in synch with the
repository
Work as usual ..
• Work as usual to edit or add files in the
folders which have the working copy
• Please note that TortoiseSVN is not
integrated into Visual Studio.NET .
Working on the files
• After some time you save your work
• Now notice the red tick mark on the file
you just now edited
What was the change I did ..
• You can see what are the changes you did
just now
• Right click on the file with the red tick,
choose ‘TortoiseSVN’ and choose ‘Diff’
Changes I did …
• You get a difference between the working
copy and the version you had recently
updated from server
Send changes to repository
• Now that you are satisfied with the change
you made, you can ‘commit’ the change to
the server
• Right click on the file, or any of its parent
folders, and choose ‘SVN Commit’
Key in commit message
• The log message box opens for you to
select the files you wish to commit. Tick
the files you wish to commit
• Only commit files that you are editing, or
files which are needed to rebuild the
system . Do not commit outputs of
compilation
• Key in a suitable message for this commit
Oops file has changed in repository
• If someone else has already committed
the very same file in the meantime, SVN
will ask you to first update your working
copy
Update the working copy
• Right click the file or the parent folders
and choose the ‘SVN Update’ option
Merged
• You will now get a ‘merged’ message box
which means that your change and the
change in the server have got merged in
the working copy
My first conflict !
• If the file I am trying to commit is out of
date, SVN asks me to update my copy first
• So I update it
• However, if the same lines have been
edited or touched in my working copy as
well as the Repository copy, then I get a
conflict error message …..
• The file and folders now have a yellow
warning sign
When there is a conflict …
• When there is a conflict there are 2
additional files beside the file which has
the conflict
• These files have names like
‘filename.mine’, ‘filename.revisionx’ and
‘filename.revisiony’
• Open the conflicting file in an editor
Conflict
• The changes made by you and the
changes made by the other SVN user are
marked by arrows <<<<<<<
• Your change has a caption ‘.mine’ and the
other change has a caption ‘.r(n)’ where n
is the revision number
Edit the conflicting file
• Retain the change which is correct, and
remove the unwanted change
• Save the file
Click the ‘Resolved’ option
• Having cleaned up the conflicting file, now
right click the file or the parent folders and
click the ‘Resolved’ option
Conflict has been resolved
• Conflict has been resolved , unwanted
revision files removed
• Now we need to commit
How to add a file to the repository
• If you have added a file in your working
copy which needs to be added to
repository, right click the file and click
‘Add’
• The ‘file’ that has been added will have a
blue plus sign – but it is not yet in
repository !
Deleting a file in Server
• If you choose a folder / file , right click ,
choose ‘Delete’ and then commit, the
files / folders will get deleted from the
repository
• If you only want to delete the client copy
and get a fresh one from repository, use a
normal file delete and Update your root
folder
Delete a file in SVN
Deleting a file using Tortoise
• Now the file ‘A new file’ has disappeared
from the folder since I used the Tortoise
Delete option against the file
Now I try to commit the parent
folder
The folder needs to be comitted
• After deleting a file using the Tortoise
client, the parent folder needs to be
committed for the file to be deleted from
the repository
• Otherwise the client file would have been
deleted but the server repository still has
the file
Use Tortoise rename
• If you wish to rename a file which is under
SVN, use the Tortoise rename, not the
Windows file rename
Renaming
• The tortoise rename does 2 steps – it first
copies the file to another file with the new
name and it deletes the earlier file
Commit folder after rename
View the history of all changes
• To view who did what , right click the
folder, or file and choose ‘Show Log’
See modifications
• Right click and choose ‘Check for
modifications’
To see contents of Repository
• Right click any item in SVN client, choose
‘Repo browser’
How to tag
• svn copy comes to the rescue. If you want to
create a snapshot of /calc/trunk exactly as it
looks in the HEAD revision, then make a copy of
it:
• $ svn copy
http://svn.example.com/repos/calc/trunk 
http://svn.example.com/repos/calc/tags/release-
1.0  -m "Tagging the 1.0 release of the 'calc'
project." Committed revision 351. This example
assumes that a /calc/tags directory already
exists. (If it doesn't, see svn mkdir).
Authorization
• SVN can authorize a person to read, or
read and write , or not read any particular
folder
• So the SVN Admin will be assigning folder
rights to different roles so that each user
of a certain role only gets the file rights
that is required for him
Resources
• Please read the Tortoise SVN Help which
will be in the client
• You could also read the SVN Book in the
site http://svnbook.red-bean.com/
Glossary – BASE revision
• This is the revision the file or folder was in,
when the last checkout, update or commit
was run .
Glossary - Branch
• You can create a branch off the main
development line so as to develop a new
feature without rendering the main line
unstable. Or you can branch a stable
release to which you make only bugfixes,
while new developments take place on the
unstable trunk. In Subversion a branch is
implemented as a “cheap copy”.
Glossary - Blame
• This command is for text files only, and it
annotates every line to show the
repository revision in which it was last
changed, and the author who made that
change. Our GUI implementation is called
TortoiseBlame and it also shows the
commit date/time and the log message
when you hover the mouse of the revision
number.
Glossary - Commit
• This Subversion command is used to pass
the changes in your local working copy
back into the repository, creating a new
repository revision.
Glossary BDB
• Berkeley DB. A well tested database
backend for repositories, that cannot be
used on network shares. Default for pre
1.2 repositories.
Glossary - Checkout
• A Subversion command which creates a
local working copy in an empty directory
by downloading versioned files from the
repository.
Glossary - Copy
In a Subversion repository you can create a
copy of a single file or an entire tree. These
are implemented as “cheap copies” which act
a bit like a link to the original in that they take
up almost no space. Making a copy preserves
the history of the item in the copy, so you can
trace changes made before the copy was
made.
To ‘tag’ a version , create a SVN folder and use
‘Copy’ to copy the snapshot to the new folder
Glossary - Export
• This command produces a copy of a
versioned folder, just like a working copy,
but without the local .svn folders.
FSFS
• FS File system. A proprietary Subversion
file system backend for repositories. Can
be used on network shares. Default for 1.2
and newer repositories.
Diff
• Shorthand for “Show Differences”. Very
useful when you want to see exactly what
changes have been made.
HEAD revision
• The latest revision of a file or folder in the
repository.
Glossary - Patch
• If a working copy has changes to text files only,
it is possible to use Subversion's Diff command
to generate a single file summary of those
changes in Unified Diff format. A file of this type
is often referred to as a “Patch”, and it can be
emailed to someone else (or to a mailing list)
and applied to another working copy. Someone
without commit access can make changes and
submit a patch file for an authorized committer to
apply. Or if you are unsure about a change you
can submit a patch for others to review.
Glossary - Merge
– The process by which changes from the
repository are added to your working copy
without disrupting any changes you have
already made locally. Sometimes these
changes cannot be reconciled automatically
and the working copy is said to be in conflict.
– Merging happens automatically when you
update your working copy. You can also
merge specific changes from another branch
using TortoiseSVN's Merge command.
Glossary - Switch
• Just as “Update-to-revision” changes the
time window of a working copy to look at a
different point in history, so “Switch”
changes the space window of a working
copy so that it points to a different part of
the repository. It is particularly useful when
working on trunk and branches where only
a few files differ. You can switch your
working copy between the two and only
the changed files will be transferred.
Glossary - Update
• This Subversion command pulls down the
latest changes from the repository into
your working copy, merging any changes
made by others with local changes in the
working copy
Glossary – Working Copy
• This is your local “sandbox”, the area
where you work on the versioned files,
and it normally resides on your local hard
disk. You create a working copy by doing
a “Checkout” from a repository, and you
feed your changes back into the repository
using “Commit”.
Glossary - Property
• In addition to versioning your directories and
files, Subversion allows you to add versioned
metadata - referred to as “properties” to each of
your versioned directories and files. Each
property has a name and a value, rather like a
registry key. Subversion has some special
properties which it uses internally, such as
svn:eol-style. TortoiseSVN has some too, such
as tsvn:logminsize. You can add your own
properties with any name and value you choose
Glossary - Import
• Subversion command to import an entire
folder hierarchy into the repository in a
single revision
Glossary - Relocate
• If your repository moves, perhaps because you
have moved it to a different directory on your
server, or the server domain name has changed,
you need to “relocate” your working copy so that
its repository URLs point to the new location.
• Note: you should only use this command if your
working copy is referring to the same location in
the same repository, but the repository itself has
moved. In any other circumstance you probably
need the “Switch” command instead.
Glossary - Revision
• Every time you commit a set of changes,
you create one new “revision” in the
repository. Each revision represents the
state of the repository tree at a certain
point in its history. If you want to go back
in time you can examine the repository as
it was at revision N.
Glossary - Lock
• When you take out a lock on a versioned
item, you mark it in the repository as un-
committable, except from the working
copy where the lock was taken out.
Glossary - Cleanup
• To quote from the Subversion book: “
Recursively clean up the working copy,
removing locks and resuming unfinished
operations. If you ever get a working copy
locked error, run this command to remove
stale locks and get your working copy into
a usable state again. ” Note that in this
context “lock” refers to local file system
locking, not repository locking.
Integration with Bug Tracking
• To tag each commit to a Bug ID, you can
set one these one of these properties
while configuring Subversion :-
• bugtraq:url : Set this property to the url of
your bugtracking tool. It must be properly
URI encoded and it has to contain
%BUGID%
• http://issues.tortoisesvn.net/?
do=details&id=%BUGID%
Integration with bug tracking
• bugtraq:warnifnoissue
• Set this to true, if you want TortoiseSVN to
warn you because of an empty
issuenumber textfield. Valid values are
true/false. If not defined, false is assumed.
Integration with Bug Tracking
• bugtraq:logregex
• This property activates the Bugtracking
System in Regex mode. It contains one or
two regular expressions, separated by a
newline
• If only one expression is set, then the bare
bug ID's must be matched in the groups of
the regex string. Example: [Ii]ssue(?:s)?
#?(d+)
Tools to integrate with VS.NET
• AnkhSVN
• VisualSVN

Más contenido relacionado

La actualidad más candente

Subversion workshop
Subversion workshopSubversion workshop
Subversion workshopTrafeX
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesVu Hung Nguyen
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to SubversionAtul Jha
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best PracticesMatt Wood
 
Part 4 - Managing your svn repository using jas forge
Part 4  - Managing your svn repository using jas forgePart 4  - Managing your svn repository using jas forge
Part 4 - Managing your svn repository using jas forgeJasmine Conseil
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overviewpolarion
 
Subversion
SubversionSubversion
Subversionthebdot1
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With SubversionJordan Hatch
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP DevelopersLorna Mitchell
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practicesabackstrom
 
How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLabPablo Arriazu
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVNPHPBelgium
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with SubversionGuy K. Kloss
 

La actualidad más candente (20)

Subversion workshop
Subversion workshopSubversion workshop
Subversion workshop
 
Nguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practicesNguyễn Vũ Hưng: Subversion best practices
Nguyễn Vũ Hưng: Subversion best practices
 
SVN Basics
SVN BasicsSVN Basics
SVN Basics
 
SVN Information
SVN Information  SVN Information
SVN Information
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Introduction to Subversion
Introduction to SubversionIntroduction to Subversion
Introduction to Subversion
 
Subversion Best Practices
Subversion Best PracticesSubversion Best Practices
Subversion Best Practices
 
Part 4 - Managing your svn repository using jas forge
Part 4  - Managing your svn repository using jas forgePart 4  - Managing your svn repository using jas forge
Part 4 - Managing your svn repository using jas forge
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
Subversion Overview
Subversion OverviewSubversion Overview
Subversion Overview
 
Subversion
SubversionSubversion
Subversion
 
Getting Started With Subversion
Getting Started With SubversionGetting Started With Subversion
Getting Started With Subversion
 
Practical SVN for PHP Developers
Practical SVN for PHP DevelopersPractical SVN for PHP Developers
Practical SVN for PHP Developers
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
Svn tutorial
Svn tutorialSvn tutorial
Svn tutorial
 
How to use CVS applied to SOLab
How to use CVS applied to SOLabHow to use CVS applied to SOLab
How to use CVS applied to SOLab
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
Subversion last minute survival crash course
Subversion  last minute survival crash courseSubversion  last minute survival crash course
Subversion last minute survival crash course
 
Version Control with SVN
Version Control with SVNVersion Control with SVN
Version Control with SVN
 
Version Control with Subversion
Version Control with SubversionVersion Control with Subversion
Version Control with Subversion
 

Similar a Subversion client

Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptxUTKARSHBHARDWAJ71
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .UnixTrong Dinh
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .UnixTrong Dinh
 
02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)Mohammed Shaban
 
Difference between team foundation server and subversion
Difference between team foundation server and subversionDifference between team foundation server and subversion
Difference between team foundation server and subversionUmar Ali
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversionMangesh Bhujbal
 
Version Control Training - First Lego League
Version Control Training - First Lego LeagueVersion Control Training - First Lego League
Version Control Training - First Lego LeagueJeffrey T. Pollock
 
SVN session from PiTechnologies
SVN session from PiTechnologies SVN session from PiTechnologies
SVN session from PiTechnologies PiTechnologies
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profitGeeks Anonymes
 
Grasp(eo) versioning system Final presentation
Grasp(eo) versioning system Final presentationGrasp(eo) versioning system Final presentation
Grasp(eo) versioning system Final presentationNikita Grishin
 
Drupal Version Control & File System Basics
Drupal Version Control & File System BasicsDrupal Version Control & File System Basics
Drupal Version Control & File System BasicsJulia Kulla-Mader
 

Similar a Subversion client (20)

Subversion
SubversionSubversion
Subversion
 
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptx
 
SVN
SVNSVN
SVN
 
Source control
Source controlSource control
Source control
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion on .Unix
Subversion on .UnixSubversion on .Unix
Subversion on .Unix
 
Subversion
SubversionSubversion
Subversion
 
Random House
Random HouseRandom House
Random House
 
02-version control(DevOps Series)
02-version control(DevOps Series)02-version control(DevOps Series)
02-version control(DevOps Series)
 
Difference between team foundation server and subversion
Difference between team foundation server and subversionDifference between team foundation server and subversion
Difference between team foundation server and subversion
 
Source version control using subversion
Source version control using subversionSource version control using subversion
Source version control using subversion
 
Version Control Training - First Lego League
Version Control Training - First Lego LeagueVersion Control Training - First Lego League
Version Control Training - First Lego League
 
subversion.ppt
subversion.pptsubversion.ppt
subversion.ppt
 
SVN session from PiTechnologies
SVN session from PiTechnologies SVN session from PiTechnologies
SVN session from PiTechnologies
 
Git
GitGit
Git
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
Grasp(eo) versioning system Final presentation
Grasp(eo) versioning system Final presentationGrasp(eo) versioning system Final presentation
Grasp(eo) versioning system Final presentation
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
Drupal Version Control & File System Basics
Drupal Version Control & File System BasicsDrupal Version Control & File System Basics
Drupal Version Control & File System Basics
 
Subversion
SubversionSubversion
Subversion
 

Más de rchakra

Requirement management presentation to a software team
Requirement management presentation to a software teamRequirement management presentation to a software team
Requirement management presentation to a software teamrchakra
 
Sql 2005 the ranking functions
Sql 2005   the ranking functionsSql 2005   the ranking functions
Sql 2005 the ranking functionsrchakra
 
Sql basics 2
Sql basics 2Sql basics 2
Sql basics 2rchakra
 
T-Sql basics
T-Sql basicsT-Sql basics
T-Sql basicsrchakra
 
Sql architecture
Sql architectureSql architecture
Sql architecturerchakra
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NETrchakra
 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET rchakra
 
Object oriented programming systems
Object oriented programming systemsObject oriented programming systems
Object oriented programming systemsrchakra
 
Subversion Admin
Subversion AdminSubversion Admin
Subversion Adminrchakra
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2rchakra
 
Intro To .Net Threads
Intro To .Net ThreadsIntro To .Net Threads
Intro To .Net Threadsrchakra
 

Más de rchakra (11)

Requirement management presentation to a software team
Requirement management presentation to a software teamRequirement management presentation to a software team
Requirement management presentation to a software team
 
Sql 2005 the ranking functions
Sql 2005   the ranking functionsSql 2005   the ranking functions
Sql 2005 the ranking functions
 
Sql basics 2
Sql basics 2Sql basics 2
Sql basics 2
 
T-Sql basics
T-Sql basicsT-Sql basics
T-Sql basics
 
Sql architecture
Sql architectureSql architecture
Sql architecture
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
Intro to Microsoft.NET
Intro to Microsoft.NET Intro to Microsoft.NET
Intro to Microsoft.NET
 
Object oriented programming systems
Object oriented programming systemsObject oriented programming systems
Object oriented programming systems
 
Subversion Admin
Subversion AdminSubversion Admin
Subversion Admin
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2
 
Intro To .Net Threads
Intro To .Net ThreadsIntro To .Net Threads
Intro To .Net Threads
 

Subversion client

  • 1. Subversion How to use Tortoise SVN client for Subversion
  • 2. Current Versions of Server • Subversion 1.4.6 • Open source from Tigris.Org
  • 3. Current Version of client • TortoiseSVN 1.4.8 works against Subversion 1.4.6 • Available at Tigris.org • It works in the Windows Explorer, and is not bound to any software development tool
  • 4. • Is similar to most industrial strength Version control systems • More robust – Atomic commits – Concurrent usage possible – Repository is stored in trees with differential data – No options like ‘Leave local copy / checkout from repository ?’ – Can be used remotely with greater confidence Advantages of SVN over VSS
  • 5. ‘Check out’ • Check out is done the first time the client working copy (working folder) is being set up • Create a folder as instructed by the TL (maybe D:/SVNClient) • Right click on this new folder and choose ‘SVN Checkout’
  • 6.
  • 7. Check out • Click on the ‘SVN Checkout’ option in the pop up menu • A Checkout dialog box will pop up • Key in the URL of the Subversion repository (svn://chakravarthy:3691/myWebApp) • Ensure checkout directory is correct • Click ‘Ok’
  • 8.
  • 9. Checkout • The authentication dialog box will open up • Key in your ‘Username’ and ‘password’ • Press ‘Ok’ • The checkout dialog box will list the files it has checked out and it’s revision number
  • 10.
  • 11. Checkout • The SVNClient folder now has a green tick mark to say that the client working folder (called working copy) is in synch with the repository
  • 12.
  • 13. Work as usual .. • Work as usual to edit or add files in the folders which have the working copy • Please note that TortoiseSVN is not integrated into Visual Studio.NET .
  • 14.
  • 15. Working on the files • After some time you save your work • Now notice the red tick mark on the file you just now edited
  • 16.
  • 17. What was the change I did .. • You can see what are the changes you did just now • Right click on the file with the red tick, choose ‘TortoiseSVN’ and choose ‘Diff’
  • 18.
  • 19. Changes I did … • You get a difference between the working copy and the version you had recently updated from server
  • 20.
  • 21. Send changes to repository • Now that you are satisfied with the change you made, you can ‘commit’ the change to the server • Right click on the file, or any of its parent folders, and choose ‘SVN Commit’
  • 22.
  • 23. Key in commit message • The log message box opens for you to select the files you wish to commit. Tick the files you wish to commit • Only commit files that you are editing, or files which are needed to rebuild the system . Do not commit outputs of compilation • Key in a suitable message for this commit
  • 24.
  • 25. Oops file has changed in repository • If someone else has already committed the very same file in the meantime, SVN will ask you to first update your working copy
  • 26.
  • 27. Update the working copy • Right click the file or the parent folders and choose the ‘SVN Update’ option
  • 28.
  • 29. Merged • You will now get a ‘merged’ message box which means that your change and the change in the server have got merged in the working copy
  • 30.
  • 31. My first conflict ! • If the file I am trying to commit is out of date, SVN asks me to update my copy first • So I update it • However, if the same lines have been edited or touched in my working copy as well as the Repository copy, then I get a conflict error message ….. • The file and folders now have a yellow warning sign
  • 32.
  • 33. When there is a conflict … • When there is a conflict there are 2 additional files beside the file which has the conflict • These files have names like ‘filename.mine’, ‘filename.revisionx’ and ‘filename.revisiony’ • Open the conflicting file in an editor
  • 34. Conflict • The changes made by you and the changes made by the other SVN user are marked by arrows <<<<<<< • Your change has a caption ‘.mine’ and the other change has a caption ‘.r(n)’ where n is the revision number
  • 35.
  • 36. Edit the conflicting file • Retain the change which is correct, and remove the unwanted change • Save the file
  • 37.
  • 38. Click the ‘Resolved’ option • Having cleaned up the conflicting file, now right click the file or the parent folders and click the ‘Resolved’ option
  • 39.
  • 40.
  • 41. Conflict has been resolved • Conflict has been resolved , unwanted revision files removed • Now we need to commit
  • 42.
  • 43. How to add a file to the repository • If you have added a file in your working copy which needs to be added to repository, right click the file and click ‘Add’ • The ‘file’ that has been added will have a blue plus sign – but it is not yet in repository !
  • 44.
  • 45.
  • 46.
  • 47. Deleting a file in Server • If you choose a folder / file , right click , choose ‘Delete’ and then commit, the files / folders will get deleted from the repository • If you only want to delete the client copy and get a fresh one from repository, use a normal file delete and Update your root folder
  • 48. Delete a file in SVN
  • 49. Deleting a file using Tortoise • Now the file ‘A new file’ has disappeared from the folder since I used the Tortoise Delete option against the file
  • 50.
  • 51. Now I try to commit the parent folder
  • 52. The folder needs to be comitted • After deleting a file using the Tortoise client, the parent folder needs to be committed for the file to be deleted from the repository • Otherwise the client file would have been deleted but the server repository still has the file
  • 53.
  • 54. Use Tortoise rename • If you wish to rename a file which is under SVN, use the Tortoise rename, not the Windows file rename
  • 55.
  • 56. Renaming • The tortoise rename does 2 steps – it first copies the file to another file with the new name and it deletes the earlier file
  • 57.
  • 59. View the history of all changes • To view who did what , right click the folder, or file and choose ‘Show Log’
  • 60.
  • 61.
  • 62. See modifications • Right click and choose ‘Check for modifications’
  • 63.
  • 64.
  • 65.
  • 66. To see contents of Repository • Right click any item in SVN client, choose ‘Repo browser’
  • 67.
  • 68.
  • 69. How to tag • svn copy comes to the rescue. If you want to create a snapshot of /calc/trunk exactly as it looks in the HEAD revision, then make a copy of it: • $ svn copy http://svn.example.com/repos/calc/trunk http://svn.example.com/repos/calc/tags/release- 1.0 -m "Tagging the 1.0 release of the 'calc' project." Committed revision 351. This example assumes that a /calc/tags directory already exists. (If it doesn't, see svn mkdir).
  • 70. Authorization • SVN can authorize a person to read, or read and write , or not read any particular folder • So the SVN Admin will be assigning folder rights to different roles so that each user of a certain role only gets the file rights that is required for him
  • 71. Resources • Please read the Tortoise SVN Help which will be in the client • You could also read the SVN Book in the site http://svnbook.red-bean.com/
  • 72. Glossary – BASE revision • This is the revision the file or folder was in, when the last checkout, update or commit was run .
  • 73. Glossary - Branch • You can create a branch off the main development line so as to develop a new feature without rendering the main line unstable. Or you can branch a stable release to which you make only bugfixes, while new developments take place on the unstable trunk. In Subversion a branch is implemented as a “cheap copy”.
  • 74. Glossary - Blame • This command is for text files only, and it annotates every line to show the repository revision in which it was last changed, and the author who made that change. Our GUI implementation is called TortoiseBlame and it also shows the commit date/time and the log message when you hover the mouse of the revision number.
  • 75. Glossary - Commit • This Subversion command is used to pass the changes in your local working copy back into the repository, creating a new repository revision.
  • 76. Glossary BDB • Berkeley DB. A well tested database backend for repositories, that cannot be used on network shares. Default for pre 1.2 repositories.
  • 77. Glossary - Checkout • A Subversion command which creates a local working copy in an empty directory by downloading versioned files from the repository.
  • 78. Glossary - Copy In a Subversion repository you can create a copy of a single file or an entire tree. These are implemented as “cheap copies” which act a bit like a link to the original in that they take up almost no space. Making a copy preserves the history of the item in the copy, so you can trace changes made before the copy was made. To ‘tag’ a version , create a SVN folder and use ‘Copy’ to copy the snapshot to the new folder
  • 79. Glossary - Export • This command produces a copy of a versioned folder, just like a working copy, but without the local .svn folders.
  • 80. FSFS • FS File system. A proprietary Subversion file system backend for repositories. Can be used on network shares. Default for 1.2 and newer repositories.
  • 81. Diff • Shorthand for “Show Differences”. Very useful when you want to see exactly what changes have been made.
  • 82. HEAD revision • The latest revision of a file or folder in the repository.
  • 83. Glossary - Patch • If a working copy has changes to text files only, it is possible to use Subversion's Diff command to generate a single file summary of those changes in Unified Diff format. A file of this type is often referred to as a “Patch”, and it can be emailed to someone else (or to a mailing list) and applied to another working copy. Someone without commit access can make changes and submit a patch file for an authorized committer to apply. Or if you are unsure about a change you can submit a patch for others to review.
  • 84. Glossary - Merge – The process by which changes from the repository are added to your working copy without disrupting any changes you have already made locally. Sometimes these changes cannot be reconciled automatically and the working copy is said to be in conflict. – Merging happens automatically when you update your working copy. You can also merge specific changes from another branch using TortoiseSVN's Merge command.
  • 85. Glossary - Switch • Just as “Update-to-revision” changes the time window of a working copy to look at a different point in history, so “Switch” changes the space window of a working copy so that it points to a different part of the repository. It is particularly useful when working on trunk and branches where only a few files differ. You can switch your working copy between the two and only the changed files will be transferred.
  • 86. Glossary - Update • This Subversion command pulls down the latest changes from the repository into your working copy, merging any changes made by others with local changes in the working copy
  • 87. Glossary – Working Copy • This is your local “sandbox”, the area where you work on the versioned files, and it normally resides on your local hard disk. You create a working copy by doing a “Checkout” from a repository, and you feed your changes back into the repository using “Commit”.
  • 88. Glossary - Property • In addition to versioning your directories and files, Subversion allows you to add versioned metadata - referred to as “properties” to each of your versioned directories and files. Each property has a name and a value, rather like a registry key. Subversion has some special properties which it uses internally, such as svn:eol-style. TortoiseSVN has some too, such as tsvn:logminsize. You can add your own properties with any name and value you choose
  • 89. Glossary - Import • Subversion command to import an entire folder hierarchy into the repository in a single revision
  • 90. Glossary - Relocate • If your repository moves, perhaps because you have moved it to a different directory on your server, or the server domain name has changed, you need to “relocate” your working copy so that its repository URLs point to the new location. • Note: you should only use this command if your working copy is referring to the same location in the same repository, but the repository itself has moved. In any other circumstance you probably need the “Switch” command instead.
  • 91. Glossary - Revision • Every time you commit a set of changes, you create one new “revision” in the repository. Each revision represents the state of the repository tree at a certain point in its history. If you want to go back in time you can examine the repository as it was at revision N.
  • 92. Glossary - Lock • When you take out a lock on a versioned item, you mark it in the repository as un- committable, except from the working copy where the lock was taken out.
  • 93. Glossary - Cleanup • To quote from the Subversion book: “ Recursively clean up the working copy, removing locks and resuming unfinished operations. If you ever get a working copy locked error, run this command to remove stale locks and get your working copy into a usable state again. ” Note that in this context “lock” refers to local file system locking, not repository locking.
  • 94. Integration with Bug Tracking • To tag each commit to a Bug ID, you can set one these one of these properties while configuring Subversion :- • bugtraq:url : Set this property to the url of your bugtracking tool. It must be properly URI encoded and it has to contain %BUGID% • http://issues.tortoisesvn.net/? do=details&id=%BUGID%
  • 95. Integration with bug tracking • bugtraq:warnifnoissue • Set this to true, if you want TortoiseSVN to warn you because of an empty issuenumber textfield. Valid values are true/false. If not defined, false is assumed.
  • 96. Integration with Bug Tracking • bugtraq:logregex • This property activates the Bugtracking System in Regex mode. It contains one or two regular expressions, separated by a newline • If only one expression is set, then the bare bug ID's must be matched in the groups of the regex string. Example: [Ii]ssue(?:s)? #?(d+)
  • 97. Tools to integrate with VS.NET • AnkhSVN • VisualSVN