You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2010/07/23 13:56:49 UTC

svn commit: r967056 - in /subversion/trunk/subversion/svnrdump: dump_editor.c svnrdump.c

Author: artagnon
Date: Fri Jul 23 11:56:49 2010
New Revision: 967056

URL: http://svn.apache.org/viewvc?rev=967056&view=rev
Log:
subversion/svnrdump: Fix dump to match the newlines in the dump
produced by `svnadmin dump`. Functions touched:
* subversion/svnrdump/svnrdump.c (replay_revstart, replay_range)
* subversion/svnrdump/dump_editor.c (dump_props)

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

Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=967056&r1=967055&r2=967056&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Fri Jul 23 11:56:49 2010
@@ -157,6 +157,10 @@ dump_props(struct dump_edit_baton *eb,
       SVN_ERR(svn_stream_write(eb->stream, eb->propstring->data,
                                &(eb->propstring->len)));
 
+      /* No text is going to be dumped. Write a couple of newlines and
+         wait for the next node/ revision. */
+      SVN_ERR(svn_stream_printf(eb->stream, pool, "\n\n"));
+
       /* Cleanup so that data is never dumped twice. */
       svn_hash__clear(eb->props, pool);
       svn_hash__clear(eb->deleted_props, pool);

Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=967056&r1=967055&r2=967056&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Fri Jul 23 11:56:49 2010
@@ -86,7 +86,6 @@ replay_revstart(svn_revnum_t revision,
                 apr_pool_t *pool)
 {
   struct replay_baton *rb = replay_baton;
-  /* First, dump the revision properties. */
   svn_stringbuf_t *propstring;
   svn_stream_t *stdout_stream;
   svn_stream_t *revprop_stream;
@@ -116,6 +115,7 @@ replay_revstart(svn_revnum_t revision,
   SVN_ERR(svn_stream_write(stdout_stream, propstring->data,
                            &(propstring->len)));
 
+  SVN_ERR(svn_stream_printf(stdout_stream, pool, "\n"));
   svn_stream_close(stdout_stream);
 
   /* Extract editor and editor_baton from the replay_baton and
@@ -252,6 +252,7 @@ replay_range(svn_ra_session_t *session, 
       /* The properties */
       SVN_ERR(svn_stream_write(stdout_stream, propstring->data,
                                &(propstring->len)));
+      SVN_ERR(svn_stream_printf(stdout_stream, pool, "\n"));
       if (! quiet)
         svn_cmdline_fprintf(stderr, pool, "* Dumped revision %lu\n", start_revision);