0% found this document useful (0 votes)
33 views15 pages

Lab 2: SVN: Maryam Ahmadi

This document provides an overview of Subversion (SVN), a centralized version control system. It discusses key SVN commands like checkout, add, commit, update, revert, and delete. It also demonstrates how to set up a local SVN repository, make changes to files under version control, and commit those changes back to the central repository. Multiple users can work on the same project simultaneously using SVN.

Uploaded by

SaadMalik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views15 pages

Lab 2: SVN: Maryam Ahmadi

This document provides an overview of Subversion (SVN), a centralized version control system. It discusses key SVN commands like checkout, add, commit, update, revert, and delete. It also demonstrates how to set up a local SVN repository, make changes to files under version control, and commit those changes back to the central repository. Multiple users can work on the same project simultaneously using SVN.

Uploaded by

SaadMalik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Lab SVN

2: SVN

Maryam Ahmadi
Goals
What is subversion?
Learn come of the useful SVN commands
What is subversion?
Often referred to as SVN
Centralized version control system
Maintains current and old versions of files, such
as source codes, web pages, documents, latex
files, ...
Why is SVN useful?
Reverting: after each commit, a revision is
stored. You can always roll back to a previous
version
Concurrent development: multiple people can
work on a project simultaneously.
Your subversion repository
Https://svn.seng.uvic.ca/svn/seng265/<netlink-
T
Https://repo.seng.uvic.ca/svn/seng265/<netlink ID>
ID>
Your netlink ID and password
Certificate warning
Check out
Copy the contents of a remote repository to
your local computer.
Create a directory: mkdir seng265
cd seng265
svn checkout
The following on one line
svn checkout
https://svn.seng.uvic.ca/svn/seng265/<netlink
https://repo.seng.uvic.ca/svn/seng265/<netlink
ID> seng265_svn
ID> seng265-svn
You may have to

Accept the certificate, choose p to


accept r or t

permanently accept the certificate


reject or temporary
Metadata
Hidden metadata directory
SVN uses this directory. Never edit the content
of this directory!
cd seng265-svn
ls -a
Add files/folders to your repository
cd to your working directory You just created working
directory seng265-svn
Add a directory
mkdir dir1
cd dir1
Add a file in your working copy
vi file1
Type a 1 in the first line, save and exit.
cd ..
svn add dir1
The folder and the files inside it will be added to your repository
Commit
After add/remove/modify, you always need to
commit the changes:
svn commit -m new folder and files added
(-m for comment)
Checkout a second copy
Change directory to seng265
cd ../..
svn checkout
svn checkout
https://svn.seng.uvic.ca/svn/seng265/<netlink
https://repo.seng.uvic.ca/svn/seng265/<netlink
ID> seng265-svn-2
ID> seng265-svn-2
From directory seng265 checkout a new working directory
Commit a change in second working
directory
cd seng265-svn-2/
Change directory to dir1
vi f1
Add a 2 on the second line, save and exit
Commit the changes:
cd ..
svn commit -m I edited f1
Refresh your primary working copy
Change directory to seng265-svn
svn update
Now, open file f1 and see the changes you
made.
Reverting to a previous revision
svn info f1
svn log f1
svn merge -r HEAD:<desired-revision> f1
svn commit -m reverted
svn update
vi f1
Delete
svn delete f1
svn commit -m delete f1
svn update
ls
f1 doesn't exist anymore!
You're all done!

You might also like