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

Michael G Schwern schwern at pobox.com
Sun Mar 20 19:47:12 UTC 2005


On Sun, Mar 20, 2005 at 03:04:35PM +0000, Mark Stosberg wrote:
> The interface should be simple enough: Add -u/--unified to record. 
> There is a already a built-in mechanism to set options as defaults. 
> 
> It sounds worthy of a Wishlist report to me. :)

Done and done.
http://bugs.darcs.net//Ticket/Display.html?id=285

There's the additional problem of the lack of visual distinction between
hunks in the darcs diff format, unified or not.  "hunk" and {} both look
far too much like normal code.

{
hunk ./tests/add.pl 30
 like(darcs(qw( add foo.d )), qr/directory/,$test_name);
 like(darcs(qw( add foo.d oof.d )), qr/directories/,$test_name);
 
+pass();
+
 ###
 
 $test_name = 'Make sure that messages about files call them files.';
hunk ./tests/add.pl 145
 chdir '../';
 rm_rf 'temp1';
 ok((!-d 'temp1'), 'temp1 directory was deleted');
+
+pass(1);
}


Diff's @@ is visually distinctive.

@@ -27,6 +27,8 @@
 like(darcs(qw( add foo.d )), qr/directory/,$test_name);
 like(darcs(qw( add foo.d oof.d )), qr/directories/,$test_name);
 
+pass();
+
 ###
 
 $test_name = 'Make sure that messages about files call them files.';
@@ -140,3 +142,5 @@
 chdir '../';
 rm_rf 'temp1';
 ok((!-d 'temp1'), 'temp1 directory was deleted');
+
+pass(1);


So all darcs' format really needs is to improve the hunk marker with some
jarring gobbeldy-gook.


{
@@ ./tests/add.pl 30 @@
 like(darcs(qw( add foo.d )), qr/directory/,$test_name);
 like(darcs(qw( add foo.d oof.d )), qr/directories/,$test_name);
 
+pass();
+
 ###
 
 $test_name = 'Make sure that messages about files call them files.';
@@ ./tests/add.pl 145 @@
 chdir '../';
 rm_rf 'temp1';
 ok((!-d 'temp1'), 'temp1 directory was deleted');
+
+pass(1);
}





More information about the darcs-users mailing list