You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Anselm R. Garbe" <an...@t-online.de> on 2004/03/18 01:43:34 UTC

svn log line deltas

Hi there,

I've migrated from cvs to subversion for several projects I maintain.
Before migration I used the statcvs-xml (http://statcvs-xml.berlios.de)
project tracing tool to get great reports of developer cvs usage and
statistics (several metrics are supported by statcvs-xml) until migration.
statcvs-xml uses cvs log output to generate it's metrics.

One important semantic difference between svn and cvs log capabilities I
noticed so long (relevant for statcvs) is that svn log does not support
source based line change deltas as cvs does (e.g. -20 +50).
But most metrics about version control are based on developer based line
change deltas, I think.

So I googled around and found following thread discussed on this list a
month ago:

http://www.contactor.se/~dast/svnusers/archive-2004-02/0297.shtml

Following this thread, it seems that deltas won't be supported in future
by svn?

I tried svn diff -r X and counting ^+ and ^-, but this is pretty
annoying and provides no sufficient information about history based line
deltas (only deltas between two revisions).

Do you know any other way to get sufficient information from svn about
deltas of changed lines for arbritrary revisions and the whole revision
history (like cvs log does)?

Regards,
-- 
  Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log line deltas

Posted by Florian Weimer <fw...@deneb.enyo.de>.
Anselm R. Garbe wrote:

> I think deltas should be saved per revision as meta information after each
> commit (which will be constant), so this would be a cheap operation in
> my eyes.

The subversion repository doesn't know much about lines in text files.
The delta algorithm doesn't produce the numbers you want, unfortunately.

-- 
Current mail filters: many dial-up/DSL/cable modem hosts, and the
following domains: atlas.cz, bigpond.com, freenet.de, hotmail.com,
libero.it, netscape.net, postino.it, tiscali.co.uk, tiscali.cz,
tiscali.it, voila.fr, wanadoo.fr, yahoo.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log line deltas

Posted by "Anselm R. Garbe" <an...@t-online.de>.
One remark: With deltas I mean only the number of removed and added
lines (-n +m)

On Thu, Mar 18, 2004 at 07:44:42AM +0100, Anselm R. Garbe wrote:
> I think deltas should be saved per revision as meta information after each
> commit (which will be constant), so this would be a cheap operation in
> my eyes. If I understand it correctly, how svn handles commits, the new
> algorithm should look as follows:
> 
> Commit:
> 
> 1. Receive data from client
> 2. Use new revision of the file (which is stored as it is) and generate diffs
> for older revisions against it.
> 2.a) Store each diff per revision
> 2.a) Store deltas for each revision as meta information about a revision
> 
> Log:
> 
> 1. For all revisions get meta information (revision id, author, date,
>     commit log, deltas)
> ( 1.a) Generate some dynamic infos, if needed )
> 2. Transmit data to client
> 
> What would be expensive on saving to deltas for each revision per file?
> 
> Regards,
> -- 
>   Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361

-- 
  Anselm R. Garbe  ><><  www.ebrag.de  ><><  GPG key: 0D73F361

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn log line deltas

Posted by Carey Evans <ca...@spamcop.net>.
Anselm R. Garbe wrote:

> I think deltas should be saved per revision as meta information after each
> commit (which will be constant), so this would be a cheap operation in
> my eyes. If I understand it correctly, how svn handles commits, the new
> algorithm should look as follows:

[...]

If you want to implement this yourself, it seems like it shouldn't be 
hard to add a commit hook to store the information in a revprop.  The 
log command doesn't return revision properties either, although this 
might be nice, but it's not too hard to retrieve the property value.

-- 
"Hanging is too good for a man who makes puns; he should be drawn and 
quoted."
         -- Fred Allen

Re: svn log line deltas

Posted by "C. Michael Pilato" <cm...@collab.net>.
anselmg@t-online.de (Anselm R. Garbe) writes:

> Following this thread, it seems that deltas won't be supported in future
> by svn?

It would be an expensive operation to ask of the server for each
successive revision of a file.  I'm -1 on the feature unless it comes
very cheaply in terms of performance hits.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org