let use svn(subversion) interaction lab. hyo-geun ahn 2011. 04. 20

19
Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20.

Upload: jaycee-fithen

Post on 15-Jan-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Let Use SVN(Subversion)

Interaction Lab.Hyo-Geun Ahn

2011. 04. 20.

Page 2: 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

Page 3: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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.

Page 4: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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

Page 5: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Repository

• Storing the source file and saving the changed log

• Each client can access server to read and write source.

Page 6: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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://~~~

Page 7: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

VisualSVN User, Repository

• Each user can be allo-cated personal reposi-tory

Page 8: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

VisualSVN Security

• Local server don’t open and view source files

• To open and view the source files, use web browser or SVN client

Page 9: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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

Page 10: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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

Page 11: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Add solution or project to repository

• Create new project(solution)

• Add solution to subversion

• Add to subversion

Page 12: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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)

Page 13: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Open from subversion

• File -> Subversion -> Open from sub-version

• To open we can se-lect types of 3• Lastest version• Date• Revision

Page 14: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Oepn From Subversion – Cont.

• Run

Page 15: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

View project history

• We can view history each version

Page 16: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

View project history

Deleted Changed In-serted

Page 17: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Avoid Conflict

• Conflict : Multiple users to edit a file

• To avoid conflict, use Copy -> Modify -> Merge pattern

main.cuser4

user3 user2

user1

Page 18: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

Avoid Conflict – cont.

• Before Modifying, update project lastest version.

• Make a complete source(well operating) only upload.

Page 19: Let Use SVN(Subversion) Interaction Lab. Hyo-Geun Ahn 2011. 04. 20

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.