[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/libsvn_ra_dav/tests ra-dav-test.c Makefile.am

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-09-02 12:22:33 CEST

With this change, SVN can now be pointed at a DAV server and fetch the
contents down to a local working copy.

Woo!

Cheers,
-g

On Sat, Sep 02, 2000 at 10:09:18AM -0000, gstein@tigris.org wrote:
> User: gstein
> Date: 00/09/02 03:09:18
>
> Modified: subversion/libsvn_ra_dav/tests ra-dav-test.c Makefile.am
> Log:
> use the real WC change walker (rather than our test hack).
>
> Revision Changes Path
> 1.4 +12 -76 subversion/subversion/libsvn_ra_dav/tests/ra-dav-test.c
>
> Index: ra-dav-test.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_ra_dav/tests/ra-dav-test.c,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -r1.3 -r1.4
> --- ra-dav-test.c 2000/08/31 13:52:28 1.3
> +++ ra-dav-test.c 2000/09/02 10:09:17 1.4
> @@ -57,83 +57,9 @@
>
> #include "svn_delta.h"
> #include "svn_ra.h"
> +#include "svn_wc.h"
>
>
> -static svn_error_t *
> -change_txdelta_handler (svn_txdelta_window_t *window, void *file_baton)
> -{
> - printf(" ... writing %lu bytes\n", (unsigned long)window->ops->length);
> - return NULL;
> -}
> -
> -static svn_error_t *
> -change_add_dir (svn_string_t *name,
> - void *walk_baton,
> - void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_vernum_t ancestor_version,
> - void **child_baton)
> -{
> - printf("change_add_dir: %s\n", name->data);
> - *child_baton = name->data;
> - return NULL;
> -}
> -
> -static svn_error_t *
> -change_finish_dir (void *dir_baton)
> -{
> - printf("change_finish_dir: %s\n", dir_baton);
> - return NULL;
> -}
> -
> -static svn_error_t *
> -change_add_file (svn_string_t *name,
> - void *walk_baton,
> - void *parent_baton,
> - svn_string_t *ancestor_path,
> - svn_vernum_t ancestor_version,
> - void **file_baton)
> -{
> - printf("change_add_file: %s/%s\n", parent_baton, name->data);
> - *file_baton = name->data;
> - return NULL;
> -}
> -
> -static svn_error_t *
> -change_apply_txdelta (void *walk_baton,
> - void *parent_baton,
> - void *file_baton,
> - svn_txdelta_window_handler_t **handler,
> - void **handler_baton)
> -{
> - printf("change_apply_txdelta: %s/%s\n", parent_baton, file_baton);
> - *handler = change_txdelta_handler;
> - *handler_baton = file_baton;
> - return NULL;
> -}
> -
> -static svn_error_t *
> -change_finish_file (void *file_baton)
> -{
> - printf("change_finish_file: %s\n", file_baton);
> - return NULL;
> -}
> -
> -/* ### hack. we really want to call svn_wc_get_change_walker() */
> -static const svn_delta_walk_t change_walker = {
> - NULL,
> - change_add_dir,
> - NULL,
> - NULL,
> - NULL,
> - change_finish_dir,
> - change_add_file,
> - NULL,
> - change_apply_txdelta,
> - NULL,
> - change_finish_file
> -};
> -
> int
> main (int argc, char **argv)
> {
> @@ -141,6 +67,10 @@
> svn_error_t *err;
> svn_ra_session_t *ras;
> const char *url;
> + const svn_delta_walk_t *walker;
> + void *walk_baton;
> + void *dir_baton;
> + svn_string_t *repos;
>
> apr_initialize ();
> apr_create_pool (&pool, NULL);
> @@ -156,8 +86,14 @@
> err = svn_ra_open(&ras, url, pool);
> if (err)
> svn_handle_error (err, stdout);
> +
> + repos = svn_string_create(url, pool);
> + err = svn_wc_get_change_walker(NULL, repos, 1,
> + &walker, &walk_baton, &dir_baton, pool);
> + if (err)
> + svn_handle_error (err, stdout);
>
> - err = svn_ra_checkout(ras, "", 1, &change_walker, NULL, NULL, pool);
> + err = svn_ra_checkout(ras, "", 1, walker, walk_baton, dir_baton, pool);
>
> svn_ra_close(ras);
>
>
>
>
> 1.3 +2 -0 subversion/subversion/libsvn_ra_dav/tests/Makefile.am
>
> Index: Makefile.am
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_ra_dav/tests/Makefile.am,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- Makefile.am 2000/08/30 09:46:22 1.2
> +++ Makefile.am 2000/09/02 10:09:17 1.3
> @@ -11,6 +11,8 @@
> ra_dav_test_LDADD = ../libsvn_ra_dav.la \
> ../../libsvn_subr/libsvn_subr.la \
> ../../libsvn_string/libsvn_string.la \
> + ../../libsvn_wc/libsvn_wc.la \
> + ../../libsvn_delta/libsvn_delta.la \
> ../../../expat-lite/libexpat.la \
> ../../../neon/libneon.la \
> ../../../apr/libapr.a
>
>
>

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:07 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.