Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20.
Let Use SVN(Subversion)
Interaction Lab.Hyo-Geun Ahn
2011. 04. 20.
What is version control?
• Version management allows you to control and monitor changes to files– What changes were made?– Revert to previous versions– When were changes made– What code was present in release version
• Earliest tools were around 1972 (SCCS)• Older tools : RCS, CVS, Microsoft Source
Safe, PVCS• Current tools : Subversion, Mercurial, Git,
Bazaar
SVN
• It’s popular version control program• Free• It’s well supported– IDEs : MS Visual Studio, Eclipse, Xcode etc.– Cross Platform : Windows, Linux, Mac OS
• I will explain SVN by using MS visual studio 2010.
SVN Structure
Server(Repository)
Client(e.g.
MSVS)
Client(e.g.
Eclipse)
Client(e.g.
XCode)…
My Server
Provided Server
http://www.projectlocker.com
http://www.visualsvn.com/server
Repository
• Storing the source file and saving the changed log
• Each client can access server to read and write source.
VisualSVN
• Access URL : Host IP or computer name
e.g. https://220.68.84.69/svnhttps://ilab-ahn/svn
• We can use http protocol or https protocol
e.g.http://~~https://~~~
VisualSVN User, Repository
• Each user can be allo-cated personal reposi-tory
VisualSVN Security
• Local server don’t open and view source files
• To open and view the source files, use web browser or SVN client
Repository structure
Project Truck
Branches
Tags
Source
Doc
Bin
Test1
Test2
Revision 1
Revision 2
Revision 3
Source
Doc
Bin
Source
Doc
Bin
• General repository struc-ture
• Truck• Main Project• Perfect code
• Branches• Test place
• Tags• Version control
Client
• To use the MS visual studio upto 2010, the best svn plugin is ankhsvn
• After setup, Tools->Option->Source control
• 1st. Send project from client to server• 2nd. Receive project from server to
client
Add solution or project to repository
• Create new project(solution)
• Add solution to subversion
• Add to subversion
Add solution – cont.
• ‘ + ‘ is ready state. Not saved
• ‘√‘ source file is saved to server
• Confirm
• DLL files or resources is not saved automatically.So I need to upload manually. (using Working copy ex-plorer)
Open from subversion
• File -> Subversion -> Open from sub-version
• To open we can se-lect types of 3• Lastest version• Date• Revision
Oepn From Subversion – Cont.
• Run
View project history
• We can view history each version
View project history
Deleted Changed In-serted
Avoid Conflict
• Conflict : Multiple users to edit a file
• To avoid conflict, use Copy -> Modify -> Merge pattern
main.cuser4
user3 user2
user1
Avoid Conflict – cont.
• Before Modifying, update project lastest version.
• Make a complete source(well operating) only upload.
Summary
• Currently many people use SVN.CVS(Concurrent Version System) -> SVN(Subversion)
• It’s essential to work in team project. (maybe)
• This situation, a project when you work on multiple computers is good.