Difference between revisions of "TortoiseSVN"

From CDOT Wiki
Jump to: navigation, search
(The Steps)
(The Steps)
Line 11: Line 11:
  
 
=== Step 3 - Get some work done ===
 
=== 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.<br /> 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.
+
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.<br /> OK moving on. Every time you go to do some work on the code, first go to 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 ===
 
=== 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!<br />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.
+
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!<br />Once your done, you'll notice that the files you were working have those red exclamation 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.
 +
 
 +
=== Step 5 -Finishing up ===
 +
Your at the final step, I know, this SVN stuff is gravy. So you are done working on your code for now? Are your really? Well here is the magic question, does it compile? No? THEN DO NOT COMMIT IT!! Do not commit any code that does not compile, your team will hate you and your family will abandon you if you do! <br />Once your code compiles then you are ready to commit it to the repository. It is safest if you only commit files you changed, that way you minimize the likely hood of a conflict. So select all the files you changed (marked with the red exlamation mark) and right-click, close your eyes and hit submit. If it goes through just fine, no problems, then all you have to do is add a comment, something describing what you did, and your done. Let out a sigh of releif. BUT you may get some conflictions if someone changed the code before you committed it. This is likely due to an eager group member of yours changing something without telling you (I'm looking at you northWind). The best thing to do is to simply not commit your code, and contact your group members as to why the code was changed, figure it out with them, once everything is sorted out, then commit it. YOU ARE DONE.
 +
 
 +
=== Credits ===
 +
This page was written by your friendly neighborhood CloudScorpion.

Revision as of 01:50, 7 November 2009

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 go to 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 exclamation 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.

Step 5 -Finishing up

Your at the final step, I know, this SVN stuff is gravy. So you are done working on your code for now? Are your really? Well here is the magic question, does it compile? No? THEN DO NOT COMMIT IT!! Do not commit any code that does not compile, your team will hate you and your family will abandon you if you do!
Once your code compiles then you are ready to commit it to the repository. It is safest if you only commit files you changed, that way you minimize the likely hood of a conflict. So select all the files you changed (marked with the red exlamation mark) and right-click, close your eyes and hit submit. If it goes through just fine, no problems, then all you have to do is add a comment, something describing what you did, and your done. Let out a sigh of releif. BUT you may get some conflictions if someone changed the code before you committed it. This is likely due to an eager group member of yours changing something without telling you (I'm looking at you northWind). The best thing to do is to simply not commit your code, and contact your group members as to why the code was changed, figure it out with them, once everything is sorted out, then commit it. YOU ARE DONE.

Credits

This page was written by your friendly neighborhood CloudScorpion.