SVN might be stable, it might be mature, it might be successful, and it might be the winning source control system of the moment. There’s always a big risk of resulting unpopular, when criticizing something that actually did find its way to success, but I have to say that SVN sounds terribly antique sometimes.
I have already given a brief introduction to the Darcs source control system, and I would like here to talk about a very strong point it’s got against SVN.
Just yesterday, at work, I needed to commit certain modification to SVN. As I examined the diff of my local copy with:
I realized that one of the file also contained some other modifications that I didn’t want to commit. After using Darcs for several months, I was suddenly hit by the shocking truth: SVN doesn’t allow interactive and partial patches, which Darcs names hunks.
What do you do in that case? Provided that there are people who actually abuse the Save as… function of their editor by saving multiple copies of the same file according to the logical patch they contain (which I find absolutely horrible), the quickest way I could find was to:
- Making a diff:
svn diff > logical_patch_1.diff
- Edit the diff manually, until I had two files, which represented the two logical diffs
- Revert the pristine:
svn -R revert .
- Apply the first diff: `patch -p0 < logical_patch_1.diff“
- Apply the second diff: `patch -p0 < logical_patch_2.diff“
With Darcs, all you have to do is issue the
darcs record command (which
records your changes):
darcs record -m "First logical patch (fixes bug 1234)"
- Answer “yes” to the first hunk, and “no” to the second.
- Record again:
darcs record -m "Second logical patch (fixes bug 5555)"
- Answer “yes” to the only hunk
Can you see the difference? It’s not just about the number of operations needed, but the quality of them, and the fact that Darcs is perfectly oriented to this kind of flexibility. Please consider switching to Darcs for your projects and work, as it’s a mature and better system.