Summersault
Home About Us Services Portfolio Community Support
Database Driven Websites
community home
local community
partner community
online community
blog


Archives: Categories: Authors:

 

Summersault Blog

Using “darcs changes” for patch review

Posted by Mark Stosberg on August 7th, 2008

I recently discovered some new source code control workflows that are possible with darcs.

Just after I record a patch in my local repository, I often feel compelled to review it one more time before pushing into the central repo. “Did I record changes in just the files I meant to? And even within specific files, did I include just the changes I meant to?” With darcs, this check is easily done
after recording with darcs changes --interactive --last 1 or just darcs changes -i --last 1, for short. They key part here is --interactive which launches darcs in interactive mode.

I press “x” to view the list of files affected, or “p” if I want to review a kind of “diff” in a pager, and of course “?” if I need help to remember what the options are. Very handy!

A related workflow happens with a team member asks me to peer review their work for the patches labeled with RT#123, as we’ve labeled each patch name with a unique number from our ticket tracking system. Let’s say I’ve pulled those five patches yesterday, and they are now mixed in my history with several more patches already.

Again, darcs make this patch review a breeze: darcs changes -i -p 123. Now I’m able to review all the patches related to this one ticket, regardless of where they are in the history of the project. ‘darcs changes’ shows me the name of each page, and again lets me use ‘x‘ for a summary review, or ‘p‘ for a detailed view in a pager.

Patch review with ‘darcs changes‘ just one of the many interactive features of darcs that makes it pleasant to use.

Ubuntu Linux users can find packages for darcs 2.0.2 on Iain Lane’s page. Many more platforms have darcs binaries available as well.

Tags: , ,


Did you find this entry interesting or useful? Please tell us about it!

Leave a Reply

The opinions expressed by individuals posting in the Summersault Blog are not necessarily those of Summersault, LLC. While we try to insure the quality and accuracy of the information presented here, we make no guarantees about its suitability for any particular purpose.