SVN Instructions

For Phase 3 we have set up a server, rabbit.cs.gwu.edu for you. Each team has an account (team1, team2, team3) and website at:

http://rabbit.cs.gwu.edu/~team1/phase3
http://rabbit.cs.gwu.edu/~team2/phase3
http://rabbit.cs.gwu.edu/~team3/phase3

Your project files should be stored in:

/home/team1/public_html
/home/team2/public_html
/home/team3/public_html

You will still be storing your mysql database on cobweb. Your php files on rabbit will connect to the database on cobweb.

In addition we have installed SVN, a free, open-source software version control system. Subversion (SVN) manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed.

INITIAL SETUP

To begin, log in to your account and do not change directories (you should be in your home directory).

To setup your initial repository:

team1:

team2:

team3:

To import your initial project (a simple index.php):

team1:

team2:

team3:

To check out your initial repository into your public_html directory execute the following command:

team1:

team2:

team3:

This command 'checked out' a copy of your teams own repository into the directory public_html (where all your php files must reside). I have set up your repositories so that initially they only have an index.php file. This should now appear in your public_html directory.

To check out initial repositories for EACH TEAMMEMBER execute the following command FOR EACH MEMBER:

team1:

team2:

team3:

Now each teammember has their own working copy in their own directory in the home directory of the team. Each teammember can work on their own version, and update the repository when they make successful changes.

NOTE: To keep the TEAM website updated you must enter the TEAM diretory in public_html and update from there.

MANAGING YOUR PROJECT

Adding a file to your repository/project

Lets say you created a file in your project directory (public_html) called login.php. To add this to your repository (svn) you must execute the following:

Now to update (or 'commit' changes to) login.php you must execute the following:

Updating ('committing') a file in the repository/project

After you have made changes to a file (eg login.php) in your working copy / local directory you should update your changes in the repository. To do this you must execute the following:

Deleting a file in the repository/project

To examine changes

If you want to compare file(s) in your working copy with the last file in the repository you can see the changes by executing the command:

executing the command above with no filename.php specified returns all the differences between all the working copy files and the repository.

To update your working copy

Run the following command in the directory that you would like to update:

To revert your changes to the last version in the repository

For more instructions on how to use svn go to: http://svnbook.red-bean.com/en/1.5/svn-book.html