subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1378343 - /subversion/branches/inheritable-props/subversion/libsvn_client/iprops.c
Date Tue, 28 Aug 2012 21:07:10 GMT
Author: pburba
Date: Tue Aug 28 21:07:10 2012
New Revision: 1378343

URL: http://svn.apache.org/viewvc?rev=1378343&view=rev
Log:
On the inheritable-props branch: Tiny optimization.

* subversion/libsvn_client/iprops.c

  (svn_client__get_inheritable_props): Don't needlessly reparent
   a session inside a loop, wait till the loop is done and do it
   once.

Modified:
    subversion/branches/inheritable-props/subversion/libsvn_client/iprops.c

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/iprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/iprops.c?rev=1378343&r1=1378342&r2=1378343&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/iprops.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/iprops.c Tue Aug 28 21:07:10
2012
@@ -88,10 +88,12 @@ svn_client__get_inheritable_props(apr_ha
                                        iterpool, iterpool));
           if (ra_session)
             {
-              SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url,
-                                                        ra_session,
-                                                        url,
-                                                        scratch_pool));
+              if (old_session_url)
+                SVN_ERR(svn_ra_reparent(ra_session, url, scratch_pool));
+              else
+                SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url,
+                                                          ra_session, url,
+                                                          scratch_pool));
             }
           else
             {
@@ -106,17 +108,15 @@ svn_client__get_inheritable_props(apr_ha
           SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
                                              "", revision, result_pool,
                                              scratch_pool));
-
-          if (old_session_url)
-            SVN_ERR(svn_ra_reparent(ra_session, old_session_url,
-                                    iterpool));
-
           apr_hash_set(*wcroot_iprops,
                        apr_pstrdup(result_pool, child_abspath),
                        APR_HASH_KEY_STRING,
                        inherited_props);
         }
 
+      if (old_session_url)
+        SVN_ERR(svn_ra_reparent(ra_session, old_session_url,
+                                iterpool));
       svn_pool_destroy(iterpool);
     }
 



Mime
View raw message