You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ka...@apache.org on 2010/10/04 18:14:18 UTC

svn commit: r1004306 - in /subversion/trunk/subversion: libsvn_client/repos_diff.c libsvn_ra_neon/commit.c libsvn_ra_serf/commit.c libsvn_repos/node_tree.c libsvn_wc/update_editor.c mod_dav_svn/reports/update.c svnlook/main.c

Author: kameshj
Date: Mon Oct  4 16:14:17 2010
New Revision: 1004306

URL: http://svn.apache.org/viewvc?rev=1004306&view=rev
Log:
Pass NULL pointer to svn_relpath_basename wherever the returned 
basename need not be allocated in pool.
            
  * subversion/mod_dav_svn/reports/update.c
    (absent_helper, upd_delete_entry):
  * subversion/libsvn_wc/update_editor.c
    (delete_entry):
  * subversion/svnlook/main.c
    (print_tree):
  * subversion/libsvn_client/repos_diff.c
    (absent_directory):
  * subversion/libsvn_ra_neon/commit.c
    (commit_delete_entry):
  * subversion/libsvn_ra_serf/commit.c
    (checkout_dir):
  * subversion/libsvn_repos/node_tree.c
    (add_open_helper):
        Pass NULL pointer to svn_relpath_basename wherever the returned
        basename need not be persistent.

Patch by: Vijayaguru G <vijay_at_collab.net>
Suggested by: me

Modified:
    subversion/trunk/subversion/libsvn_client/repos_diff.c
    subversion/trunk/subversion/libsvn_ra_neon/commit.c
    subversion/trunk/subversion/libsvn_ra_serf/commit.c
    subversion/trunk/subversion/libsvn_repos/node_tree.c
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/mod_dav_svn/reports/update.c
    subversion/trunk/subversion/svnlook/main.c

Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Mon Oct  4 16:14:17 2010
@@ -1244,7 +1244,7 @@ absent_directory(const char *path,
       svn_wc_notify_t *notify
         = svn_wc_create_notify(svn_dirent_join(pb->wcpath,
                                                svn_relpath_basename(path,
-                                                                    pool),
+                                                                    NULL),
                                                pool),
                                svn_wc_notify_skip, pool);
       notify->kind = svn_node_dir;

Modified: subversion/trunk/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/commit.c?rev=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/commit.c Mon Oct  4 16:14:17 2010
@@ -701,7 +701,7 @@ static svn_error_t * commit_delete_entry
                                          apr_pool_t *pool)
 {
   resource_baton_t *parent = parent_baton;
-  const char *name = svn_relpath_basename(path, pool);
+  const char *name = svn_relpath_basename(path, NULL);
   apr_hash_t *extra_headers = NULL;
   const char *child;
   int code;

Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Mon Oct  4 16:14:17 2010
@@ -380,7 +380,7 @@ checkout_dir(dir_context_t *dir)
           dir->checkout->activity_url_len = dir->commit->activity_url_len;
           dir->checkout->resource_url =
             svn_path_url_add_component2(dir->parent_dir->checkout->resource_url,
-                                        svn_relpath_basename(dir->name, dir->pool),
+                                        svn_relpath_basename(dir->name, NULL),
                                         dir->pool);
 
           apr_hash_set(dir->commit->copied_entries,

Modified: subversion/trunk/subversion/libsvn_repos/node_tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/node_tree.c?rev=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/node_tree.c (original)
+++ subversion/trunk/subversion/libsvn_repos/node_tree.c Mon Oct  4 16:14:17 2010
@@ -268,7 +268,7 @@ add_open_helper(const char *path,
   nb->parent_baton = pb;
 
   /* Create and populate the node. */
-  nb->node = create_child_node(pb->node, svn_relpath_basename(path, pool),
+  nb->node = create_child_node(pb->node, svn_relpath_basename(path, NULL),
                                eb->node_pool);
   nb->node->kind = kind;
   nb->node->action = action;

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Mon Oct  4 16:14:17 2010
@@ -2117,7 +2117,7 @@ delete_entry(const char *path,
              apr_pool_t *pool)
 {
   struct dir_baton *pb = parent_baton;
-  const char *base = svn_relpath_basename(path, pool);
+  const char *base = svn_relpath_basename(path, NULL);
   const char *local_abspath;
   const char *their_relpath;
 

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=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Mon Oct  4 16:14:17 2010
@@ -250,7 +250,7 @@ absent_helper(svn_boolean_t is_dir,
                "<S:absent-%s name=\"%s\"/>" DEBUG_CR,
                DIR_OR_FILE(is_dir),
                apr_xml_quote_string(pool,
-                                    svn_relpath_basename(path, pool),
+                                    svn_relpath_basename(path, NULL),
                                     1)));
     }
 
@@ -589,7 +589,7 @@ upd_delete_entry(const char *path,
 {
   item_baton_t *parent = parent_baton;
   const char *qname = apr_xml_quote_string(pool,
-                                           svn_relpath_basename(path, pool),
+                                           svn_relpath_basename(path, NULL),
                                            1);
   return dav_svn__brigade_printf(parent->uc->bb, parent->uc->output,
                                  "<S:delete-entry name=\"%s\"/>" DEBUG_CR,

Modified: subversion/trunk/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/main.c?rev=1004306&r1=1004305&r2=1004306&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/main.c (original)
+++ subversion/trunk/subversion/svnlook/main.c Mon Oct  4 16:14:17 2010
@@ -1204,7 +1204,7 @@ print_tree(svn_fs_root_t *root,
   else if (*path == '/')
     name = svn_uri_basename(path, pool);
   else
-    name = svn_relpath_basename(path, pool);
+    name = svn_relpath_basename(path, NULL);
 
   if (svn_path_is_empty(name))
     name = "/"; /* basename of '/' is "" */