Saturday, September 8, 2007

Mac the return




I‘ve been trying to configure Mac for the last few days. I‘m in a middle of the python development and I had to install py-unit on Mac, and then integrate it with Eclipse. There is a darwin port of py-unit so I did a little research to find out what is the difference between fink and darwin. The only think that I can say is that it worked. PyUnit is running fine.

For some time on I was willing to give a git one more shot. Last time when I tried it (1.5 year ago), I did not enjoy it. It just didn't suit my needs. To be honest I did not spent too much time then to read about all the benefits that it brings. Few days ago I finally managed to watch Linus speech at dev days about git. Linus made some strong point, and I totally agree with him there, but also this speech did not answer few questions: why git merge code so well, why does it better than subversion. Also a thought about SHA1 was really interesting, I am not a security guru, I have a very basic knowledge about that, but I enjoy math and I spend a lot of time researching math issues, any way Linus said that SHA1 is the best hash that is available on a market. That's interesting, why is that? I have to do some bigger research on that subject.

I don't think that distributed source code management systems (SCMS) is something that I need now - working on my own projects, or with a few friends, but in the old days (when the Earth was young, and mountains small) it was just a thing that I would needed. I was most curious to find out how branches and merges are implemented in git, how many tools support it (plugins, GUIs and so on). I am using a subversion to run my local projects, I thought that it would be a good idea to use both SCMS systems at this same time, cause it will give me some picture witch one is faster, easier to do simple stuff, and more advanced ones. To install git on Mac:


curl http://kernel.org/pub/software/scm/git/git-1.5.0.5.tar.gz -O
tar -zxf git-1.5.0.5.tar.gz
pushd git-1.5.0.5
make configure
./configure --prefix=/usr/local
make all
sudo make install


Then add to .profile file:


export PATH=${PATH}:/usr/local/bin



Simple, but still I would prefer to use fink or darwin ports, unfortunately I did not find git project in those repositories.

There is a dmg for subversion
. Unfortunately current version of subversion is 1.4.5 and mentioned dmg is for version 1.4.4, but still it is not that bad. In order to run svn you have to add /usr/local/bin to your PATH, just like it was done fore git. In other words if you done it for git you don't have to do anything, but if you are reading this article to configure subversion on your Mac be sure to do this also.

If you are looking for a GUI for subversion to run on Mac be sure to try svnx. It is really simple to create a repository in svn, and to add an existing project to it.


svnadmin create /Users/sagasu/worek/subversion/repositories/myProjectRepository
svn import /Users/sagasu/workspaces/workspace/myProject file:///Users/sagasu/worek/subversion/repositories/myProjectRepository -m "initial import"


to use git is also easy, but I was only able to create a repository in a path above source that I wanted to add. I spent some time trying to figure out if I can create a repository anywhere I want, I did not find this information.


git config --global user.name "Your Name"
git config --global user.email my@email.com

git init
git add .
git commit


And we are ready to rock and roll.

No comments: