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

Re: CVS update: subversion/subversion/tests/libsvn_delta xml-output-test.c

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2001-02-14 21:32:59 CET

Whoo hoo!

And this week's "Cleaning the Augean Stables" Award goes to...
C. Michael Pilato. :-)

Thanks, Mike.

-K

cmpilato@tigris.org writes:
> Log:
> SWEEPING CHANGE: Updated editor composition functions to make use of
> the new interface described in the following file(s):
>
> * include/svn_delta.h
>
> Herein lies interface changes that have been debated, debated, and
> debated again. The gist of the final (?) outcome of the debates is
> as follows:
>
> (svn_delta_edit_fns_t->set_target_revision): New function to handle
> setting of global target revision for the current edit operation.
>
> (svn_delta_edit_fns_t->begin_edit): Re-re-named to "replace_root()".
> See below for further changes.
>
> (svn_delta_edit_fns_t->replace_file, replace_directory,
> replace_root): These now take only a base_revision instead of both a
> target_revision and base_revision (or ancestor_revision).
>
> (svn_delta_edit_fns_t->add_file, add_directory): Renamed
> ancestor_revision and ancestor_path to base_revision and base_path
> respectively.
>
> The following file(s) were lined up and shot with this sweeping change:
>
> * client/trace-commit.c
> * client/trace-update.c
> * libsvn_delta/compose_editors.c
> * libsvn_delta/default_editor.c
> * libsvn_ra_dav/commit.c
> * libsvn_wc/adm_crawler.c
> * libsvn_wc/get_editor.c
> * tests/svn_test_editor.c
> * tests/libsvn_delta/xml-output-test.c
>
> In addition to the sweeping change above, the following file(s) were
> modified as described below:
>
> * libsvn_delta/xml_parse.c
> * libsvn_delta/xml_output.c
>
> Now using the "base-rev" attributes instead of "ver", "base-path"
> instead of "ancestor", and the delta-pkg tag can now have a
> "target-rev" attribute.
>
> Here are other files changed as a result of this group of edits, but
> did not really suffer a "sweeping change.":
>
> * include/libsvn_types.c
>
> (SVN_IGNORED_REVNUM): Re-define'ing this to be the same value as
> SVN_INVALID_REVNUM until which time someone can verify that all
> checks of a revision number against SVN_INVALID_REVNUM are a) still
> valid or b) changed to use the SVN_IS_VALID_REVNUM() macro.
>
> * libsvn_delta/delta.h
>
> (svn_xml__digger_t): Added target_revision.
>
> * libsvn_ra_dav/fetch.c
>
> (svn_ra_dav__do_checkout): This is the checkout case, so pass
> SVN_IGNORED_REVNUM to the editor's replace_root() function.
>
> MIKE'S NOTEZ: While these changes do compile, and "make check" does
> run without error, there are some obviously erraneous results from
> these changes. I am attacking these problems immediately after
> checking this stuff in, but other works in progress depend on these
> interfaces changes.
>
> Revision Changes Path
> 1.8 +2 -4 subversion/subversion/client/trace-commit.c
>
> Index: trace-commit.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/client/trace-commit.c,v
> retrieving revision 1.7
> retrieving revision 1.8
> diff -u -r1.7 -r1.8
> --- trace-commit.c 2001/02/06 00:45:51 1.7
> +++ trace-commit.c 2001/02/14 21:31:04 1.8
> @@ -53,7 +53,7 @@
>
>
> static svn_error_t *
> -begin_edit (void *edit_baton, void **root_baton)
> +replace_root (void *edit_baton, svn_revnum_t base_revision, void **root_baton)
> {
> struct edit_baton *eb = edit_baton;
> struct dir_baton *rb = apr_pcalloc (eb->pool, sizeof (*rb));
> @@ -108,7 +108,6 @@
> static svn_error_t *
> replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> long int ancestor_revision,
> void **child_baton)
> {
> @@ -212,7 +211,6 @@
> static svn_error_t *
> replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> long int ancestor_revision,
> void **file_baton)
> {
> @@ -273,7 +271,7 @@
> eb->initial_path = svn_string_dup (initial_path, eb->pool);
>
> /* Set up the editor. */
> - trace_editor->begin_edit = begin_edit;
> + trace_editor->replace_root = replace_root;
> trace_editor->delete_entry = delete_entry;
> trace_editor->add_directory = add_directory;
> trace_editor->replace_directory = replace_directory;
>
>
>
> 1.23 +2 -4 subversion/subversion/client/trace-update.c
>
> Index: trace-update.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/client/trace-update.c,v
> retrieving revision 1.22
> retrieving revision 1.23
> diff -u -r1.22 -r1.23
> --- trace-update.c 2001/02/06 00:45:51 1.22
> +++ trace-update.c 2001/02/14 21:31:04 1.23
> @@ -53,7 +53,7 @@
>
>
> static svn_error_t *
> -begin_edit (void *edit_baton, void **root_baton)
> +replace_root (void *edit_baton, svn_revnum_t base_revision, void **root_baton)
> {
> struct edit_baton *eb = edit_baton;
> struct dir_baton *rb = apr_pcalloc (eb->pool, sizeof (*rb));
> @@ -108,7 +108,6 @@
> static svn_error_t *
> replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> long int ancestor_revision,
> void **child_baton)
> {
> @@ -294,7 +293,6 @@
> static svn_error_t *
> replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> long int ancestor_revision,
> void **file_baton)
> {
> @@ -353,7 +351,7 @@
> eb->initial_path = svn_string_dup (initial_path, eb->pool);
>
> /* Set up the editor. */
> - trace_editor->begin_edit = begin_edit;
> + trace_editor->replace_root = replace_root;
> trace_editor->delete_entry = delete_entry;
> trace_editor->add_directory = add_directory;
> trace_editor->replace_directory = replace_directory;
>
>
>
> 1.139 +13 -11 subversion/subversion/include/svn_delta.h
>
> Index: svn_delta.h
> ===================================================================
> RCS file: /cvs/subversion/subversion/include/svn_delta.h,v
> retrieving revision 1.138
> retrieving revision 1.139
> diff -u -r1.138 -r1.139
> --- svn_delta.h 2001/02/06 00:46:00 1.138
> +++ svn_delta.h 2001/02/14 21:31:04 1.139
> @@ -270,7 +270,6 @@
> callback function describes a piece of the delta --- a file's
> contents changing, something being renamed, etc. */
>
> -
> /* A structure full of callback functions the delta source will invoke
> as it produces the delta. */
> typedef struct svn_delta_edit_fns_t
> @@ -389,14 +388,19 @@
> directory within the <directory> element. However, it does allow
> text deltas to appear at the end. */
>
> + /* Set the target revision for this edit to TARGET_REVISION. This
> + call, if used, should precede all other editor calls. */
> + svn_error_t *(*set_target_revision) (void *edit_baton,
> + svn_revnum_t target_revision);
>
> /* Set *ROOT_BATON to a baton for the top directory of the change.
> (This is the top of the subtree being changed, not necessarily
> the root of the filesystem.) Like any other directory baton, the
> producer should call `close_directory' on ROOT_BATON when they're
> done. */
> - svn_error_t *(*begin_edit) (void *edit_baton,
> - void **root_baton);
> + svn_error_t *(*replace_root) (void *edit_baton,
> + svn_revnum_t base_revision,
> + void **root_baton);
>
>
> /* Deleting things. */
> @@ -424,8 +428,8 @@
> directory. */
> svn_error_t *(*add_directory) (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_string_t *base_path,
> + svn_revnum_t base_revision,
> void **child_baton);
>
> /* We are going to change the directory entry named NAME to a
> @@ -436,8 +440,7 @@
> relative to an empty directory. */
> svn_error_t *(*replace_directory) (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_revnum_t base_revision,
> void **child_baton);
>
> /* Change the value of a directory's property.
> @@ -464,8 +467,8 @@
> apply_propdelta. */
> svn_error_t *(*add_file) (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_string_t *base_path,
> + svn_revnum_t base_revision,
> void **file_baton);
>
> /* We are going to change the directory entry named NAME to a file.
> @@ -474,8 +477,7 @@
> apply_textdelta and/or apply_propdelta. */
> svn_error_t *(*replace_file) (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_revnum_t base_revision,
> void **file_baton);
>
> /* Apply a text delta, yielding the new revision of a file.
>
>
>
> 1.57 +5 -2 subversion/subversion/include/svn_types.h
>
> Index: svn_types.h
> ===================================================================
> RCS file: /cvs/subversion/subversion/include/svn_types.h,v
> retrieving revision 1.56
> retrieving revision 1.57
> diff -u -r1.56 -r1.57
> --- svn_types.h 2001/02/12 19:21:10 1.56
> +++ svn_types.h 2001/02/14 21:31:05 1.57
> @@ -61,8 +61,11 @@
> /* Valid revision numbers begin at 0 */
> #define SVN_IS_VALID_REVNUM(n) (n >= 0)
> #define SVN_INVALID_REVNUM (-1) /* The 'official' invalid revision num */
> -#define SVN_IGNORED_REVNUM (-2) /* Not really invalid...just
> - unimportant */
> +#define SVN_IGNORED_REVNUM (-1) /* Not really invalid...just
> + unimportant -- one day, this can be
> + its own unique value, for now, just
> + make it the same as
> + SVN_INVALID_REVNUM. */
>
> /* YABT: Yet Another Boolean Type */
> typedef int svn_boolean_t;
>
>
>
> 1.12 +50 -28 subversion/subversion/libsvn_delta/compose_editors.c
>
> Index: compose_editors.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_delta/compose_editors.c,v
> retrieving revision 1.11
> retrieving revision 1.12
> diff -u -r1.11 -r1.12
> --- compose_editors.c 2001/02/07 00:00:45 1.11
> +++ compose_editors.c 2001/02/14 21:31:05 1.12
> @@ -47,26 +47,55 @@
>
>
> static svn_error_t *
> -begin_edit (void *edit_baton, void **root_baton)
> +set_target_revision (void *edit_baton, svn_revnum_t target_revision)
> {
> struct edit_baton *eb = edit_baton;
> svn_error_t *err;
> +
> + if (eb->editor_1->set_target_revision)
> + {
> + err = (* (eb->editor_1->set_target_revision)) (eb->edit_baton_1,
> + target_revision);
> + if (err)
> + return err;
> + }
> +
> + if (eb->editor_2->set_target_revision)
> + {
> + err = (* (eb->editor_2->set_target_revision)) (eb->edit_baton_2,
> + target_revision);
> + if (err)
> + return err;
> + }
> +
> + return SVN_NO_ERROR;
> +}
> +
> +
> +static svn_error_t *
> +replace_root (void *edit_baton, svn_revnum_t base_revision,
> + void **root_baton)
> +{
> + struct edit_baton *eb = edit_baton;
> + svn_error_t *err;
> struct dir_baton *d = apr_pcalloc (eb->pool, sizeof (*d));
>
> d->edit_baton = eb;
> d->parent_dir_baton = NULL;
>
> - if (eb->editor_1->begin_edit)
> + if (eb->editor_1->replace_root)
> {
> - err = (* (eb->editor_1->begin_edit)) (eb->edit_baton_1,
> + err = (* (eb->editor_1->replace_root)) (eb->edit_baton_1,
> + base_revision,
> &(d->dir_baton_1));
> if (err)
> return err;
> }
>
> - if (eb->editor_2->begin_edit)
> + if (eb->editor_2->replace_root)
> {
> - err = (* (eb->editor_2->begin_edit)) (eb->edit_baton_2,
> + err = (* (eb->editor_2->replace_root)) (eb->edit_baton_2,
> + base_revision,
> &(d->dir_baton_2));
> if (err)
> return err;
> @@ -105,8 +134,8 @@
> static svn_error_t *
> add_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **child_baton)
> {
> struct dir_baton *d = parent_baton;
> @@ -119,7 +148,7 @@
> if (d->edit_baton->editor_1->add_directory)
> {
> err = (* (d->edit_baton->editor_1->add_directory))
> - (name, d->dir_baton_1, ancestor_path, ancestor_revision,
> + (name, d->dir_baton_1, base_path, base_revision,
> &(child->dir_baton_1));
> if (err)
> return err;
> @@ -128,7 +157,7 @@
> if (d->edit_baton->editor_2->add_directory)
> {
> err = (* (d->edit_baton->editor_2->add_directory))
> - (name, d->dir_baton_2, ancestor_path, ancestor_revision,
> + (name, d->dir_baton_2, base_path, base_revision,
> &(child->dir_baton_2));
> if (err)
> return err;
> @@ -143,8 +172,7 @@
> static svn_error_t *
> replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + long int base_revision,
> void **child_baton)
> {
> struct dir_baton *d = parent_baton;
> @@ -157,8 +185,7 @@
> if (d->edit_baton->editor_1->replace_directory)
> {
> err = (* (d->edit_baton->editor_1->replace_directory))
> - (name, d->dir_baton_1, ancestor_path, ancestor_revision,
> - &(child->dir_baton_1));
> + (name, d->dir_baton_1, base_revision, &(child->dir_baton_1));
> if (err)
> return err;
> }
> @@ -166,8 +193,7 @@
> if (d->edit_baton->editor_2->replace_directory)
> {
> err = (* (d->edit_baton->editor_2->replace_directory))
> - (name, d->dir_baton_2, ancestor_path, ancestor_revision,
> - &(child->dir_baton_2));
> + (name, d->dir_baton_2, base_revision, &(child->dir_baton_2));
> if (err)
> return err;
> }
> @@ -324,8 +350,8 @@
> static svn_error_t *
> add_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **file_baton)
> {
> struct dir_baton *d = parent_baton;
> @@ -337,8 +363,7 @@
> if (d->edit_baton->editor_1->add_file)
> {
> err = (* (d->edit_baton->editor_1->add_file))
> - (name, d->dir_baton_1, ancestor_path, ancestor_revision,
> - &(fb->file_baton_1));
> + (name, d->dir_baton_1, base_path, base_revision, &(fb->file_baton_1));
> if (err)
> return err;
> }
> @@ -346,8 +371,7 @@
> if (d->edit_baton->editor_2->add_file)
> {
> err = (* (d->edit_baton->editor_2->add_file))
> - (name, d->dir_baton_2, ancestor_path, ancestor_revision,
> - &(fb->file_baton_2));
> + (name, d->dir_baton_2, base_path, base_revision, &(fb->file_baton_2));
> if (err)
> return err;
> }
> @@ -360,8 +384,7 @@
> static svn_error_t *
> replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + long int base_revision,
> void **file_baton)
> {
> struct dir_baton *d = parent_baton;
> @@ -373,8 +396,7 @@
> if (d->edit_baton->editor_1->replace_file)
> {
> err = (* (d->edit_baton->editor_1->replace_file))
> - (name, d->dir_baton_1, ancestor_path, ancestor_revision,
> - &(fb->file_baton_1));
> + (name, d->dir_baton_1, base_revision, &(fb->file_baton_1));
> if (err)
> return err;
> }
> @@ -382,8 +404,7 @@
> if (d->edit_baton->editor_2->replace_file)
> {
> err = (* (d->edit_baton->editor_2->replace_file))
> - (name, d->dir_baton_2, ancestor_path, ancestor_revision,
> - &(fb->file_baton_2));
> + (name, d->dir_baton_2, base_revision, &(fb->file_baton_2));
> if (err)
> return err;
> }
> @@ -465,7 +486,8 @@
> svn_delta_edit_fns_t *editor = svn_delta_default_editor (pool);
>
> /* Set up the editor. */
> - editor->begin_edit = begin_edit;
> + editor->set_target_revision = set_target_revision;
> + editor->replace_root = replace_root;
> editor->delete_entry = delete_entry;
> editor->add_directory = add_directory;
> editor->replace_directory = replace_directory;
>
>
>
> 1.4 +16 -10 subversion/subversion/libsvn_delta/default_editor.c
>
> Index: default_editor.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_delta/default_editor.c,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -r1.3 -r1.4
> --- default_editor.c 2001/02/07 00:00:45 1.3
> +++ default_editor.c 2001/02/14 21:31:05 1.4
> @@ -20,8 +20,15 @@
>
>
> static svn_error_t *
> -begin_edit (void *edit_baton, void **root_baton)
> +set_target_revision (void *edit_baton, svn_revnum_t target_revision)
> {
> + return SVN_NO_ERROR;
> +}
> +
> +
> +static svn_error_t *
> +replace_root (void *edit_baton, svn_revnum_t base_revision, void **root_baton)
> +{
> *root_baton = edit_baton;
> return SVN_NO_ERROR;
> }
> @@ -37,8 +44,8 @@
> static svn_error_t *
> add_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **child_baton)
> {
> *child_baton = parent_baton;
> @@ -49,8 +56,7 @@
> static svn_error_t *
> replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + long int base_revision,
> void **child_baton)
> {
> *child_baton = parent_baton;
> @@ -93,8 +99,8 @@
> static svn_error_t *
> add_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **file_baton)
> {
> *file_baton = parent_baton;
> @@ -105,8 +111,7 @@
> static svn_error_t *
> replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + long int base_revision,
> void **file_baton)
> {
> *file_baton = parent_baton;
> @@ -144,7 +149,8 @@
> implementions above, and added here. */
> static const svn_delta_edit_fns_t default_editor =
> {
> - begin_edit,
> + set_target_revision,
> + replace_root,
> delete_entry,
> add_directory,
> replace_directory,
>
>
>
> 1.52 +3 -0 subversion/subversion/libsvn_delta/delta.h
>
> Index: delta.h
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_delta/delta.h,v
> retrieving revision 1.51
> retrieving revision 1.52
> diff -u -r1.51 -r1.52
> --- delta.h 2001/02/09 23:14:19 1.51
> +++ delta.h 2001/02/14 21:31:05 1.52
> @@ -205,6 +205,9 @@
> svn_string_t *base_path;
> svn_revnum_t base_revision;
>
> + /* The target revision for this editor instance */
> + svn_revnum_t target_revision;
> +
> /* Userdata structures that we need to keep track of while we parse,
> given to us by either the SVN filesystem or the SVN client */
> void *edit_baton; /* (global data from our caller) */
>
>
>
> 1.32 +62 -28 subversion/subversion/libsvn_delta/xml_output.c
>
> Index: xml_output.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_delta/xml_output.c,v
> retrieving revision 1.31
> retrieving revision 1.32
> diff -u -r1.31 -r1.32
> --- xml_output.c 2001/02/09 23:14:19 1.31
> +++ xml_output.c 2001/02/14 21:31:05 1.32
> @@ -63,6 +63,7 @@
> elem_tree_delta, elem_file, or
> elem_file_prop_delta. */
> struct file_baton *curfile;
> + svn_revnum_t target_revision;
> apr_pool_t *pool;
> int txdelta_id_counter;
> };
> @@ -229,7 +230,7 @@
> static svn_error_t *
> output_addreplace (struct edit_baton *eb, enum elemtype addreplace,
> enum elemtype dirfile, svn_string_t *name,
> - svn_string_t *ancestor_path, svn_revnum_t ancestor_revision)
> + svn_string_t *base_path, svn_revnum_t base_revision)
> {
> svn_string_t *str;
> apr_pool_t *pool = svn_pool_create (eb->pool);
> @@ -240,22 +241,25 @@
> SVN_DELTA__XML_TAG_ADD : SVN_DELTA__XML_TAG_REPLACE;
> const char *innertag = (dirfile == elem_dir) ?
> SVN_DELTA__XML_TAG_DIR : SVN_DELTA__XML_TAG_FILE;
> + char buf[128];
>
> str = get_to_elem (eb, elem_tree_delta, pool);
> svn_xml_make_open_tag (&str, pool, svn_xml_normal, outertag,
> SVN_DELTA__XML_ATTR_NAME, name, NULL);
>
> att = apr_hash_make (pool);
> - if (ancestor_path != NULL)
> - {
> - char buf[128];
> - apr_hash_set (att, SVN_DELTA__XML_ATTR_ANCESTOR,
> - strlen(SVN_DELTA__XML_ATTR_ANCESTOR), ancestor_path);
> - sprintf (buf, "%lu", (unsigned long) ancestor_revision);
> - apr_hash_set (att, SVN_DELTA__XML_ATTR_VER,
> - strlen(SVN_DELTA__XML_ATTR_VER),
> - svn_string_create (buf, pool));
> - }
> + if (base_path != NULL)
> + {
> + apr_hash_set (att, SVN_DELTA__XML_ATTR_BASE_PATH,
> + strlen(SVN_DELTA__XML_ATTR_BASE_PATH), base_path);
> + }
> + if (SVN_IS_VALID_REVNUM(base_revision))
> + {
> + sprintf (buf, "%lu", (unsigned long) base_revision);
> + apr_hash_set (att, SVN_DELTA__XML_ATTR_BASE_REV,
> + strlen(SVN_DELTA__XML_ATTR_BASE_REV),
> + svn_string_create (buf, pool));
> + }
> svn_xml_make_open_tag_hash (&str, pool, svn_xml_normal, innertag, att);
>
> eb->elem = dirfile;
> @@ -301,18 +305,48 @@
>
>
> static svn_error_t *
> -begin_edit (void *edit_baton,
> - void **dir_baton)
> +set_target_revision (void *edit_baton, svn_revnum_t target_revision)
> {
> struct edit_baton *eb = (struct edit_baton *) edit_baton;
> +
> + /* Stick that target revision in the edit baton to be used when
> + we call replace_root() */
> + eb->target_revision = target_revision;
> + return SVN_NO_ERROR;
> +}
> +
> +
> +static svn_error_t *
> +replace_root (void *edit_baton, svn_revnum_t base_revision, void **dir_baton)
> +{
> + struct edit_baton *eb = (struct edit_baton *) edit_baton;
> apr_pool_t *pool = svn_pool_create (eb->pool);
> svn_string_t *str = NULL;
> apr_size_t len;
> + apr_hash_t *att;
> svn_error_t *err;
> + char buf[128];
>
> svn_xml_make_header (&str, pool);
> - svn_xml_make_open_tag (&str, pool, svn_xml_normal,
> - SVN_DELTA__XML_TAG_DELTA_PKG, NULL);
> +
> + att = apr_hash_make (pool);
> + if (SVN_IS_VALID_REVNUM(base_revision))
> + {
> + sprintf (buf, "%lu", (unsigned long) base_revision);
> + apr_hash_set (att, SVN_DELTA__XML_ATTR_BASE_REV,
> + strlen(SVN_DELTA__XML_ATTR_BASE_REV),
> + svn_string_create (buf, pool));
> + }
> + if (SVN_IS_VALID_REVNUM(eb->target_revision))
> + {
> + sprintf (buf, "%lu", (unsigned long) eb->target_revision);
> + apr_hash_set (att, SVN_DELTA__XML_ATTR_TARGET_REV,
> + strlen(SVN_DELTA__XML_ATTR_TARGET_REV),
> + svn_string_create (buf, pool));
> + }
> +
> + svn_xml_make_open_tag_hash (&str, pool, svn_xml_normal,
> + SVN_DELTA__XML_TAG_DELTA_PKG, att);
>
> *dir_baton = make_dir_baton (eb, elem_delta_pkg);
> eb->elem = elem_dir;
> @@ -349,8 +383,8 @@
> static svn_error_t *
> add_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_string_t *base_path,
> + svn_revnum_t base_revision,
> void **child_baton)
> {
> struct dir_baton *db = (struct dir_baton *) parent_baton;
> @@ -358,15 +392,14 @@
>
> *child_baton = make_dir_baton (eb, elem_add);
> return output_addreplace (eb, elem_add, elem_dir, name,
> - ancestor_path, ancestor_revision);
> + base_path, base_revision);
> }
>
>
> static svn_error_t *
> replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_revnum_t base_revision,
> void **child_baton)
> {
> struct dir_baton *db = (struct dir_baton *) parent_baton;
> @@ -374,7 +407,7 @@
>
> *child_baton = make_dir_baton (eb, elem_replace);
> return output_addreplace (eb, elem_replace, elem_dir, name,
> - ancestor_path, ancestor_revision);
> + NULL, base_revision);
> }
>
>
> @@ -422,15 +455,15 @@
> static svn_error_t *
> add_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_string_t *base_path,
> + svn_revnum_t base_revision,
> void **file_baton)
> {
> struct dir_baton *db = (struct dir_baton *) parent_baton;
> struct edit_baton *eb = db->edit_baton;
>
> SVN_ERR(output_addreplace (eb, elem_add, elem_file, name,
> - ancestor_path, ancestor_revision));
> + base_path, base_revision));
> *file_baton = make_file_baton (eb, elem_add);
> eb->curfile = *file_baton;
> return SVN_NO_ERROR;
> @@ -440,15 +473,14 @@
> static svn_error_t *
> replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_revnum_t base_revision,
> void **file_baton)
> {
> struct dir_baton *db = (struct dir_baton *) parent_baton;
> struct edit_baton *eb = db->edit_baton;
>
> SVN_ERR(output_addreplace (eb, elem_replace, elem_file, name,
> - ancestor_path, ancestor_revision));
> + NULL, base_revision));
> *file_baton = make_file_baton (eb, elem_replace);
> eb->curfile = *file_baton;
> return SVN_NO_ERROR;
> @@ -605,7 +637,8 @@
>
> static const svn_delta_edit_fns_t tree_editor =
> {
> - begin_edit,
> + set_target_revision,
> + replace_root,
> delete_entry,
> add_directory,
> replace_directory,
> @@ -635,6 +668,7 @@
> eb->output = output;
> eb->curfile = NULL;
> eb->txdelta_id_counter = 1;
> + eb->target_revision = SVN_INVALID_REVNUM;
>
> *edit_baton = eb;
>
>
>
>
> 1.146 +23 -12 subversion/subversion/libsvn_delta/xml_parse.c
>
> Index: xml_parse.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_delta/xml_parse.c,v
> retrieving revision 1.145
> retrieving revision 1.146
> diff -u -r1.145 -r1.146
> --- xml_parse.c 2001/02/09 23:14:19 1.145
> +++ xml_parse.c 2001/02/14 21:31:05 1.146
> @@ -452,10 +452,10 @@
>
> /* Search through ATTS, looking for any "ancestor" or "ver"
> attributes of the current <dir> tag. */
> - ancestor = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_ANCESTOR, atts);
> + ancestor = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_BASE_PATH, atts);
> if (ancestor)
> youngest_frame->ancestor_path = svn_string_create (ancestor, digger->pool);
> - ver = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_VER, atts);
> + ver = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_BASE_REV, atts);
> if (ver)
> youngest_frame->ancestor_revision = atoi (ver);
>
> @@ -464,7 +464,6 @@
> err = digger->editor->replace_directory
> (dir_name,
> youngest_frame->baton,
> - youngest_frame->ancestor_path,
> youngest_frame->ancestor_revision,
> &(youngest_frame->baton));
> else
> @@ -546,10 +545,10 @@
>
> /* Search through ATTS, looking for any "ancestor" or "ver"
> attributes of the current <dir> tag. */
> - ancestor = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_ANCESTOR, atts);
> + ancestor = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_BASE_PATH, atts);
> if (ancestor)
> youngest_frame->ancestor_path = svn_string_create (ancestor, digger->pool);
> - ver = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_VER, atts);
> + ver = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_BASE_REV, atts);
> if (ver)
> youngest_frame->ancestor_revision = atoi (ver);
>
> @@ -558,7 +557,6 @@
> err = digger->editor->replace_file
> (filename,
> youngest_frame->baton,
> - youngest_frame->ancestor_path,
> youngest_frame->ancestor_revision,
> &(youngest_frame->file_baton));
> else
> @@ -575,7 +573,6 @@
> /* Store FILE_BATON in the digger, too, for safekeeping. */
> digger->file_baton = youngest_frame->file_baton;
>
> -
> return SVN_NO_ERROR;
> }
>
> @@ -978,12 +975,12 @@
> new_frame->name = svn_string_create (value, my_digger->pool);
>
> /* Set ancestor path in frame, if there's any such attribute in ATTS */
> - value = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_ANCESTOR, atts);
> + value = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_BASE_PATH, atts);
> if (value)
> new_frame->ancestor_path = svn_string_create (value, my_digger->pool);
>
> /* Set ancestor revision in frame, if there's any such attribute in ATTS */
> - value = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_VER, atts);
> + value = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_BASE_REV, atts);
> if (value)
> new_frame->ancestor_revision = atoi (value);
>
> @@ -1003,6 +1000,19 @@
> {
> new_frame->ancestor_path = my_digger->base_path;
> new_frame->ancestor_revision = my_digger->base_revision;
> +
> + /* Set target revision, if there's any such attribute in ATTS */
> + value = svn_xml_get_attr_value (SVN_DELTA__XML_ATTR_TARGET_REV,
> + atts);
> + if (value)
> + my_digger->target_revision = atoi (value);
> +
> + /* Set the global target revision by calling into the editor */
> + if (my_digger->editor->set_target_revision)
> + {
> + err = my_digger->editor->set_target_revision
> + (my_digger->edit_baton, my_digger->target_revision);
> + }
> }
>
> /* If this frame represents a new tree-delta, we need to fill in its
> @@ -1017,12 +1027,13 @@
> if (my_digger->stack->tag == svn_delta__XML_deltapkg)
> {
> /* Fetch the rootdir_baton by calling into the editor */
> - if (my_digger->editor->begin_edit)
> + if (my_digger->editor->replace_root)
> {
> void *rootdir_baton;
>
> - err = my_digger->editor->begin_edit
> - (my_digger->edit_baton, &rootdir_baton);
> + err = my_digger->editor->replace_root
> + (my_digger->edit_baton, new_frame->ancestor_revision,
> + &rootdir_baton);
> if (err)
> svn_xml_signal_bailout (err, my_digger->svn_parser);
>
>
>
>
> 1.32 +3 -4 subversion/subversion/libsvn_ra_dav/commit.c
>
> Index: commit.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_ra_dav/commit.c,v
> retrieving revision 1.31
> retrieving revision 1.32
> diff -u -r1.31 -r1.32
> --- commit.c 2001/02/09 00:48:44 1.31
> +++ commit.c 2001/02/14 21:31:05 1.32
> @@ -305,7 +305,8 @@
> }
>
> static svn_error_t *
> -commit_begin_edit (void *edit_baton, void **root_baton)
> +commit_replace_root (void *edit_baton, svn_revnum_t base_revision,
> + void **root_baton)
> {
> commit_ctx_t *cc = edit_baton;
> dir_baton_t *root = apr_pcalloc(cc->ras->pool, sizeof(*root));
> @@ -399,7 +400,6 @@
> static svn_error_t *
> commit_rep_dir (svn_string_t *name,
> void *parent_baton,
> - /* BOGUS: */ svn_string_t *ancestor_path,
> svn_revnum_t ancestor_revision,
> void **child_baton)
> {
> @@ -500,7 +500,6 @@
> static svn_error_t *
> commit_rep_file (svn_string_t *name,
> void *parent_baton,
> - /* BOGUS: */ svn_string_t *ancestor_path,
> svn_revnum_t ancestor_revision,
> void **file_baton)
> {
> @@ -632,7 +631,7 @@
> ** uses these callbacks to describe all the changes in the working copy
> ** that must be committed to the server.
> */
> - commit_editor->begin_edit = commit_begin_edit;
> + commit_editor->replace_root = commit_replace_root;
> commit_editor->delete_entry = commit_delete_entry;
> commit_editor->add_directory = commit_add_dir;
> commit_editor->replace_directory = commit_rep_dir;
>
>
>
> 1.38 +3 -1 subversion/subversion/libsvn_ra_dav/fetch.c
>
> Index: fetch.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_ra_dav/fetch.c,v
> retrieving revision 1.37
> retrieving revision 1.38
> diff -u -r1.37 -r1.38
> --- fetch.c 2001/02/08 12:32:43 1.37
> +++ fetch.c 2001/02/14 21:31:05 1.38
> @@ -510,7 +510,9 @@
> resource_t *rsrc;
> resource_t **prsrc;
>
> - err = (*editor->begin_edit)(edit_baton, &root_baton);
> + /* In the checkout case, we don't really have a base revision, so
> + pass SVN_IGNORED_REVNUM. */
> + err = (*editor->replace_root)(edit_baton, SVN_IGNORED_REVNUM, &root_baton);
> if (err != SVN_NO_ERROR)
> return err;
>
>
>
>
> 1.75 +7 -7 subversion/subversion/libsvn_wc/adm_crawler.c
>
> Index: adm_crawler.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_wc/adm_crawler.c,v
> retrieving revision 1.74
> retrieving revision 1.75
> diff -u -r1.74 -r1.75
> --- adm_crawler.c 2001/02/08 12:32:44 1.74
> +++ adm_crawler.c 2001/02/14 21:31:06 1.75
> @@ -223,7 +223,9 @@
> root baton. */
> void *root_baton;
>
> - err = editor->begin_edit (edit_baton, &root_baton);
> + err = editor->replace_root (edit_baton,
> + stackptr->this_dir->revision,
> + &root_baton);
> if (err) return err;
>
> /* Store it */
> @@ -254,7 +256,6 @@
> err =
> editor->replace_directory (dirname, /* current dir */
> stackptr->previous->baton, /* parent */
> - stackptr->this_dir->ancestor,
> stackptr->this_dir->revision,
> &dir_baton);
> if (err) return err;
> @@ -698,7 +699,7 @@
> /* Is the entry marked for deletion? */
> if (current_entry->state & SVN_WC_ENTRY_DELETED)
> {
> - /* Do what's necesary to get a baton for current directory */
> + /* Do what's necessary to get a baton for current directory */
> if (! dir_baton)
> {
> err = do_dir_replaces (&dir_baton,
> @@ -871,7 +872,6 @@
> /* Replace the file's text, getting a file baton */
> err = editor->replace_file (current_entry_name,
> dir_baton, /* parent */
> - current_entry->ancestor,
> current_entry->revision,
> &(tb->editor_baton)); /* child */
> if (err) return err;
> @@ -1033,7 +1033,7 @@
>
> master_revnum = root_entry->revision;
>
> - /* Next, call begin_edit() and push as first item on stack...? */
> + /* Next, call replace_root() and push as first item on stack...? */
>
>
> /* Start the mini-crawler.
> @@ -1088,7 +1088,7 @@
> We can't simply call report_local_mods (A), followed by
> process_subdirecotry (B). Why? Because do_dir_replaces() crawls
> up the tree trying to create dir_batons, and when it reaches `A' or
> - `B', it calls begin_edit(). We can't call begin_edit() more
> + `B', it calls replace_root(). We can't call replace_root() more
> than once during the entire commit!
>
> Here's the solution:
> @@ -1102,7 +1102,7 @@
> going from `Q' down to `A'. Again, no dir_batons.
>
> 4. Start the first crawl at `A'. do_dir_replaces() will
> - automatically walk all the way up to `Q' and call begin_edit().
> + automatically walk all the way up to `Q' and call replace_root().
>
> 5. When the first crawl is done, remove all the stackframes until
> there's only the lone `Q' frame left. (This frame now contains the
>
>
>
> 1.165 +27 -16 subversion/subversion/libsvn_wc/get_editor.c
>
> Index: get_editor.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_wc/get_editor.c,v
> retrieving revision 1.164
> retrieving revision 1.165
> diff -u -r1.164 -r1.165
> --- get_editor.c 2001/02/08 12:32:44 1.164
> +++ get_editor.c 2001/02/14 21:31:06 1.165
> @@ -371,7 +371,19 @@
> /*** The callbacks we'll plug into an svn_delta_edit_fns_t structure. ***/
>
> static svn_error_t *
> -begin_edit (void *edit_baton,
> +set_target_revision (void *edit_baton, svn_revnum_t target_revision)
> +{
> + struct edit_baton *eb = edit_baton;
> +
> + /* Stashing a target_revision in the baton */
> + eb->target_revision = target_revision;
> + return SVN_NO_ERROR;
> +}
> +
> +
> +static svn_error_t *
> +replace_root (void *edit_baton,
> + svn_revnum_t base_revision, /* This is ignored in co */
> void **dir_baton)
> {
> struct edit_baton *eb = edit_baton;
> @@ -462,8 +474,8 @@
> static svn_error_t *
> add_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_string_t *base_path,
> + svn_revnum_t base_revision,
> void **child_baton)
> {
> svn_error_t *err;
> @@ -493,8 +505,8 @@
>
> err = prep_directory (this_dir_baton->path,
> this_dir_baton->edit_baton->repository,
> - ancestor_path,
> - ancestor_revision,
> + base_path,
> + base_revision,
> 1, /* force */
> this_dir_baton->pool);
> if (err)
> @@ -509,8 +521,7 @@
> static svn_error_t *
> replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_revnum_t base_revision,
> void **child_baton)
> {
> struct dir_baton *parent_dir_baton = parent_baton;
> @@ -766,24 +777,23 @@
> static svn_error_t *
> add_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_string_t *base_path,
> + svn_revnum_t base_revision,
> void **file_baton)
> {
> return add_or_replace_file
> - (name, parent_baton, ancestor_path, ancestor_revision, file_baton, 1);
> + (name, parent_baton, base_path, base_revision, file_baton, 1);
> }
>
>
> static svn_error_t *
> replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_revnum_t ancestor_revision,
> + svn_revnum_t base_revision,
> void **file_baton)
> {
> return add_or_replace_file
> - (name, parent_baton, ancestor_path, ancestor_revision, file_baton, 0);
> + (name, parent_baton, NULL, base_revision, file_baton, 0);
> }
>
>
> @@ -1357,7 +1367,8 @@
> eb->target_revision = target_revision;
>
> /* Construct an editor. */
> - tree_editor->begin_edit = begin_edit;
> + tree_editor->set_target_revision = set_target_revision;
> + tree_editor->replace_root = replace_root;
> tree_editor->delete_entry = delete_entry;
> tree_editor->add_directory = add_directory;
> tree_editor->replace_directory = replace_directory;
> @@ -1386,7 +1397,7 @@
> {
> return
> make_editor (dest, target_revision,
> - 0, NULL, NULL,
> + FALSE, NULL, NULL,
> editor, edit_baton, pool);
> }
>
> @@ -1401,7 +1412,7 @@
> apr_pool_t *pool)
> {
> return make_editor (dest, target_revision,
> - 1, repos, ancestor_path,
> + TRUE, repos, ancestor_path,
> editor, edit_baton, pool);
> }
>
>
>
>
> 1.18 +51 -38 subversion/subversion/tests/svn_test_editor.c
>
> Index: svn_test_editor.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/tests/svn_test_editor.c,v
> retrieving revision 1.17
> retrieving revision 1.18
> diff -u -r1.17 -r1.18
> --- svn_test_editor.c 2001/02/06 00:46:32 1.17
> +++ svn_test_editor.c 2001/02/14 21:31:06 1.18
> @@ -147,7 +147,21 @@
>
>
> static svn_error_t *
> -test_begin_edit (void *edit_baton,
> +test_set_target_revision (void *edit_baton,
> + svn_revnum_t target_revision)
> +{
> + struct edit_baton *eb = (struct edit_baton *) edit_baton;
> + print_spaces (0);
> + printf ("SET_TARGET_REVISION: name '%s', target revision '%ld'\n",
> + eb->root_path->data,
> + target_revision);
> + return SVN_NO_ERROR;
> +}
> +
> +
> +static svn_error_t *
> +test_replace_root (void *edit_baton,
> + svn_revnum_t base_revision,
> void **root_baton)
> {
> struct edit_baton *eb = (struct edit_baton *) edit_baton;
> @@ -159,7 +173,7 @@
> *root_baton = d;
>
> print_spaces (d->indent_level); /* probably a no-op */
> - printf ("BEGIN_EDIT: name '%s', revision '%ld'\n",
> + printf ("REPLACE_ROOT: name '%s', revision '%ld'\n",
> eb->root_path->data,
> eb->revision);
>
> @@ -171,14 +185,14 @@
> static svn_error_t *
> add_or_replace_dir (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **child_baton,
> const char *pivot_string)
> {
> struct dir_baton *pd = (struct dir_baton *) parent_baton;
> const char *Aname = name ? name->data : "(unknown)";
> - const char *ancestor = ancestor_path ? ancestor_path->data : "(unknown)";
> + const char *ancestor = base_path ? base_path->data : "(unknown)";
> struct dir_baton *d;
>
> /* Set child_baton to a new dir baton. */
> @@ -193,7 +207,7 @@
> *child_baton = d;
>
> printf ("%s: name '%s', ancestor '%s' revision %ld\n",
> - pivot_string, Aname, ancestor, ancestor_revision);
> + pivot_string, Aname, ancestor, base_revision);
>
>
> return SVN_NO_ERROR;
> @@ -203,14 +217,14 @@
> static svn_error_t *
> test_add_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **child_baton)
> {
> return add_or_replace_dir (name,
> parent_baton,
> - ancestor_path,
> - ancestor_revision,
> + base_path,
> + base_revision,
> child_baton,
> "ADD_DIR");
> }
> @@ -219,14 +233,13 @@
> static svn_error_t *
> test_replace_directory (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + long int base_revision,
> void **child_baton)
> {
> return add_or_replace_dir (name,
> parent_baton,
> - ancestor_path,
> - ancestor_revision,
> + NULL,
> + base_revision,
> child_baton,
> "REPLACE_DIR");
> }
> @@ -295,15 +308,15 @@
> static svn_error_t *
> add_or_replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **file_baton,
> const char *pivot_string)
> {
> struct dir_baton *d = (struct dir_baton *) parent_baton;
> struct file_baton *fb;
> const char *Aname = name ? name->data : "(unknown)";
> - const char *ancestor = ancestor_path ? ancestor_path->data : "(unknown)";
> + const char *ancestor = base_path ? base_path->data : "(unknown)";
>
> /* Put the filename in file_baton */
> fb = apr_pcalloc (d->edit_baton->pool, sizeof (*fb));
> @@ -314,7 +327,7 @@
> *file_baton = fb;
>
> printf ("%s: name '%s', ancestor '%s' revision %ld\n",
> - pivot_string, Aname, ancestor, ancestor_revision);
> + pivot_string, Aname, ancestor, base_revision);
>
> return SVN_NO_ERROR;
> }
> @@ -323,14 +336,14 @@
> static svn_error_t *
> test_add_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + svn_string_t *base_path,
> + long int base_revision,
> void **file_baton)
> {
> return add_or_replace_file (name,
> parent_baton,
> - ancestor_path,
> - ancestor_revision,
> + base_path,
> + base_revision,
> file_baton,
> "ADD_FILE");
> }
> @@ -339,14 +352,13 @@
> static svn_error_t *
> test_replace_file (svn_string_t *name,
> void *parent_baton,
> - svn_string_t *ancestor_path,
> - long int ancestor_revision,
> + long int base_revision,
> void **file_baton)
> {
> return add_or_replace_file (name,
> parent_baton,
> - ancestor_path,
> - ancestor_revision,
> + NULL,
> + base_revision,
> file_baton,
> "REPLACE_FILE");
> }
> @@ -409,18 +421,19 @@
>
> /* Set up the editor. */
> my_editor = svn_delta_default_editor (pool);
> - my_editor->begin_edit = test_begin_edit;
> - my_editor->delete_entry = test_delete_entry;
> - my_editor->add_directory = test_add_directory;
> - my_editor->replace_directory = test_replace_directory;
> - my_editor->close_directory = test_close_directory;
> - my_editor->add_file = test_add_file;
> - my_editor->replace_file = test_replace_file;
> - my_editor->close_file = test_close_file;
> - my_editor->apply_textdelta = test_apply_textdelta;
> - my_editor->change_file_prop = test_change_file_prop;
> - my_editor->change_dir_prop = test_change_dir_prop;
> - my_editor->close_edit = test_close_edit;
> + my_editor->set_target_revision = test_set_target_revision;
> + my_editor->replace_root = test_replace_root;
> + my_editor->delete_entry = test_delete_entry;
> + my_editor->add_directory = test_add_directory;
> + my_editor->replace_directory = test_replace_directory;
> + my_editor->close_directory = test_close_directory;
> + my_editor->add_file = test_add_file;
> + my_editor->replace_file = test_replace_file;
> + my_editor->close_file = test_close_file;
> + my_editor->apply_textdelta = test_apply_textdelta;
> + my_editor->change_file_prop = test_change_file_prop;
> + my_editor->change_dir_prop = test_change_dir_prop;
> + my_editor->close_edit = test_close_edit;
>
> /* Set up the edit baton. */
> my_edit_baton = apr_pcalloc (pool, sizeof (*my_edit_baton));
>
>
>
> 1.12 +5 -5 subversion/subversion/tests/libsvn_delta/xml-output-test.c
>
> Index: xml-output-test.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/tests/libsvn_delta/xml-output-test.c,v
> retrieving revision 1.11
> retrieving revision 1.12
> diff -u -r1.11 -r1.12
> --- xml-output-test.c 2001/02/06 00:46:34 1.11
> +++ xml-output-test.c 2001/02/14 21:31:06 1.12
> @@ -62,15 +62,15 @@
>
> svn_delta_get_xml_editor (svn_stream_from_stdio (stdout, pool),
> &editor, &edit_baton, pool);
> - editor->begin_edit (edit_baton, &root_baton);
> - editor->replace_directory (foo_string, root_baton, aaa_string, 2,
> - &dir_baton);
> - editor->replace_file (bar_string, dir_baton, NULL, 0, &file_baton);
> + editor->set_target_revision (edit_baton, 3);
> + editor->replace_root (edit_baton, 2, &root_baton);
> + editor->replace_directory (foo_string, root_baton, 2, &dir_baton);
> + editor->replace_file (bar_string, dir_baton, 0, &file_baton);
> editor->apply_textdelta (file_baton, &handler, &handler_baton);
> handler (&window, handler_baton);
> handler (NULL, handler_baton);
> editor->close_file (file_baton);
> - editor->replace_file (baz_string, dir_baton, NULL, 0, &file_baton);
> + editor->replace_file (baz_string, dir_baton, 0, &file_baton);
> editor->change_file_prop (file_baton, bbb_string, ccc_string);
> editor->change_file_prop (file_baton, aaa_string, NULL);
> editor->change_dir_prop (dir_baton, ccc_string, bbb_string);
>
>
>
Received on Sat Oct 21 14:36:22 2006

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.