19
IS2739: Subversion Team B

IS2739: Subversion

  • Upload
    avak

  • View
    46

  • Download
    0

Embed Size (px)

DESCRIPTION

IS2739: Subversion. Team B. Outline. 1. Version Control 2. Subversion vs. CVS 3. Demo. What is version control?. Version control is the management of changes to documents, programs, and other information stored as computer files. - PowerPoint PPT Presentation

Citation preview

Page 1: IS2739: Subversion

IS2739: Subversion

Team B

Page 2: IS2739: Subversion

1. Version Control2. Subversion vs. CVS3. Demo

Outline

Page 3: IS2739: Subversion

• Version control is the management of changes to documents, programs, and other information stored as computer files.

• Put it another way, track every change to every document and identify the change with number, letter, and time.

• Versions can be compared, restored, and with some types of files, merged.

What is version control?

Page 4: IS2739: Subversion

• Manage files and directories, and its changes over time

• Collaboration and keep track of who made which change.

What you cannot do without version control?

• No need to notify other members before change the project file.

• No need to manually duplicate the original version before change the project file.

• No need to tell other members or remember what changes you have made.

Why version control is needed

Page 5: IS2739: Subversion

The Problem of File Sharing

All version control systems have to solve the same fundamental problem : How will the system allow users to share information, but prevent them from accidentally stepping on each other's feet?

Page 6: IS2739: Subversion

• Repository allows only one person to change a file at a time.

• Managed using Locks.

Problems:• One by One• No concurrency• False sense of Security• Administrative problems: lock a file and forget to unlock it

after finish.

When lock-modify-unlock is necessary? Files with binary format like picture, sound and video

Lock-Modify-Unlock solution

Page 7: IS2739: Subversion

Lock-Modify-Unlock solution

Page 8: IS2739: Subversion

Copy – Modify – Merge Solution

• Each client gets a working copy. Users work simultaneously and independently on private copies. Finally, copies are merged into a final version.

• Overlaps are flag as being in state of conflict

Problems• Manually fix it.• Communication

When copy-modify-merge is necessary?Line-based text files can be contextually mergeable

Page 9: IS2739: Subversion

Copy – Modify – Merge Solution

Page 10: IS2739: Subversion

1.Graphic demonstration2.Color,number-highlight demonstration3.Comparison demonstration4.User-defined demonstration

Track the change

Page 11: IS2739: Subversion

Subversion Categories

1. You always see tags,trunk,branches in Subversion.These are three different 'categories' for versions of the project. 

2. Trunk is traditionally the cutting-edge version that is being actively developed, a lot like CVS HEAD.

3. Branches are for alternative copies of your project. Allow you to create as many bugs as you want. After you finish, merge it into the trunk.

4. Tags are used for milestone releases.

Page 12: IS2739: Subversion

1. Create branches by copying your data2. Maintain parallel branches of your file and directory3. Duplicate changes from one branch to another branch4. Reflect differences among branches

Branch Cont.

Page 13: IS2739: Subversion

• Can move or rename files or directories cleanly• Atomic commits• Good remote options http/https/svn vs pserver• File formats

Why Subversion over CVS

Page 14: IS2739: Subversion

svn --helpsvn add filename/directorysvn delete filename/directorysvn checkout http://nodename/repos/svn/trunk/parentPath/pathsvn commit --message "Message goes here." filenamesvn diff filenamesvn mkdir directorysvn import local-directory http://node/repos/svn/trunk/directorysvn log filenamesvn merge file1@revJ file2@revKsvn statussvn update filename

Basic operations in subversion

Page 15: IS2739: Subversion

• Where and How? Local Server or Online Server, backups.o VisualSVNo SVN Servero Kenaio Assembla

• File and Directory Organization : o 1 Repository per Project or all Projects in one

Repository?o Trunk , branches, tags

• Choosing Data Storage (Reliability, Accesibility, Scalability, Performance)o Berkely DB – database environmento FSFS – flat files, custom format

Planning Your Repository

Page 16: IS2739: Subversion

What is Project Kenai?Project Kenai is Sun's connected developer destination, where developers can host OPEN SOURCE projects, as well as connect, communicate, and collaborate with developers of like mind.

Cool features:• Forums• Wiki• IM Chat• Code Repository• Netbeans integration

Project Kenai

Page 17: IS2739: Subversion

Demo for SVN Server&Client 

1. Download CollabNet Subversion Server Package and Install it2. Create the repository folder(like D:/svnrepository) and select it as the repository during install Subversion Server(For binary file package. create subversion server manuallyCommand:     sc create svnserve binpath= "    \"C:\Program Files\Subversion\bin\svnserve.exe\"    --service --root c:\repos" displayname= "Subversion"     depend= tcpip start= auto)3. Restart computer and server will start automaticlly4. svnadmin create d:\svnrepository

Page 18: IS2739: Subversion

Demo cont.

5. edit conf,passwd file in svnrepository :o delete comment symbol and following space in o anon-access, auth-access,passw-db in confo [users] in passwd

6. svn mkdir svn://localhost/myproject (server setup finish)7. Install TortoiseSVN client 8. Create a project folder somewhere on your hard drive. Right click in that folder and select "SVN Checkout..."9. type svn://localhost/myproject/ for the repository URL and click OK.10.Create a new file in that directory. Right click the file and select "TortoiseSVN, Add"

Page 19: IS2739: Subversion

Demo cont.

11. The file hasn't actually been checked in yet. Subversion batches any changes and commits them as one atomic operation. To send all your changes to the server, right click and select "SVN Commit"

12.You now have a networked Subversion server and client set up on your machine.

References:1. Setting up a Subversion Server under Windows2.Practical guide to subversion on Windows with TortoiseSVN