[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Correupt fields in file_baton when using 'svn export'

From: plasma <plasmaball_at_pchome.com.tw>
Date: 2003-06-17 08:50:31 CEST

Hi all,

  After upgrading to 0.24.0, I encountered core dump when using 'svn
export', but seems others don't have this problem. After fighting
with gdb, I think I have fixed the problem.

  The problem is that many fields are corrupted in file_baton. The
reason is delta_proplists() in delta.c creates a subpool, and it
passes the subpool to called functions, including change_file_prop()
in export.c. Since file_baton cached its own pool, I just use it
instead passed from calling function.



* subversion/libsvn_client/export.c
  (change_file_prop()): Don't use pool passed from caller to create
  a duplicate value of keywords, because the pool might be a temporary
  one, and the values are needed later. Use the cached pool stored in
  file_baton instead.


--- export.c.orig Mon Jun 16 03:09:58 2003
+++ export.c Tue Jun 17 14:31:01 2003
@@ -398,23 +398,23 @@
   /* Store only the magic three properties. */
   if (strcmp (name, SVN_PROP_EOL_STYLE) == 0)
- fb->eol_style_val = svn_string_dup (value, pool);
+ fb->eol_style_val = svn_string_dup (value, fb->pool);
   else if (strcmp (name, SVN_PROP_KEYWORDS) == 0)
- fb->keywords_val = svn_string_dup (value, pool);
+ fb->keywords_val = svn_string_dup (value, fb->pool);
   else if (strcmp (name, SVN_PROP_EXECUTABLE) == 0)
- fb->executable_val = svn_string_dup (value, pool);
+ fb->executable_val = svn_string_dup (value, fb->pool);
   /* Try to fill out the baton's keywords-structure too. */
   else if (strcmp (name, SVN_PROP_ENTRY_COMMITTED_REV) == 0)
- fb->revision = apr_pstrdup (pool, value->data);
+ fb->revision = apr_pstrdup (fb->pool, value->data);
   else if (strcmp (name, SVN_PROP_ENTRY_COMMITTED_DATE) == 0)
- SVN_ERR (svn_time_from_cstring (&fb->date, value->data, pool));
+ SVN_ERR (svn_time_from_cstring (&fb->date, value->data, fb->pool));
   else if (strcmp (name, SVN_PROP_ENTRY_LAST_AUTHOR) == 0)
- fb->author = apr_pstrdup (pool, value->data);
+ fb->author = apr_pstrdup (fb->pool, value->data);
   return SVN_NO_ERROR;

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 17 08:51:34 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.