Subversion Guidelines

The Manual

http://svnbook.red-bean.com/

Look at the structure of your repository (This is for Tuesday1 group)

$svn list  svn://parallel02.usc.edu:3690/csci201/Tuesday1

Authentication realm: <svn://parallel02.usc.edu:3690> CSCI 200 201

Password for 'dwilczyn':

#You’ll have to enter your svn password and answer yes to the question about encryption. Then you’ll see:

V3.1/

Factory/

Checkout your project to a directory named myRestaurant. Subversion will create myRestaurant in your account (on your computer).

$ svn co svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/trunk   myRestaurant

Checked out revision 5.

#This is initially empty

Next: Pick a restaurant v3 to upload.

#Connect to wherever your v3 is.

$ cd  myRestaurant

#copy (cp) or move (mv) or ftp your v3 here: there should be a doc, src, build.xml, etc.

#myRestaurant is your new home directory for the v3.1 application.

#When you do an ls, you should see doc, src, build.xml.

#Don’t upload any object files, do an ant clean

$ant clean

$ svn add *

#You must supply a comment with every commit (and some other commands). The easiest way is inline with the -m option.

$ svn commit -m "first upload of restaurant v3 to begin on v3.1"

Work on the project

People work on this project until each deliverable. To get latest version of what people are doing:

$ svn update

#Do your work. If you’ve created a new file or directory:

$ svn add fileOrDirectory

#When you are satisfied that everything working:

$ svn commit -m "statement about what your new version does."

Save a version to tags for grading

People work on this project until each deliverable. Then save it as follows:

$svn cp -m "some comment"svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/trunk svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/tags/v3.1Final

Perhaps, you want a separate Branch?                                                           

$svn cp -m "some comment" svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/trunk   svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/branches/myv1

Switching between branches

#Now I'm still in directory myRestaurant and I do:

$ svn switch svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/branches/myv1

To find out what you are switched to:

$svn info svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/branches/  

To get a directory listing

$svn list svn://parallel02.usc.edu:3690/csci201/Tuesday1/V3.1/branches/  

To get status  [v means verbose]

$ svn status -v 

In the output you will see files with these labels:

A item    The item has been scheduled for addition into the repository.

C item    The item is in a state of conflict.

D item    The item has been scheduled for deletion from the repository.

M item    The contents of the file item have been modified.

To see the differences between what you have and what you started with

svn diff

$ svn diff > patchfile

See the manual for details

To "undo" all the changes you’ve made since last update

svn revert

See the manual for details

Other Command Description

svn import        Easy way to add all files to a repository for the first time

svn revert         Revert any local changes made to a file.

svn status          List any modified, out of date, or ignored files.

svn log              Display the change log for a file.

svn blame         Show who made changes to each line of a file.

svn mv              Move a file/directory on next commit.

svn cp              Copy a file/directory on next commit.

svn rm             Delete a file/directory on next commit.

svn add            Add a file to the server on next commit.

svn help            Just in case you forgot something!

 

The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees