You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/02/10 23:10:34 UTC

svn commit: r1242958 - /subversion/trunk/subversion/libsvn_repos/log.c

Author: hwright
Date: Fri Feb 10 22:10:34 2012
New Revision: 1242958

URL: http://svn.apache.org/viewvc?rev=1242958&view=rev
Log:
Older (pre-1.6) revision files don't contain the information to fully populate
the changed_path hash for 'log -v' and 'log --xml'.  If we encounter such a
condition, fetch the kind manually.

* subversion/libsvn_repos/log.c
  (detect_changed): If the fs doesn't give us a kind initially, try try again!

Modified:
    subversion/trunk/subversion/libsvn_repos/log.c

Modified: subversion/trunk/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/log.c?rev=1242958&r1=1242957&r2=1242958&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/log.c (original)
+++ subversion/trunk/subversion/libsvn_repos/log.c Fri Feb 10 22:10:34 2012
@@ -264,6 +264,12 @@ detect_changed(apr_hash_t **changed,
                                              : svn_tristate_false;
       item->props_modified = change->prop_mod ? svn_tristate_true
                                               : svn_tristate_false;
+
+      /* Pre-1.6 revision files don't store the change path kind, so fetch
+         it manually. */
+      if (item->node_kind == svn_node_unknown)
+        SVN_ERR(svn_fs_check_path(&item->node_kind, root, path, subpool));
+
       if ((action == 'A') || (action == 'R'))
         {
           const char *copyfrom_path;



Re: svn commit: r1242958 - /subversion/trunk/subversion/libsvn_repos/log.c

Posted by Philip Martin <ph...@wandisco.com>.
Hyrum K Wright <hy...@wandisco.com> writes:

> On Fri, Feb 10, 2012 at 4:24 PM, Bert Huijben <be...@qqmail.nl> wrote:
>>
>>
>>> -----Original Message-----
>>> From: hwright@apache.org [mailto:hwright@apache.org]
>>> Sent: vrijdag 10 februari 2012 23:11
>>> To: commits@subversion.apache.org
>>> Subject: svn commit: r1242958 -
>>> /subversion/trunk/subversion/libsvn_repos/log.c
>>>
>>> Author: hwright
>>> Date: Fri Feb 10 22:10:34 2012
>>> New Revision: 1242958
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1242958&view=rev
>>> Log:
>>> Older (pre-1.6) revision files don't contain the information to fully populate
>>> the changed_path hash for 'log -v' and 'log --xml'.  If we encounter such a
>>> condition, fetch the kind manually.
>>
>> Why do we add this now?
>>
>> We started sending the information 'when available' with 1.6, and I
>> think we didn't retrieve the data for performance reasons. Did
>> something change?
>
> User request (through private channels).  They were parsing the output
> of 'log --xml' which shows a blank 'kind' attribute against these old
> revisions.  Fetching the kind as part of the log is much easier, both
> for the user and for performance, than individually running 'svn info'
> on each node.
>
> Arguably, they could cache this information somewhere client-side,
> since the historic information isn't going to change.  But that's what
> the VCS is for in the first place.
>
>> This might be quite a performance regression for 'svnadmin upgrade'-d
>> servers that were from <=1.5 before the last dump-load and it won't
>> make the information magically available on clients, because there is
>> no requirement to upgrade the server.
>
> Possibly, but I think we already say that running 'log -v' may take a
> while longer than "normal" log.  I also think the number of such
> instances likely to be encountered in the wild are few, and the
> benefits to those that do want this information outweigh the costs.

So this code didn't work for deleted nodes, it's necessary to track back
to a revision in which the node exists.  I've fixed it with r1245800 but
that probably makes it now even more expensive.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

Re: svn commit: r1242958 - /subversion/trunk/subversion/libsvn_repos/log.c

Posted by Hyrum K Wright <hy...@wandisco.com>.
On Fri, Feb 10, 2012 at 4:24 PM, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: hwright@apache.org [mailto:hwright@apache.org]
>> Sent: vrijdag 10 februari 2012 23:11
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1242958 -
>> /subversion/trunk/subversion/libsvn_repos/log.c
>>
>> Author: hwright
>> Date: Fri Feb 10 22:10:34 2012
>> New Revision: 1242958
>>
>> URL: http://svn.apache.org/viewvc?rev=1242958&view=rev
>> Log:
>> Older (pre-1.6) revision files don't contain the information to fully populate
>> the changed_path hash for 'log -v' and 'log --xml'.  If we encounter such a
>> condition, fetch the kind manually.
>
> Why do we add this now?
>
> We started sending the information 'when available' with 1.6, and I think we didn't retrieve the data for performance reasons. Did something change?

User request (through private channels).  They were parsing the output
of 'log --xml' which shows a blank 'kind' attribute against these old
revisions.  Fetching the kind as part of the log is much easier, both
for the user and for performance, than individually running 'svn info'
on each node.

Arguably, they could cache this information somewhere client-side,
since the historic information isn't going to change.  But that's what
the VCS is for in the first place.

> This might be quite a performance regression for 'svnadmin upgrade'-d servers that were from <=1.5 before the last dump-load and it won't make the information magically available on clients, because there is no requirement to upgrade the server.

Possibly, but I think we already say that running 'log -v' may take a
while longer than "normal" log.  I also think the number of such
instances likely to be encountered in the wild are few, and the
benefits to those that do want this information outweigh the costs.

-Hyrum


-- 

uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/

Re: svn commit: r1242958 - /subversion/trunk/subversion/libsvn_repos/log.c

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/10/2012 05:24 PM, Bert Huijben wrote:
> 
> 
>> -----Original Message-----
>> From: hwright@apache.org [mailto:hwright@apache.org]
>> Sent: vrijdag 10 februari 2012 23:11
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1242958 -
>> /subversion/trunk/subversion/libsvn_repos/log.c
>>
>> Author: hwright
>> Date: Fri Feb 10 22:10:34 2012
>> New Revision: 1242958
>>
>> URL: http://svn.apache.org/viewvc?rev=1242958&view=rev
>> Log:
>> Older (pre-1.6) revision files don't contain the information to fully populate
>> the changed_path hash for 'log -v' and 'log --xml'.  If we encounter such a
>> condition, fetch the kind manually.
> 
> Why do we add this now?
> 
> We started sending the information 'when available' with 1.6, and I think we didn't retrieve the data for performance reasons. Did something change?
> 
> This might be quite a performance regression for 'svnadmin upgrade'-d servers that were from <=1.5 before the last dump-load and it won't make the information magically available on clients, because there is no requirement to upgrade the server.
> 
> 	Bert
> 

I confess I was wondering the same thing.  We really don't want any
additional performance penalties in the log code, which already suffers
severely when non-trivial authz rules are in place.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


RE: svn commit: r1242958 - /subversion/trunk/subversion/libsvn_repos/log.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: vrijdag 10 februari 2012 23:11
> To: commits@subversion.apache.org
> Subject: svn commit: r1242958 -
> /subversion/trunk/subversion/libsvn_repos/log.c
> 
> Author: hwright
> Date: Fri Feb 10 22:10:34 2012
> New Revision: 1242958
> 
> URL: http://svn.apache.org/viewvc?rev=1242958&view=rev
> Log:
> Older (pre-1.6) revision files don't contain the information to fully populate
> the changed_path hash for 'log -v' and 'log --xml'.  If we encounter such a
> condition, fetch the kind manually.

Why do we add this now?

We started sending the information 'when available' with 1.6, and I think we didn't retrieve the data for performance reasons. Did something change?

This might be quite a performance regression for 'svnadmin upgrade'-d servers that were from <=1.5 before the last dump-load and it won't make the information magically available on clients, because there is no requirement to upgrade the server.

	Bert