TortoiseSVN Tutorial

27
TortoiseSVN Tutorial

description

svn

Transcript of TortoiseSVN Tutorial

PowerPoint Presentation

TortoiseSVN TutorialOutlineBasic SVN Concepts

Access to SVN using TortoiseSVN

Common SVN locations at RamSoft2Basic SVN ConceptsTypical SVN Configuration4SubversionRepositoryClient InterfaceRepository InterfaceGUI client appsCommand lineclient appsClientLibraryWorking Copy Management LibraryRepositoryaccessDAVSVNLocalApachemod_davmod_dav_svnInternet/LAN(Any TCP/IP Network)

TortoiseSVN

WebClient for SVN

Access URLsfile:// Direct repository access to local or network drive.

http:// Access via WebDAV protocol to Subversion-aware Apache server.

https:// Same as http://, but with SSL encryption.

svn:// Unauthenticated TCP/IP access via custom protocol to an svnserve server.

svn+ssh:// Authenticated, encrypted TCP/IP access via custom protocol to an svn server.

We are using HTTPS access at RamSoft

The RepositoryThe repository stores information in the file system tree, a kind of file server.When a client reads data from the repository, it normally sees only the latest version of the files (HEAD revision)The client also has the ability to view previous revision of any files in the repository

Revision Number

0 1 2 3Revision number is increased for every transaction that changes the repository.The Working Copyrepositoryworking copyChecking out creates a working copy of a specific revision of the repository on users local storage2

2

1

03

.svn.svnSVN's config data. Do not edit these folders!Repository Layout

trunk/tags/branches on root; each module will be tagged separately

checkout of all modules is possible

commits can span multiple modules

The Work Cycle (1)

checkout (first time)(do some work, test)updatecommit(do more work, test)serverclientsend current revision ( n )update your local copy with any changes in the repo.save your changes and log entrycheck statusany changes since revision n?(resolve conflicts)The Work Cycle (2)svn checkoutsvn update

Create a local copysvn addsvn movesvn deleteMake changes

svn status -u See what was changed in the repository in the meantime

svn updateUpdate your local copy

svn diffsvn resolvedResolve conflicts(Merge your changes)

svn commitSubmit your changes

105

100

106

SubversionRepository11Check outA check out will transfer the projects contentfrom the repository server to the client machine.

Repository ServerThe client machineCheck out a working copy

2

1

02

UpdateAn Update will synchronize latest projects content from the repository server to the client machine.

Repository ServerThe client machineUpdate a working copy

2

1

02

CommitA commit transfers the projects modified files from the client machine to the repository server.

Repository ServerThe client machinecommit changes to repository

2

1

02

3

Access to SVN using TortoiseSVNCheck Out using TortoiseSVN

Using Windows Explorer, right-click in a directory.

If not sure of path to check-out then use Repo-browser first.In Repo-browser, right-click on folder or file you want to check-out.

16Check-out: AdviceDon't check-out the entire repository!Only check out the part that you need.For DEV SVN, it is usuallyTrunk: http://svn.ramsoft.biz/core/trunkCurrent active branch: http://svn.ramsoft.biz/core/branches/5.1r3

For QA SVN, it is usuallyDocumentation: http://svn.ramsoft.biz/qa/Technical DocumentsAutomated Testing Tool: http://svn.ramsoft.biz/qa/RATTCheck for UpdatesBefore "committing" your work, check for updates in the repository.Something might have changed while you were working.Subversion requires you to synchronize before commit.

Work Cycle: Update working copyIf there are any changes on the server, then you should "update" your working copy before "commit"-ing your changes.

Resolve Conflicts"Conflict" means you have made changes to a file, and the version in the repository has been changed, too.So there is a "conflict" between your work and work already in the repository

(6) Work Cycle: CommitAfter "update" and resolving conflicts, commit your work.

Logging a RevisionIts important to ensure the following information is properly entered before committing any change to SVNContentwhat has changed?Datewhen did it change?Authorwho changed it?Reasonwhy has it changed?Redmine issue number (#XXXXX)SVN does thisyou enter thisSVN Log Viewer and Revision Graph

SVN Best PracticesPlan the directory structureDecide what work products to put in version controlDecide what to excludeDon't check-in buggy codeCommit all files related to the same task as one commit. This makes comments more meaningful.

Common SVN locations at RAMSOFTQA SVNBuilds and Releaseshttp://svn.ramsoft.biz/qa/QA ArtifactsRelease Notes & Service Manualhttp://svn.ramsoft.biz/qa/Technical DocumentsAutomated Testing Toolshttp://svn.ramsoft.biz/qa/RATTOld requirement documents (the most recent ones are on TestLink)http://svn.ramsoft.biz/qa/Requirements

DEV SVNTrunk: Latest development codeshttp://svn.ramsoft.biz/core/trunkBranches: Active released codehttp://svn.ramsoft.biz/core/branchesPatches: QA takes the patches for testing purposehttp://svn.ramsoft.biz/core/patchesPatchesVerified: QA delivers the verified patches to Supporthttp://svn.ramsoft.biz/core/patchesverified