I am about to start moving all the code from the demos on my blog into a Google Project Subversion repository and I thought it might be helpful for others if I made a guide for the process. Its not too complicated, as Google does a good job of guiding you through, but sometimes a step by step is just what the doctor ordered. This will be Part 1 of 2. In Part 2 I plan to show you how to integrate the Google Project Subversion repository you’ll create here into the Eclipse based IDE of your choice.
For Part 1 of this guide there’s a few things to consider:
- I’m on a Windows system, so some of this will vary on other OSes.
- You need an SVN client. For Windows I highly suggest TortoiseSVN.
- This is not an SVN and Subversion tutorial. Check out this link for more info on them.
OK, let’s get you on your way to free version control via Subversion via Google Project Hosting. It doesn’t get more exciting than this!
- In case you’ve been living in the stone age and have not yet done it, or to your existing account.
- Create a project at the site. You should see a page like this:
- Fill in the fields as described on the right hand side. The only field you need to make sure you set correctly for this guide is “Version Control System.” This must be set to “Subversion.” You can use “Mercurial” if you want, but the rest of this guide isn’t going to do you much good! Click “Create Project” to finish.
- This should bring us to our new project home page.
- Click the “Source” tab to find the URL from which we can checkout the trunk of our new code repository. Using your SVN client of choice, checkout the repository into a new directory (I’ll call it SVNDIR from now on). For those on Windows using TortoiseSVN, you’ll right click on SVNDIR and select “SVN checkout…“. You will then enter the SVN URL from the “Source” page like this:
click OK and you’ve got your less than exciting first checkout. If all worked well you should now have a single .svn directory in your SVNDIR. - Now we’ll test adding and committing to our new repository. To keep the initial test simple, I’m going to simply add “demos” directory to SVNDIR which will later house the source code for the demos from this blog. To do that, create the directory as you normally would in SVNDIR. Right click the new “demos” directory and under the “SVN” heading click “Add“.
Click OK in the resulting dialogs to add “demos” to your local repository. - To add “demos” to the Google Code repository we need to commit the add from the last step. To do that we right click “demos” again and click “SVN Commit…” which will give you a dialog that looks like this:
Add a simple message and click OK to start the commit. You’ll will be prompted for a username and password, which if you are logged into your Google account you can retrieve from this URL: . Enter those, click OK, and congrats! You made your first Google Code repository commit! - Now that that works, let’s do something a little more substantial. Grab one of your source or project directories and copy it to SVNDIR. In my case, I’ll be copying my away3d_template project that I use as the base for, you guessed it, my Away3D projects. Do exactly as you did with “demos” to add and commit this new code.
- Go back to your Google Project home page and click the “Source” tab. From here, click “Browse” and take a look at the layout of your new repository. Under “trunk” you should be able to see ‘demos” and the project you just added.
And that’s all there is to it. You are now using Google’s Project Hosting and are applying version control to your projects. Stay tuned for Part 2 where I’ll give step by step instructions on how you can setup your favorite Eclipse based IDE to integrate with Google’s Subversion repository. It will make the process of sharing and keeping your code updated a breeze.
[...] la lectura de un tutorial muy instructivo que esta en ingles y pueden encontrar la primera parte aquí, y la segunda parte en esta [...]