[darcs-users] darcs annotate format obscures the code

Michael G Schwern schwern at pobox.com
Sun Mar 20 08:13:11 UTC 2005


On Sun, Mar 20, 2005 at 08:47:00AM +0100, Thomas Zander wrote:
> > Where's the code? ?Code is distinguished by a single leading space, not
> > much of a visual distinguisher at the best of times, but so are the (oft
> > repeated) log messages embedded in the annotation making it almost
> > impossible to tell code from annotation without careful study.
> 
> I usually output the annotation to a file and then open the file with VI.  
> It makes all the stuff starting with '#' blue and the rest is black.  Quite 
> readable.  Although it usually is still enough to make me use the search 
> functions of my editor.

Which brings up an additional problem.  When I'm looking at a blame log I
usually want to answer the question "why is line 452 in file Foo.pm there?"
With the CVS/SVN/SVK annotation format line 452 is line 452 (well, 454 for
SVK, they screw that up a bit).  With darcs... who knows?  The annotations
add vertical space and thus throw off the line numbers entirely.  Now
instead of a simple "jump to line 452" in my pager I must grep the code
(and the log messages) to find my line.

More work.


> > Its nice to have the full log message along with every line of code but
> > not at the expense of obscuring what's being annotated. ?Perhaps this
> > could be achieved in a more dynamic format than text, such as a web page,
> > but in plain text it just gets in the way.
> 
> The reason for this is simple (so you understand where this is coming from) 
> darcs does not use version numbers it uses unique-names for each patch.  
> That is exactly what you are seeing.  The logmessage is the 'key' for each 
> commit.
> From the technical point of view; this is as brief as it will get if you 
> want it to stay technically correct.

There's got to be a better way to boil all that down.  Some checksum?
It doesn't have to be the full name of the patch, just some reference
number to refer to an entry in the local change log.  In that sense it
can be a simple number.


> > One of my questions here is... does anyone use this and like this? ?Its
> > possible I'm just used to the CVS/SVK format and not using the darcs
> > format to its fullest.
> 
> Well, I actually dislike cvs annotate about as much as darcs annotate, in 
> that it give me too little information instead of too much.
> I usually start a GUI (like cervisia) to browse this kind of info.
> IMO optimisations like this are not really usefull since you won't ever 
> create an understandable UI without a graphical UI.

I'm not going to allow this to be dragged down into a GUI vs CLI argument.  I
will simply say that darcs is a command line tool.  You can wrap a GUI around
it if you want but the CLI part should work as well as it can.

The issue is how to show the code with as little modification as possible
while showing as much annotation information as possible.  The command line
is limited in this respect, it only has two dimensions.  It cannot
overlay additional information with a popup (for the record, I'm including
curses type things as GUI).  There are only 2 dimensions to work with in
a streaming mode (ie. once you write out a line you can't go back).





More information about the darcs-users mailing list