[darcs-users] diff preferences? whatsnew format?
droundy at abridgegame.org
Mon Nov 24 11:28:53 UTC 2003
On Mon, Nov 24, 2003 at 08:53:18AM +0200, Aggelos Economopoulos wrote:
> On Thursday 13 November 2003 16:13, David Roundy wrote:
> > I've implemented a -u option to whatsnew which gives it some context.
> > I've left the default to be context-less, because that's the way I
> > prefer it, but of course you can set your defaults using
> > _darcs/prefs/defaults.
> Not that I mind much, but is the duplication of context lines (see
> example below) intended? The extra verbosity gets kind of tiring for
> large diffs. I assume it's like this only because it was less work (or
> maybe you didn't notice), but if/when you're feeling bored could you make
> darcs supress them?
The duplication of context lines (and modified lines as below) is a result
of darcs viewing each hunk as a separate patch and formatting them
separately. Outputting each hunk patch separately allows the -u output to
be a valid darcs patch, so I have plans to add a -u option to push, for
when you would like to send the patch in a format that is more
human-readable. On the other hand, since the context data isn't actually
used by darcs, so it can be left out without causing trouble. As you
suggest, I may (if bored, which doesn't seem likely to happen soon) see if
there is a nice way to suppress these lines.
It would require significant code reorganization, as each hunk patch is
separately output, but it might not be too hard to make the output of each
patch depend on both the patch before and the patch after it... it would
certainly be nicer. Basically we'd need a version of showContextPatch like
showContextPatchInContext which would accept an additional two arguments
containing the patches before and after.
More information about the darcs-users