[darcs-users] diff preferences? whatsnew format?

Aggelos Economopoulos aoiko at cc.ece.ntua.gr
Mon Nov 24 06:53:18 UTC 2003


On Thursday 13 November 2003 16:13, David Roundy wrote:
> On Tue, Nov 11, 2003 at 02:27:56AM +0200, Aggelos Economopoulos wrote:
> > On Monday 10 November 2003 20:30, Andreas Jellinghaus wrote:
> > > Also I wonder, is there any reason
> > > for the "darcs whatsnew" format?
> > > Sure, darcs needs it's own format, because it has additional
> > > information like moved/renamed/... but couldn't it be more
> > > like "diff -udrNPp"? I'm used to that :-)
> >
> > I too think the 'whatsnew' output should be in a more friendly format (it
> > should at least have context). However, since
> >
> > diff -ur --exclude=_darcs _darcs/current/ .
> >
> > seems to work most of the time, I never came round to requesting it.
>
> 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?

Thanks,
Aggelos

[trivial test case follows]

> darcs whatsnew -u
{
hunk ./a.c 7
 {
 	int i;
 
-	printf("Counting\n");
+	printf("Counting 0..9\n");
 
 	for(i = 0; i < 10; i++){
 		printf("%d\n", i);
hunk ./a.c 10
 	printf("Counting 0..9\n");
 
 	for(i = 0; i < 10; i++){
-		printf("%d\n", i);
+		printf("%d\n\n", i);
 	}
 
 	return 0;
}

> diff -u _darcs/current/a.c a.c
--- _darcs/current/a.c	Mon Nov 24 08:38:03 2003
+++ a.c	Mon Nov 24 08:38:35 2003
@@ -4,10 +4,10 @@
 {
 	int i;
 
-	printf("Counting\n");
+	printf("Counting 0..9\n");
 
 	for(i = 0; i < 10; i++){
-		printf("%d\n", i);
+		printf("%d\n\n", i);
 	}
 
 	return 0;





More information about the darcs-users mailing list