Archive for the 'Studing' Tag
How to set up subversion on a MAC for free.
May 13, 2008 [7:42 am] No CommentsWhat is subversion? Subversion is a software which allows you to create archive of your source code where you can clearly see what and when has been changed and If you need to you can still use previous versions of your code.
Why and when it is useful?
It is mainly used by developers working on the same project who need to access the same source code files. Every developer can access the actual version of every file. Whenever the changes has been made the developer commit the changes to the source so the other developers can access the code including his changes. You might be asking, what if I work alone on my project? That is actually my case here. I still use subversions because it allows me to go back in the history of my code and see changes which has been done and if something goes really wrong I can use the previous version of my code. Another advantage is that your different versions of the code are your backup files as well.
What do I need?
- Subversion software (software which keeps track what has been changed)
- Subversion user interface (it is not necessary but it is lot more comfortable then using command line)
- Repository - the place where you store your files (versions of your code)
So here are the simple four steps which has to be done.
- Install subversion 1.4.4. http://homepage.mac.com/martinott/
- Instal svnX which is GUI http://www.lachoseinteractive.net/en/community/subversion/svnx/download/
- Create account in Google Code http://code.google.com/
- Fix the certificate problem with SVN list. Use your user name and psw from google repository when executing this command in command line
svn list https://whatever.server.com/repository
There might be a new version of SVN when you read this article so take the most recent one. User interface - SVNX I am using here is beautiful application with easy to use interface. Repository - I have chosen here the Google Code as my repository. We could chose different free server but I use google applications a lot so I am going to stick with google.
Everything installed, what is next?
- Create working copies - path to your projects on your computer
- Commit everything to the repository. Just double click on working copy and click Commit. If it does not work try to create the folder in the repository yourself and drag and drop the files from you machine into the repository window (in the bottom section directly into the folder). You might need then remove the files from your machine and press update to get the actual version from remote server (which is at this moment the same so nothing will be lost but to be absolutely sure make a backup….just in case)
- Whenever you change a file it should appear in the working copies. Just press Commit and file will be updated in the repository
How can I see what piece of code has been changed in 2 different versions of my code?
You can check the changes in the SVNX or directly on google code web site. If you just want quickly scan and check 2 versions of the same code go to the google code site and you will find that you can see 2 windows next to each other and the changes are highlighted with colour so it is very easy to spot the difference.
If you want to have some idea how it looks you can check my repository on google code - http://code.google.com/p/lewro/source/list, you can see all my new blog source file and the changes I have made. It is also a good source of information for new developers so you can learn from other people’s code.
























