subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1779620 - /subversion/trunk/subversion/libsvn_client/checkout.c
Date Fri, 20 Jan 2017 12:48:00 GMT
Author: stefan2
Date: Fri Jan 20 12:48:00 2017
New Revision: 1779620

URL: http://svn.apache.org/viewvc?rev=1779620&view=rev
Log:
Eliminate a server roundtrip from checkouts of HEAD.

Prior to the patch, the head reavision would be requested twice; once to
resolve the PATHREV and a second time in the update_internal call.  This
is not only unnecessary but also yields inconsistent results as we use the
first result to check the patch to check out while the second may be a
later revision where the path has already been deleted.

* subversion/libsvn_client/checkout.c
  (svn_client__checkout_internal):  We have resolved the resivision number
                                    already and checked the path's type for
                                    it.  So, run checkout for exactly the
                                    revision we just checked.

Modified:
    subversion/trunk/subversion/libsvn_client/checkout.c

Modified: subversion/trunk/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/checkout.c?rev=1779620&r1=1779619&r2=1779620&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/checkout.c (original)
+++ subversion/trunk/subversion/libsvn_client/checkout.c Fri Jan 20 12:48:00 2017
@@ -81,6 +81,7 @@ svn_client__checkout_internal(svn_revnum
 {
   svn_node_kind_t kind;
   svn_client__pathrev_t *pathrev;
+  svn_opt_revision_t resolved_rev = { svn_opt_revision_number };
 
   /* Sanity check.  Without these, the checkout is meaningless. */
   SVN_ERR_ASSERT(local_abspath != NULL);
@@ -125,6 +126,7 @@ svn_client__checkout_internal(svn_revnum
     }
 
   SVN_ERR(svn_ra_check_path(ra_session, "", pathrev->rev, &kind, scratch_pool));
+  resolved_rev.value.number = pathrev->rev;
 
   if (kind == svn_node_none)
     return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
@@ -185,8 +187,8 @@ svn_client__checkout_internal(svn_revnum
 
   /* Have update fix the incompleteness. */
   SVN_ERR(svn_client__update_internal(result_rev, timestamp_sleep,
-                                      local_abspath, revision, depth, TRUE,
-                                      ignore_externals,
+                                      local_abspath, &resolved_rev, depth,
+                                      TRUE, ignore_externals,
                                       allow_unver_obstructions,
                                       TRUE /* adds_as_modification */,
                                       FALSE, FALSE, ra_session,



Mime
View raw message