PhiLho
Re: git or SVN with Processing?
Reply #1 - Jul 4th , 2009, 12:49am
Excellent topic! Although indeed it is not really the right place, perhaps Integration would have been a better place. I won't recommend a VCS (version control system) over another, as it depends on needs, taste, system you use, etc. I will try and give some (a bit biased...) advices for choosing. But I heartily recommend using a VCS, whatever your choice, to allow you to do mistakes and go back, compare your code to older one, share it over several computers, etc. I am on Windows, I needed a SCM (source control management, that's the same thing! let's make keywords for searches...) as single developer, needing sometime to share my source between several computers (or at least to access it). I tried TortoiseSVN, the tool to integrate SVN to Windows Explorer. It isn't bad, but there were some shortcoming so I didn't use it as much as I should. Something that annoyed me was to have a .svn directory in each of my sub-directories of my source, with mirror copies of my files, making searches (with grep-like tools) harder... That, the fact to have also central copy of the sources, the uncomfortable renaming of files, etc. I abandoned it but still have command-line SVN executable handy to checkout sources like Processing one: it is still a widely used system. I then have heard (again) of DVCS, distributed VCS, with the great trial of Git vs. Mercurial vs. Bazaar to manage the source code of Python (the language). These DVCS have only one directory (the repository) at the top of the branch (your source directory -- I have to simplify / abuse some terms, sorry for the purists!), and no central place. Their philosophy is to allow branch usage without being connected to a central server, and even cloning of source directories to allow testing funky ideas, to be integrated later or deleted if unsuccessful. I searched a lot the Net, comparing the three. Warning: always look at the date of the articles you can find: DVCS are (relatively) young and rapidly evolving, so some shortcomings you might see might have already disappeared or reduced. I discarded Git, widely used, created to manage Linux kernel source, because it had a reputation of complexity and high learning curve. Plus I was put off by the partial support of Windows at the time. I didn't felt it was suited for a nearly beginner like me -- although I use another VCS at work: Perforce. Centralized (too much for my taste/needs), powerful, commercial (free for open source software). Git is said to be very fast, being written in C and is quite widely used. I briefly tried Mercurial (Hg), written in Python with C parts for speed. It is nice, have good doc., but I was uncomfortable because it was putting heavily the accent on multiplying the branches for development, a workflow I don't feel suited to my habits. It is used by numerous projects (I kept Mercurial binaries for that) and has a number of sites proposing Mercurial hosting. Then I discovered Bazaar (Bzr), and I was seduced by some advantages over their concurrents: they manage directories as other files (they are just containers for other systems), gracefully handle renaming and moving (it is often a double operation in other systems: delete old name, create new name...), can handle dumb servers (with FTP). As I read the excellent documentation, I was also seduced by the various workflows they proposed: individual programmer (my case), team with or without control of what goes on the main source, central scheme or distributed one, etc. I liked the flexibility and overall philosophy. As I wrote above, it just fits my needs, but it is worth for you to take a look at all offerings. Bazaar is written in pure Python (good for portability), with a cost on speed, although it appears they made giant steps in improving the gap with the other VCS. It is evolving very fast (nearly a new version each month), and has a lot of nice plugins. One of them, very young but promising, is Bazaar Explorer, a GUI to help managing repositories. There is also a Tortoise version for all the above SCMs, but on old computers like those I use, they slow down Windows to a crawl, or even crash it. One downside of Bazaar is that you will find much less public hosts (to manage your source online) than with Mercurial or Git, but the main one, Launchpad, is excellent: I can use it for my small Processing sketches (and my JavaFX, Java, Lua, etc. experiments, too) without creating an official project (but they have to be public, though, if I don't pay for that. That's not a problem for me). Thus I have a central place allowing me to synchronize my computers. I can do that on a simple USB key too. For the record, there are some other alternatives, less used, like Monotone, Darcs, Fossil... Some of them are one executable only, making them handy for use on USB key...