2. Agenda
• introduction to Versioning System
• SVN as Versioning System
• Tools to do SVN
• SVN features
• Checking out SVN
• Committing into SVN
• Update and Reverts in SVN
• Handling Conflicts (might not be applicable for non-developers)
• Q and A
(2)
3. introduction to Versioning System
• “The Revision Control System (RCS) is a software
implementation of revision control that automates the
storing, retrieval, logging, identification, and merging of
revisions.” –
Wikipedia, http://en.wikipedia.org/wiki/Revision_Contro
l_System
• Works like a folder in your computer but with history
(versioning)
• Other than SVN, there are also
Clearcase, CVS, Git, Mercurial, Team Foundation
Server, Visual Source Safe.
• Also known as Change Management.
(3)
4. SVN as Versioning System
• Works like a folder in your computer but with history
(versioning).
• Able to modify the files offline and sync to server when
online.
(4)
5. Tools to do SVN
• Commonly used SVN client is the Tortoise SVN.
(5)
7. SVN features
To show history of
the object
To browse the whole
repository
To check working copy for
modification made
To update working copy to
certain revision
To perform undo
(7)
8. Checking out SVN
• Download configuration items from the SVN server for
the first time.
1. Open Repo-Browser
2. Right click on directory
3. Check out
4. The configuration item will be downloaded into the
selected directory
(8)
9. Committing into SVN
• Send modified CI back to server
1. Right click on the file / directory
2. click SVN Commit
3. The SVN will open a dialog to preview modifications
4. Enter comment and start committing
(9)
10. Update and Reverts in SVN
• Fetch the latest version from SVN Server.
1. Right click on the directory
2. choose update.
• Fetch specific revision from SVN Server.
1. Right click on the directory
2. Tortoise SVN > Update to revision
• Unmodified files and directories are not affected by the
update.
( 10 )
11. Handling Conflicts
• Conflict happens when 2 or more commit overlaps the
trunk
changes made on the same file.
p Two working copies
1
were checked out
q
Working Working
Copy A Copy B
2
r Modified Working 4
Copy A checked in first
Subversion detects outdated
3 version and prevents check-in
Outdated!
of modified Working Copy B
s
( 11 )
12. Beyond SVN, integration to other tools
• Integrating SVN with other tools makes it easier to for us
to perform SVN operations within the tools.
• IDEs like Netbeans, Eclipse has plug-ins to enable
integration with SVN.
• Developers need not to move out from the IDE to
commit and update their working copy.
• Hudson /Jenkins is taking source codes from SVN, there
are plugins to help Hudson/Jenkins.
( 12 )
13. Q and A
• Subversion can store picture, zipfile and audio files?
• Yes. But please avoid storing generated files.
• Can it work on Windows, Mac, and other Linux distros?
• Yes. And each platform has their own client.
• What happen if I screw up my working copy?
• Delete your working copy and create a new one.
• How can I screw up my working copy?
• If you don’t update regularly and having too much
conflict that you don’t really want to resolve.
( 13 )