I want to give this little tutoring on Subversion. To those who are not familiar to Subversion, it is a project management software that allow group of people to work on the same project from their individual computers and keep history or version of each step of their development on a main repository server. Simply put, let’s say we want to write a software to control a robot that will go around the whole world and slap everybody once and give them $1M. The robot must not slap anybody more than once or else, that person will get more money and of course more slaps lol. Ok, so we want to make this program available to group of programmers from different continents or countries. It can still be a project for just one software company. The best way to make people work on the same copy of the program and still maintain various versions of the program is by using a version control system. There are different types of version control systems, ie microsoft sourcesafe, SVN, CVS etc. What l’m going to tutor about is SVN. It’s an open source and free software so everyone can get a copy here
Now let’s start with how to use SVN from the command prompt. This is just a summary, if you want to read more details about SVN, then l’ll recommend that you check here
Okay, let’s assume you have SVN installed. First lets check to see if our svn is installed and working properly as well as knowing what version of SVN we have installed.
*go to command prompt and type SVN –version
Press enter after that and you’ll see information about your subversion client
Now, in subversion, there must be a repository where the files are kept for the group of programmers to work on. I’m not going through the steps of how to set up the repository here, you can get more information from the link l gave above.
For this tutorial, let’s assume the repository is locate at svn://2smart4school.com/rep0sitory
Now, here goes the summary of accessing and working with copies of files in the repository
1. List directory contents of the repository = SVN LIST svn://2smar4school.com/repository
2. Make a directory in the repository = SVN MDIR svn://2smar4school.com/repository/directoryname -m”put a message of what you are doing”
3.Check out a file from a directory = SVN CHECKOUT svn://2smar4school.com/repository/directoryname/filename
4.Put content of a directory and it’s content into a directory in the repository= SVN IMPORT svn://2smar4school.com/repository/directoryname/ournewdirectory
5. After adding stuff to the repository, you need to commit all the changes to finalize your action = SVN COMMIT
6. To add a file to a directory you are working on = SVN ADD filename
7. To delete a file from the directory you are working on = SVN DELETE filename
8. To update the directory you are working on to match with what is currently in the repository = SVN UPDATE
9. To check the revision status of your directory = SVN STATUS
10. To check out a particular version of a directory from the repository = SVN CHECKOUT -R number of the revision svn://2smar4school.com/repository/directorynam