You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2010/03/16 11:39:02 UTC

svn commit: r923674 - /subversion/branches/1.6.x-issue3605/subversion/libsvn_wc/status.c

Author: rhuijben
Date: Tue Mar 16 10:39:02 2010
New Revision: 923674

URL: http://svn.apache.org/viewvc?rev=923674&view=rev
Log:
Fix issue #3605, by making sure that the entries stored in the externals
hash live as long as the externals hash itself instead of as long as the
directory containing the externals definitions lives.

This was originally fixed on trunk in r879344 (and a few other revisions)
while moving the code to WC-NG.

* subversion/libsvn_wc/status.c
  (get_dir_status): Store the externals definitions in the hash_pool and
    use a static string as (unused) value.

Found by: J Prince <princej.ws01{_AT_}hotmail.co.uk>


Modified:
    subversion/branches/1.6.x-issue3605/subversion/libsvn_wc/status.c

Modified: subversion/branches/1.6.x-issue3605/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3605/subversion/libsvn_wc/status.c?rev=923674&r1=923673&r2=923674&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3605/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/1.6.x-issue3605/subversion/libsvn_wc/status.c Tue Mar 16 10:39:02 2010
@@ -884,6 +884,7 @@ get_dir_status(struct edit_baton *eb,
       if (prop_val)
         {
           apr_array_header_t *ext_items;
+          apr_pool_t *hash_pool = apr_hash_pool_get(wb->externals);
           int i;
 
           if (eb->traversal_info)
@@ -916,8 +917,8 @@ get_dir_status(struct edit_baton *eb,
               item = APR_ARRAY_IDX(ext_items, i, svn_wc_external_item2_t *);
               apr_hash_set(eb->externals, svn_path_join(path,
                                                         item->target_dir,
-                                                        pool),
-                           APR_HASH_KEY_STRING, item);
+                                                        hash_pool),
+                           APR_HASH_KEY_STRING, "");
             }
         }
     }