Checkout
Greg Stein
committed
on 19 Sep 11
Pass a file's new contents when it is first added. There is no reason to
require a separate set_text() call.

Adjust some assertions in the … Show more
Pass a file's new contents when it is first added. There is no reason to

require a separate set_text() call.

Adjust some assertions in the editor, based on the above.

* subversion/include/svn_editor.h:

 (): adjust module docs to remove the need for set_text() after add_file().

 (svn_editor_cb_add_file_t): add CHECKSUM and CONTENTS params.

 (svn_editor_add_file): add CHECKSUM and CONTENTS params.

* subversion/libsvn_delta/compat.c:

 (add_directory_cb): add CHECKSUM and CONTENTS params

* subversion/libsvn_delta/editor.c:

 (svn_editor_t): remove the NEEDS_TEXT member

 (svn_editor_create): do not initialize NEEDS_TEXT member

 (svn_editor_add_directory): mark the directory as completed

 (svn_editor_add_file): add CHECKSUM and CONTENTS params. pass them to

   the callback. mark the file as completed, and skip the NEEDS_TEXT hash

   setting.

 (svn_editor_add_symlink): mark the symlink as completed

 (svn_editor_add_absent): mark the absent node as completed

 (svn_editor_set_text): no longer update the NEEDS_TEXT member

 (svn_editor_move): ensure the source node has not been altered before.

   do not mark the source as completed since a new node may be added.

   also skip marking the destination since a set_props, set_text, or

   set_target may arrive.

 (svn_editor_complete, svn_editor_abort): make sure the editor has not

   been marked as finish (avoid double calls)

Show less