[darcs-users] the readability of darcs native change format (was: Re: SchwernLikesDarcs SchwernHatesDarcs)

Michael G Schwern schwern at pobox.com
Sun Mar 20 08:22:09 UTC 2005

On Sun, Mar 20, 2005 at 03:27:25AM +0000, Mark Stosberg wrote:
> On 2005-03-20, Michael G Schwern <schwern at pobox.com> wrote:
> >
> > I'm also keeping note of what I hate about darcs
> > http://www.scannedinavian.org/DarcsWiki/SchwernHatesDarcs
> re: the hard-to-read native format. Have you tried looking at
> patches with 'darcs diff -p patch_name'?  It uses the Real diff
> program in the binary. 

The native darcs format is ingrained into darcs.  For example, when doing
a darcs record hunks are presented in the native format.  So while having 
"darcs diff" is nice, it doesn't solve the problem. :(

> I understand this much about the technical details of the darcs patch
> format:
>  - It saves disk space by not storing context in the patches.
>  - Consequently, there can be a performance penalty for constructing
>    the context to display it, since it's not in the patch. 
> Personally, sometimes I like the lack of context because it's compact.
> If I'm reviewing patches during 'record', I might have the context in my
> head, and don't need to to take up screen real estate right then. 
> Other times I would like to have that context, and would just assume
> that darcs used more disk space and gave me better performance.

"Disk is cheap" is an oft uttered phrase.  However, for many cases (such as
darcs record) darcs should be able to do a simple diff between the changed
version and the original version stored in _darcs.  So no performance
penalty.  This is my utterly naive analysis and I'd like to keep premature
optimization out of the discussion for the time being.  We really don't know
how much of a performance difference it would make.  Better to discuss
the feature's merits and drawbacks rather than some hand-waving performance

And in most cases I want context.  I don't have a very good memory, or
rather I choose to store more important things in it.  Things the computer
cannot easily make available to me.

However, once again, this is not a case of either/or.  The display format
for patches/diffs can be configurable in ~/.darcsrc or wherever the global
user config file lives.  I like "diff -u" style so I'd set it to that.
If you like darcs' format set it to that.  Everyone's happy.

More information about the darcs-users mailing list