subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1411233 - /subversion/trunk/subversion/svnrdump/dump_editor.c
Date Mon, 19 Nov 2012 15:07:34 GMT
Author: rhuijben
Date: Mon Nov 19 15:07:34 2012
New Revision: 1411233

URL: http://svn.apache.org/viewvc?rev=1411233&view=rev
Log:
In svnrdump: move the file checksum to the file baton.

* subversion/svnrdump/dump_editor.c
  (file_baton): Add variable.
  (dump_edit_baton): Remove variable.

  (apply_textdelta,
   close_file): Update users.

Modified:
    subversion/trunk/subversion/svnrdump/dump_editor.c

Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1411233&r1=1411232&r2=1411233&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Mon Nov 19 15:07:34 2012
@@ -78,6 +78,9 @@ struct file_baton
 {
   struct dump_edit_baton *eb;
   struct dir_baton *parent_dir_baton;
+
+  /* The checksum of the file the delta is being applied to */
+  const char *base_checksum;
 };
 
 /* A handler baton to be used in window_handler().  */
@@ -116,9 +119,6 @@ struct dump_edit_baton {
   const char *delta_abspath;
   apr_file_t *delta_file;
 
-  /* The checksum of the file the delta is being applied to */
-  const char *base_checksum;
-
   /* Flags to trigger dumping props and text */
   svn_boolean_t dump_text;
   svn_boolean_t dump_props;
@@ -777,7 +777,7 @@ apply_textdelta(void *file_baton, const 
                           SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 
   eb->dump_text = TRUE;
-  eb->base_checksum = apr_pstrdup(eb->pool, base_checksum);
+  fb->base_checksum = apr_pstrdup(eb->pool, base_checksum);
 
   /* The actual writing takes place when this function has
      finished. Set handler and handler_baton now so for
@@ -819,12 +819,12 @@ close_file(void *file_baton,
       if (err)
         SVN_ERR(svn_error_wrap_apr(err, NULL));
 
-      if (eb->base_checksum)
+      if (fb->base_checksum)
         /* Text-delta-base-md5: */
         SVN_ERR(svn_stream_printf(eb->stream, pool,
                                   SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
                                   ": %s\n",
-                                  eb->base_checksum));
+                                  fb->base_checksum));
 
       /* Text-content-length: 39 */
       SVN_ERR(svn_stream_printf(eb->stream, pool,



Mime
View raw message