Darcs Workflows compared with Subversion

One of darcs key benefits is that it is interactive. That’s illustrated below by comparing what’s involved in using darcs for some common tasks, compared to using Subversion. The theme you’ll see is that Subversion involves more manual work, as well as looking up and keeping tracking of revision numbers.

Sometimes in darcs it’s helpful to remember patch or tag names, with the key difference being that you are matching names created by humans, not numbers incremented by a machine.

Update, and review what’s changed, skimming most things, but reviewing some patches in detail

darcs svn
darcs pull 1. note current revision.
2. svn update
3. svn log; note revisions you want to review
4. svn diff -r $rev for each revision to review

Note: Depending on whether developers check in with proper comments, this may or may not be much more painful than darcs

Review any pending changes, remove some debugging statements and check them in

darcs svn
1. darcs record 1. svn diff
> # interactively skip > debugging statements # note the files and line numbers with debugging in them.
2. darcs push 2. Manually open each file you noted and remove debugging.
3. darcs revert 3. svn commit

A file contains a bug fix change, and an unrelated documentation fix. Check in each change separately

darcs svn
1. darcs record 1. cp file.txt file.txt.copy
> # select the bug fix and > then “d” for done. 2. svn revert file.txt
2. darcs record 3. Using a diff tool in an editor, manually re-apply the doc fix to the file.
> # select the typo fix and > then “d” for done. 4. svn commit file.txt # for the doc fix
5. mv file.txt.copy file.txt
6. svn commit file.txt # for the typo fix

Merge a Branch

darcs svn
Darcs merging is interactive by default. Merge You have to use full URLs for branch paths, and keep track of revision numbers
everything or just specific patches, even if they manually too. It’s not interactive, so you have to select exactly what you want,
aren’t “next to each other” in the repository: possibly merging multiple times if the patches to merge don’t appear in sequence:
darcs pull svn merge -r 536:543
> svn+ssh://ardoursvn@ardour.org/ardour2/ trunk
> svn+ssh://ardoursvn@ardour.org/ardour2/ branches/region-plugins