[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

How to do annotate

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2002-08-13 07:59:25 CEST

Just so it doesn't get lost in the noise, i've excerpted how to do
annotate from my email to Tom.

The exact details on how/where to track the lines should be fairly easy
for Brane. If it wasn't so late, i'ddo it myself.
Looking at the delta combiner code, it looks fairly simple.

>
> >> * svndiff (our delta format) isn't very "cvs annotate" friendly.
> >> This is really depressing, esp. after Brane spent a lot of hard work
> >> writing a delta combiner for us. :( Thoughts about how to handle the
> >> delta-window problem wrt svndiff would be most welcome.
>
....

So, to show there's really no problem, and that the delta combiner doesn't
make it easier or harder, ....

Before the delta combiner, you would have to perform the following steps:

1. For each revision starting from 1, up to the revision we need to
annotate to, grab the name of the delta window that starts that revision.
Make a nice mapping structure so that you can lookup "foo", and it'll say
"1.3"
2. As you apply deltas, and generate bytes, each range of bytes generated
gets marked with the revision number associated with that window (if any. If
you don't find it in the map, it means it doesn't delineate a new
revision, and we assign it the previous number), which we lookup.
3. Now you must transform the byte ranges into *lines*, so it looks
pretty. This is done by looking at the actual content, and figuring out where each
line would break.
Each line is assigned the newest revision that touches something on that
line.
4. Boom, yer dnone.

With a delta combiner, it's the same first step, but the second step's
tracking needs to be performed *in the delta combiner* (since now *it*
is what is effectively applying the deltas to generate a combined one,
it just does so *without* actually executing the commands),
or else, you have to avoid the delta combinator, and do step two.
Doing it in the delta combiner depends on how exactly your combiner works.

--Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 13 07:59:55 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.