[darcs-users] darcs annotate format obscures the code

David Roundy droundy at abridgegame.org
Sun Mar 20 10:50:41 UTC 2005


On Sun, Mar 20, 2005 at 10:16:54AM +0000, Ralph Corderoy 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 agree that the annotate format is terrible.  It predates the cgi script,
and I was mostly hacking something simple (to code) to show what could be
done.

> I agree with the general problem.  I think the code up front with a
> `change number', i.e. 1..n, followed by an `end of code' marker and the
> blame details, in change number order.  Both have to be output at the
> same time to avoid the repo changing inbetween generating the two.  I
> suppose the command could send the code to stdout and store the blame
> detail in a separate given file.

I like this idea! I presume you mean something like (taking some liberties
here)


00001: #!/bin/sh
00002: echo this is only a test
00001: exit 0

END OF FILE (but this message is still part of the annotate output

00001: Sun Oct 20 20:01:05 EDT 2002  droundy at abridgegame.org
  * Initial version of stupid example.

00002: Sun Oct 20 20:01:15 EDT 2002  droundy at abridgegame.org
  * Explain to the user that this is just a test.

Thus we would give the entire messages at the bottom along with unique
identifiers of some sort, and we'd have a very compact and readable
representation of the actual code.

We'd also want to have a second entry for the patch which deleted a
particular line (which would be relevant if we're looking at an older
version of the file).  So maybe something like (for the hypothetical first
version of this test case)

00001-  NOW: #!/bin/sh
00001-00002: echo hello world
00001-  NOW: exit 0

END OF FILE (but this message is still part of the annotate output

00001: Sun Oct 20 20:01:05 EDT 2002  droundy at abridgegame.org
  * Initial version of stupid example.

00002: Sun Oct 20 20:01:15 EDT 2002  droundy at abridgegame.org
  * Explain to the user that this is just a test.

If someone wants to code this up, that would be wonderful.  Or if someone
has a better idea.  I'm off to the airport now... (well, really in ten or
fifteen minutes...)
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list