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

[PATCH] svn_client_ctx_t (was Re: Issue #1004 and Garrett Rooney)

From: <rooneg_at_electricjellyfish.net>
Date: 2003-01-25 03:29:33 CET

ok, here's my current take on the svn_client_ctx_t issue.

there's a /ton/ of stuff that we'd like to move in to this structure,
and doing it all at once is madness, so i'm going to take an
incremental approach, starting one at a time at the top level of the
API (the functions in svn_client.h), and as i move more and more parts
of the client specific data in to the context object, i'll push the
context object further into the guts of libsvn_client and libsvn_wc.

the first thing i thought would be nice to move was the
svn_client_auth_baton_t's that get passed to everything that accesses
the repository directly. i've got a first cut at that done, just doing
so for svn_client_checkout (and the functions were affected by that
change, progressing only far enough to make things build and pass make
check).

assuming people like this approach, i was going to finish up moving the
auth batons in, then get the patch to the point where it can be
committed, commit it, then move on to the notification functions, and
probably config options after that (since that requires the context
object to be passed much further down the chain).

after all this is done, then i'll start looking at doing the
cancelation stuff, which is the whole point of this exercise, if you
remember the issue at hand ;-)

anyway, here's the patch, and a log message. let me know what you
think.

-garrett

* subversion/clients/cmdline/checkout-cmd.c
* subversion/clients/cmdline/export-cmd.c
* subversion/clients/cmdline/switch-cmd.c
* subversion/clients/cmdline/switch-cmd.c
   create svn_client_ctx_t objects, stick authentication batons in them,
and pass
   them to the underlying libsvn_client functions.

* subversion/include/svn_client.h
   (svn_client_ctx_t): new object to hold the client context.
   (svn_client_ctx_set_auth_baton, svn_client_ctx_get_auth_baton):
functions to
    deal with caching the auth baton in the context.
   (svn_client_checkout, svn_client_update, svn_client_switch,
    svn_client_export): take a context instead of an auth_baton.

* subversion/include/svn_error_codes.h
   (SVN_ERR_CLIENT_CTX_NOT_FOUND): new error, for when the context does
not
    contain the value we're looking for.

* subversion/libsvn_client/checkout.c
   (svn_client_checkout): take a context instead of an auth_baton, and
grab the
    auth_baton from it when we need it.

* subversion/libsvn_client/client.h
   (svn_client__handle_externals): update prototype.

* subversion/libsvn_client/context.c
   new file, holds implementation of svn_client_ctx_*.

* subversion/libsvn_client/export.c
   (svn_client_export): take a context instead of an auth_baton, and
grab the
    auth_baton from it when we need it.

* subversion/libsvn_client/externals.c
   (svn_client__handle_externals): take a context instead of an
auth_baton.
   (handle_items_change_baton, handle_externals_desc_changed_baton):
hold a
    context instead of an auth_baton.
   (all others): update calls to svn_client_update and
svn_client_checkout to
    pass context instead of auth_baton.

* subversion/libsvn_client/switch.c
   (svn_client_switch): take an svn_client_ctx_t instead of an
auth_baton, and
    grab the auth_baton out of it when we need it. pass the context in
to
    svn_client__handle_externals.

* subversion/libsvn_client/update.c
   (svn_client_update): take a context instead of an auth_baton, and
grab the
    auth_baton out of it when we need it. pass the context in to
    svn_client__handle_externals.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat Oct 14 02:16:33 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.