subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1608745 - /subversion/trunk/subversion/mod_dav_svn/reports/update.c
Date Tue, 08 Jul 2014 12:22:23 GMT
Author: rhuijben
Date: Tue Jul  8 12:22:23 2014
New Revision: 1608745

URL: http://svn.apache.org/r1608745
Log:
Simplify a bit of logic. No functional changes.

* subversion/mod_dav_svn/reports/update.c
  (add_helper): Move bc_url string calculation to the directory case.

Modified:
    subversion/trunk/subversion/mod_dav_svn/reports/update.c

Modified: subversion/trunk/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/update.c?rev=1608745&r1=1608744&r2=1608745&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Tue Jul  8 12:22:23 2014
@@ -317,7 +317,6 @@ add_helper(svn_boolean_t is_dir,
 {
   item_baton_t *child;
   update_ctx_t *uc = parent->uc;
-  const char *bc_url = NULL;
 
   child = make_child_baton(parent, path, pool);
   child->added = TRUE;
@@ -341,6 +340,8 @@ add_helper(svn_boolean_t is_dir,
         {
           /* we send baseline-collection urls when we add a directory */
           svn_revnum_t revision;
+          const char *bc_url;
+
           revision = dav_svn__get_safe_cr(child->uc->rev_root, real_path,
                                           pool);
           bc_url = dav_svn__build_uri(child->uc->resource->info->repos,
@@ -360,6 +361,8 @@ add_helper(svn_boolean_t is_dir,
 
           /* make sure that the BC_URL is xml attribute safe. */
           bc_url = apr_xml_quote_string(pool, bc_url, 1);
+
+          bc_url_str = apr_psprintf(pool, " bc-url=\"%s\"", bc_url);
         }
       else
         {
@@ -373,9 +376,6 @@ add_helper(svn_boolean_t is_dir,
                            svn_checksum_to_cstring(sha1_checksum, pool));
         }
 
-      if (bc_url)
-        bc_url_str = apr_psprintf(pool, " bc-url=\"%s\"", bc_url);
-
       if (copyfrom_path == NULL)
         {
           elt = apr_psprintf(pool,



Mime
View raw message