Open main menu

CDOT Wiki β

TortoiseSVN

Revision as of 00:35, 7 November 2009 by CloudScorpion (talk | contribs) (The Steps)

Hey there. This page was written to give an easy to follow tutorial for TortoiseSVN. I know, you don't want to trudge through chapter after chapter of that mind-numbing SVN book, but at the same time you don't want to drag your team down. You have come to the right place, I'm gonna make this dirt simple for ya, by the end of this you'll be able use SVN like a pro... well not really but you'll know enough to get by.

The Steps

Step 1 - Installing TortoiseSVN

Easiest of the steps, you don't even need google, I'll do that for ya. Click here[1] for the 32 bit version, and here[2] for the 64 bit version. Not sure which you want? Go for the 32 bit version, its a safer bet.
After downloading it, double click the install file. It is easiest to go with the default, so just click Next like a madman until it finishes. Bam, you are done step one.

Step 2 - The Checkout

Ok, magic time. Make a folder somewhere in your computer where you want to store your group's source code. Go into the folder and right-click anywhere in it, and click SVN Checkout. A window will pop up, at the top you will see "URL of Repository" fill that bar with the location of your repository. Don't know what it is? Check your learn account, fardad or your group leader is likely to have sent it to you, along with your very own user id and password. Once you filled in the URL, leave the rest at the default, you won't need it for now. Click that OK button. Now you want that UserID and password, punch them in and your gold. It should then load in all the files from your repository into your local folder, once its done, your done step 2. Money.

Step 3 - Get some work done

Now that you have a local copy of the source code, the real magic begins. First I'll give a quick explanation those funny icons all over the place. The green check mark means the code has not been changed and is the same as it was when you pulled it out of the repository. The red exclamation icon means you have changed the data and that it no longer matches whats in the repository, this is not a problem obviously, unless of course you don't commit it when your done, then complications can arise. You may also see a gray bar, this means one of your group members has set that file or folder to not get updated when the code is committed, usually because it is unimportant junk like the debug file.
OK moving on. Every time you go to do some work on the code, first goto the outermost folder of your repository data and right-click on it, click SVN Update. This will get the most recent batch of source code from the repository so that you don't end up having conflicts when you goto commit. Once you've done that, you are free to start working.

Step 4 - Where to work and how to work it

So now you are looking at your local data, and you see trunk, branch, and tag, and you think wtf. Simplest thing to do is completely ignore branch and tag, as of right now they are not really important, so just pretend they don't exist and jump straight into the trunk folder. Bam, there is all your group's code sitting there waiting to be edited. If you have Visual C++ (and you should!) on your computer, feel free to open up the .vcproj file (if there is one) and everything should load into visual C++ all nice and tidy for ya. Now do some coding!
Once your done, you'll notice that the files you were working have those red exclimation mark icons I told you about, this is good, red isn't always a bad color. Once you are done your work, at least for the time being, get ready to do some committing.