You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by William Uther <wi...@cs.cmu.edu> on 2002/08/13 14:35:24 UTC
Re: How to do annotate (blame)
On Tuesday, August 13, 2002, at 02:22 AM, Greg Hudson wrote:
> On Tue, 2002-08-13 at 01:59, Daniel Berlin wrote:
>> 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.
>
> This is too simplistic. Let me throw out some concerns. First, an
> example:
>
> SRC: foo\nbar\nbar\n
> DST: foo\nbar\nfoo\nbar\n
>
> The instructions for this delta look like:
>
> Copy 8 bytes from src offset 0
> Copy 8 bytes from src offset 8
Yes. I think it is quite interesting that svndelta is not really a
"delta" algorithm, but an efficient compression algorithm for the second
piece of text given the first. (I agree the difference is subtle) The
fact that they are not easily reversible has made some of my thinking
about merging tricky.
I believe another problem is that we currently use skip-deltas. This
means that many revisions are not stored as deltas to their neighbouring
revisions. You can't just apply the deltas one by one.
later,
\x/ill :-}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: How to do annotate (blame)
Posted by sam th <sa...@uchicago.edu>.
On Tue, Aug 13, 2002 at 10:58:57AM -0400, Greg Hudson wrote:
> On Tue, 2002-08-13 at 10:45, Daniel Berlin wrote:
> > How often does one do annotate?
>
> I will note that some CVS web interfaces make it easier to generate an
> annotated source listing tha a non-annotated source listing. I'm sure
> CVS repositories using those web interfaces get lots of annotate
> operations.
>
> But it's easy enough to say "don't do that, it hurts" for Subversion, in
> which case I'm happy with making annotate slow, for now. (And, as I
> noted, not really slow until you start getting files with many many
> revisions.)
Let me preface this by saying that I'm very interested in using SVN, and have
already used it for a small personal project. But I really think that this
decision would be a real problem for Subversion's adoption by the community
that uses cvs. I know that annotate is a much more common operation for me
(often through the Bonsai web interface) that is moving files, or changing
directory structure. It's invaluable for understanding how the code got into
the situation that it's in.
Further, it's precisely those projects and files with lots (100+) revisions
that need this tool. Something that's only been changed twice has an easy to
understand revision history. Something that has been changed 300 times since
the piece of code in question was committed is where this tool is most
useful.
Finally, the tools, like Bonsai, that have grown up around CVS are so useful
that I, personally, would find it unreasonable to give them up, simply
because Subversion doesn't implement annotate in a way that makes them
possible.
sam th
sam@uchicago.edu
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: How to do annotate (blame)
Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2002-08-13 at 10:45, Daniel Berlin wrote:
> How often does one do annotate?
I will note that some CVS web interfaces make it easier to generate an
annotated source listing tha a non-annotated source listing. I'm sure
CVS repositories using those web interfaces get lots of annotate
operations.
But it's easy enough to say "don't do that, it hurts" for Subversion, in
which case I'm happy with making annotate slow, for now. (And, as I
noted, not really slow until you start getting files with many many
revisions.)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: Re: How to do annotate (blame)
Posted by Bill Tutt <ra...@lyra.org>.
Indeed, just think how useful blame output can be in a three way merge
UI:
http://bitmover.com/gifs/fm3new.gif
Bill
> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
>
> Daniel Berlin <db...@dberlin.org> writes:
> > How often does one do annotate?
> > I think i've used it twice, ever.
>
> Oh, I've used it on a regular basis in past projects, and depended on
> the information being correct. I've *wanted* to use it in svn, and
> been frustrated that I couldn't.
>
> I think this might one of those features where those who don't use it
> can't understand the enthusiasm of those who do :-). But it is
> important to get it right, for those who depend on it.
>
> -K
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: How to do annotate (blame)
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Daniel Berlin <db...@dberlin.org> writes:
> How often does one do annotate?
> I think i've used it twice, ever.
Oh, I've used it on a regular basis in past projects, and depended on
the information being correct. I've *wanted* to use it in svn, and
been frustrated that I couldn't.
I think this might one of those features where those who don't use it
can't understand the enthusiasm of those who do :-). But it is
important to get it right, for those who depend on it.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: How often does one do annotate?
Posted by Greg Stein <gs...@lyra.org>.
While frequency is an important measure, I think the *relative* frequency of
operations is more important. For example, we definitely don't want to
impact simple *retrieval* at the cost of "blame" support. As a result, we
probably would not want to use a system whereby we store [in the repository]
line-oriented diffs for text files.
Personally, I use blame maybe once every couple months. I always use ViewCVS
to do it, as I don't have the "cvs ann" command in my head.
Cheers,
-g
On Tue, Aug 13, 2002 at 10:33:09AM -0500, Dave Glowacki wrote:
> Daniel Berlin wrote:
> > How often does one do annotate?
> > I think i've used it twice, ever.
>
> I probably use 'cvs ann' at least once a month. I'm involved
> in several medium-sized projects (500-1000 files, averaging
> 700-1000 lines each) and I find it useful to figure out either
> the context in which a particular change was made or to determine
> what the file looked like before the change was made.
>
> For either one, I'll do 'cvs ann' to find the revision where
> the line or lines I'm interested in were changed.
>
> To get the context, I'll do 'cvs diff -r<rev-1> -r<rev>'.
>
> To find out what the file looked like before the change,
> I'll either do 'cvs ann -r<rev-1> | less' or even
> 'cvs update -r<rev-1>'.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: How to do annotate (blame)
Posted by Daniel Berlin <db...@dberlin.org>.
On Tue, 13 Aug 2002, William Uther wrote:
>
> On Tuesday, August 13, 2002, at 02:22 AM, Greg Hudson wrote:
>
> > On Tue, 2002-08-13 at 01:59, Daniel Berlin wrote:
> >> 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.
> >
> > This is too simplistic. Let me throw out some concerns. First, an
> > example:
> >
> > SRC: foo\nbar\nbar\n
> > DST: foo\nbar\nfoo\nbar\n
> >
> > The instructions for this delta look like:
> >
> > Copy 8 bytes from src offset 0
> > Copy 8 bytes from src offset 8
>
> Yes. I think it is quite interesting that svndelta is not really a
> "delta" algorithm, but an efficient compression algorithm for the second
> piece of text given the first. (I agree the difference is subtle) The
> fact that they are not easily reversible has made some of my thinking
> about merging tricky.
>
> I believe another problem is that we currently use skip-deltas. This
> means that many revisions are not stored as deltas to their neighbouring
> revisions. You can't just apply the deltas one by one.
Yes, this would be a problem.
But the only "perfect" solution in light of this (where perfect is not
absolutely correct output, but as good as cvs) is to generate the
fulltext of all the revisions, and do a line based diff algorithm on
them, or to turn off skip-deltas.
How often does one do annotate?
I think i've used it twice, ever.
Is it often enough that we should be all that concerned with speed?
We are probably talking 10 seconds vs 1 second, in terms of speed
difference between doing it only based on svndiff, or doing it based on
the generated fulltexts.
But doing it based on fulltexts is actually improved by skip-deltas, since
we can generate fulltexts faster.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org