Basic Setup
Repository (repo)
“The database stroring the files”
Server
“The computer storing the repository”
Client
“The computer connecting to the repo”
Basic Setup
Working Set / Working Copy
“Your local directory of files, where you make
change”
Trunk / Main
“The “Primary” location for code in the repo.”
Basic Setup
Baseline
“An Approved revision (or version number) of
a document or source file from which
subsequent changes can be made”
Basic Actions
Add
“Put a file into the repo ‘for the first time’ ”
Revision
“What version a file is on”
Head
“The latest revision in repo”
Basic Actions
Check out
“Download a file from the repo”
Check in / Commit
“Upload a file into the repo.The file gets a
new revision number”
Checkin Message
“A short message to describe what was
changed”
Basic Actions
Changelog / History
“A list of change made to a file since it was
created.”
Update / Sync
“Synchronize your file with the latest from the
repository”
Basic Actions
Revert
“Throw away your local changed and reload
the latest version from repository”
Advanced Actions
Branch
“Create a separate copy of a file/folder for
private use (bug fixing, testing, etc.)”
Diff / Change / Delta
“Finding the differences between two files”
Merge (or patch)
“Apply the changes from one file (or branch)
to another file or trunk”
Advanced Actions
Conflict
“When pending changes to a file contradict
each other (both cannot be applied)”
Resolve
“Fixing the changes that contradict each
other and checking the correct version”
Advanced Actions
Locking
“ ‘Taking Control’ of a file so nobody else can
edit until you unlock it.”
Breaking the lock
“Forcibly unlocking file that was locked”
Agenda
• Advantage
• Commons Vocabulary
• Version Control System (VCS)
• Subversion in Actions
Version Control System
• Git - Linux Kernel, X.org
• Subversion - Apache Software Foundation,
PHP, Google Code
• Mercurial - Mozilla projects, NetBeans,
OpenJDK
Repository
Repository
X
Write Read
Read
X X X
Client Client Client
Versioning Model
• File Sharing
• Lock-Modify-Unlock
• Copy-Modify-Merge
File Sharing
X
Repository
X X
Pat Daniel
Pat & Daniel read code from repository
File Sharing
X
Repository
X' X''
Pat Daniel
Pat & Daniel make change with there file
File Sharing
X'
Repository
X' X''
Pat Daniel
Pat write his file to repository.
So, current version in the repository come from Pat
File Sharing
X''
Repository
X' X''
Pat Daniel
Daniel do the same like Pat.
But everything from Pat is overwrite by Daniel file
Lock-Modify-Unlock
X
Read Could not Read
Repository
Lock
X X
Pat Daniel
Pat start with read file from repository and lock it
Lock-Modify-Unlock
X'
Write Read
Repository
Unlock
X' X'
Pat Daniel
Pat write his changes to repository and unlock it
Copy-Modify-Merge
X
Read Read
Repository
X X
Pat Daniel
Pat and Daniel boat copy file from repository
to his private directory (Working Copy)
Copy-Modify-Merge
X
Repository
X' X''
Pat Daniel
Pat and Daniel make changes in there working copy
Copy-Modify-Merge
X''
Write
Repository
X' X''
Pat Daniel
Daniel write his file to repository
Copy-Modify-Merge
X''
Could not write
Repository
X' X''
Pat Daniel
Pat could not write file to repository
because his version is out-of-date
Copy-Modify-Merge
Read
X''
Repository
X' X'' X''
Pat Daniel
Solution: Pat read file from repository
Copy-Modify-Merge
Write
X*
Repository
X* X''
Pat Daniel
Solution: Pat merge his file in working copy and new version from Repository then
write it to repository
Agenda
• Advantage
• Commons Vocabulary
• Version Control System (VCS)
• Subversion in Actions
Subversion in Action
Require
• TortoiseSVN - Subversion Client
Optional
• VisualSVN Server - Subversion Server
Lab I: Check out
Objective
• To understand how to check out file from
repository
Lab I: Check out
Before start you need to install TortoiseSVN
Lab I: Check out
Right-Click menu will show you like this if you already
install
Lab I: Check out
Create a working copy directory
(empty directory in the location you want)
Lab I: Check out
Right-click then select “SVN Checkout...”
Lab I: Check out
Change “URL of repository” to your repository destination
Lab I: Check out
Certificate Warning
Lab I: Check out
Authentication Required if the repository is not public
Lab I: Check out
Check out success
Lab II: Add
Objective
• To understand how to ‘add’ new file or folder
to repository
Lab II: Add
Create new file or directory in your working copy, the
Symbol ‘?’ in front of folder show you this file is unknown
Lab II: Add
Press Right-Click at file you want to add to repository, and
choose ‘SVN Add”
Lab II: Add
Add dialog
Lab II: Add
Add complete
REMEMBER YOUR FILE DOES NOT PUBLISH TO REPO
Lab II: Add
Commit complete: last line show you repository HEAD
Lab III: Update
Objective
• To understand how to ‘update’ file in SVN
• To solve problem when ‘conflict’ found
Note
• This is the best practice before you commit
file to repository for avoid conflict
Lab III: Update
Right-Click in working copy, then choose “SVN Update”
Lab III: Update
This dialog shown you there are update available from repo
Lab III: Update
New file from repository
Lab III: Update
New file from repository [check out again]
Lab III: Update
Make some changes to ‘note.odt’
you’ll see this in your working copy
Lab III: Update
Update before commit your file
Lab III: Update
Conflict found!!!
Lab III: Update
Use ‘Resolved’ to solved this problem
[Right-Click: TortoiseSVN > Resolved...]
Lab III: Update
Resolve dialog shown you the list of conflict file
Lab III: Update
Conflict list: you can ‘Accept’ or ‘Reject’ changes here
Lab III: Update
Resolved
Lab III: Update
Content in file after conflict is resolved
Lab IV: Commit
Objective
• To understand how to commit file to
repository
Lab IV: Commit
Press Right-Click in working copy
then choose ‘SVN Commit...’
Lab IV: Commit
Commit dialog: the short description might helpful to you
co-worker
Lab IV: Commit
Commit complete: last line show repository HEAD
Lab V: Diff
Objective
• To understand and specify what difference
between 2 revision
Note
• Diff stand for ‘Difference’
Lab V: Diff
Press Right-Click at file you want to see diff,
then choose ‘TortoiseSVN > Diff’
Lab V: Diff
Different list
Lab V: Diff
diff with previous version list
‘TortoiseSVN > Diff with previous’
Lessen VI: Retrieve Log
Objective
• To understand how to get change log in
project
Lessen VI: Retrieve Log
Press Right-Click in working directory, then choose
‘TortoiseSVN > Show Log’
Lessen VI: Retrieve Log
Log Message Dialog
References
Subversion
http://subversion.tigris.org/
tortoiseSVN
http://tortoisesvn.tigris.org/
Version Control with Subversion
http://svnbook.red-bean.com
References
OOoSVN
http://extensions.services.openoffice.org/
project/OOoSVN
VisualSVN Server
http://www.visualsvn.com/
0 comments
Post a comment