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/08/06 13:05:58 UTC
svn commit: r982929 - /subversion/trunk/subversion/svnrdump/load_editor.c
Author: artagnon
Date: Fri Aug 6 11:05:58 2010
New Revision: 982929
URL: http://svn.apache.org/viewvc?rev=982929&view=rev
Log:
* subversion/svnrdump/load_editor.c
(apply_textdelta, close_node): Move the call to close_file from
apply_textdelta to close_node, relying on the fact that
apply_textdelta will always be called after a file is opened or
added.
Modified:
subversion/trunk/subversion/svnrdump/load_editor.c
Modified: subversion/trunk/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=982929&r1=982928&r2=982929&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Fri Aug 6 11:05:58 2010
@@ -383,13 +383,13 @@ apply_textdelta(svn_txdelta_window_handl
struct node_baton *nb;
const struct svn_delta_editor_t *commit_editor;
apr_pool_t *pool;
+
nb = node_baton;
commit_editor = nb->rb->pb->commit_editor;
pool = nb->rb->pool;
SVN_ERR(commit_editor->apply_textdelta(nb->file_baton, NULL /* base_checksum */,
pool, handler, handler_baton));
- SVN_ERR(commit_editor->close_file(nb->file_baton, NULL, pool));
- LDR_DBG(("Closing file %p\n", nb->file_baton));
+ LDR_DBG(("Applying textdelta to %p\n", nb->file_baton));
return SVN_NO_ERROR;
}
@@ -397,7 +397,20 @@ apply_textdelta(svn_txdelta_window_handl
static svn_error_t *
close_node(void *baton)
{
- /* Nothing to do */
+ struct node_baton *nb;
+ const struct svn_delta_editor_t *commit_editor;
+
+ nb = baton;
+ commit_editor = nb->rb->pb->commit_editor;
+
+ if (nb->kind == svn_node_file)
+ {
+ SVN_ERR(commit_editor->close_file(nb->file_baton, NULL, nb->rb->pool));
+ LDR_DBG(("Closing file %p\n", nb->file_baton));
+ }
+
+ /* The svn_node_dir case is handled in close_revision */
+
return SVN_NO_ERROR;
}
Re: svn commit: r982929 -
/subversion/trunk/subversion/svnrdump/load_editor.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
artagnon@apache.org wrote on Fri, Aug 06, 2010 at 11:05:58 -0000:
> Author: artagnon
> Date: Fri Aug 6 11:05:58 2010
> New Revision: 982929
>
> URL: http://svn.apache.org/viewvc?rev=982929&view=rev
> Log:
> * subversion/svnrdump/load_editor.c
> (apply_textdelta, close_node): Move the call to close_file from
> apply_textdelta to close_node, relying on the fact that
> apply_textdelta will always be called after a file is opened or
> added.
Is that fact true for revisions that have propchanges but no textual changes?
And for empty revisions? (that contain neither propchanges nor textual
changes; we could create them via bugs at least)
Re: svn commit: r982929 -
/subversion/trunk/subversion/svnrdump/load_editor.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
artagnon@apache.org wrote on Fri, Aug 06, 2010 at 11:05:58 -0000:
> Author: artagnon
> Date: Fri Aug 6 11:05:58 2010
> New Revision: 982929
>
> URL: http://svn.apache.org/viewvc?rev=982929&view=rev
> Log:
> * subversion/svnrdump/load_editor.c
> (apply_textdelta, close_node): Move the call to close_file from
> apply_textdelta to close_node, relying on the fact that
> apply_textdelta will always be called after a file is opened or
> added.
Is that fact true for revisions that have propchanges but no textual changes?
And for empty revisions? (that contain neither propchanges nor textual
changes; we could create them via bugs at least)