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

Re: Looking for auth. info. in the WC

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-10-08 20:12:59 CEST

Greg Stein wrote:
> On Wed, Sep 24, 2003 at 11:59:35AM +0100, Julian Foad wrote:

[Proposing not to pass the current WC directory as an "auth_dir" to the "base_dir" parameter of svn_client__open_ra_session when the session is not relevant to any particular WC directory. But still to pass the relevant WC directory to the "base_dir" parameter when the session _is_ relevant to a particular WC directory.]

>>I was unable to follow usage of this base_dir parameter down through
>>svn_ra_dav__open, so I don't know for sure that it doesn't still try to
>>use it. However, such usage is not documented for
>>svn_client__open_ra_session, and it was always able to work with NULL
>>(when the current directory is not a WC), so this should all be quite
>>safe.
>
> No. That parameter is necessary. When provided, it enables the RA layer to
> fetch wcprop values. If you pass NULL, then you "hide" all wcprops from
> the RA layer. That means that ra_dav will need to make a bunch of round
> trips to the server to figure out the missing values. Quite awful.
>
> Any change in this space will need to retain that parameter. It should
> probably just point to the directory corresponding to the root of the RA
> session.

Greg, or someone,

I think you are talking about the case when a local WC directory is available and relevant to the operation. I am talking about the URL-only cases when the code doesn't have an interest in any particular local WC directory. For example, in this pseudo-diff from my patch:

Index: subversion/libsvn_client/delete.c
===================================================================
--- subversion/libsvn_client/delete.c (revision 7358)
+++ subversion/libsvn_client/delete.c (working copy)
@@ -156,17 +155,14 @@ delete_urls (svn_client_commit_info_t **

   /* Get the RA vtable that matches URL. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, common, pool));

   /* Open an RA session for the URL. Note that we don't have a local
+ directory, nor a place to put temp files. */
- directory, nor a place to put temp files or store the auth
- data, although we'll try to retrieve auth data from the
- current directory. */
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, common, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, common, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));

Is that OK? Can I commit it now? Full patch attached if you want to review it.

- Julian

Authentication is no longer kept in working copy directories, so do not
pass a working copy directory path to svn_client__open_ra_session just
for that purpose.

* subversion/libsvn_client/auth.c
* subversion/libsvn_client/client.h
  (svn_client__dir_if_wc, svn_client__default_auth_dir) Deleted. These
    functions were provided explicitly to find auth. info. in WC dirs.

* subversion/libsvn_client/add.c
* subversion/libsvn_client/cat.c
* subversion/libsvn_client/copy.c
* subversion/libsvn_client/delete.c
* subversion/libsvn_client/diff.c
* subversion/libsvn_client/log.c
* subversion/libsvn_client/ls.c
* subversion/libsvn_client/prop_commands.c
* subversion/libsvn_client/relocate.c
  When calling svn_client__open_ra_session and working copy access is not
  needed, do not call svn_client__dir_if_wc or svn_client__default_auth_dir
  to choose an auth. dir., but pass NULL as the base_dir instead.

Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h (revision 7358)
+++ subversion/include/svn_client.h (working copy)
@@ -685,8 +685,7 @@
  * @a targets contains all the working copy paths (as <tt>const char
  * *</tt>'s) for which log messages are desired. The repository info is
  * determined by taking the common prefix of the target entries' URLs.
- * The common prefix of @a targets, if it is a valid working copy,
- * determines the auth info. @a receiver is invoked only on messages
+ * @a receiver is invoked only on messages
  * whose revisions involved a change to some path in @a targets.
  *
  * ### todo: the above paragraph is not fully implemented yet.
Index: subversion/libsvn_client/relocate.c
===================================================================
--- subversion/libsvn_client/relocate.c (revision 7358)
+++ subversion/libsvn_client/relocate.c (working copy)
@@ -66,7 +66,6 @@
   void *sess;
   struct validator_baton_t *b = baton;
   const char *ra_uuid;
- const char *auth_dir;
 
   apr_hash_t *uuids = b->url_uuids;
   apr_pool_t *pool = b->pool;
@@ -102,8 +101,7 @@
      by destroying the subpool. */
   subpool = svn_pool_create (pool);
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, b->ra_baton, url, subpool));
- SVN_ERR (svn_client__default_auth_dir (&auth_dir, b->path, subpool));
- SVN_ERR (svn_client__open_ra_session (&sess, ra_lib, url, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&sess, ra_lib, url, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         b->ctx, subpool));
   SVN_ERR (ra_lib->get_uuid (sess, &ra_uuid, subpool));
Index: subversion/libsvn_client/auth.c
===================================================================
--- subversion/libsvn_client/auth.c (revision 7358)
+++ subversion/libsvn_client/auth.c (working copy)
@@ -43,60 +43,6 @@
 
 /*-----------------------------------------------------------------------*/
 
-
-svn_error_t *
-svn_client__dir_if_wc (const char **dir_p,
- const char *dir,
- apr_pool_t *pool)
-{
- int wc_format;
-
- SVN_ERR (svn_wc_check_wc (dir, &wc_format, pool));
-
- if (wc_format == 0)
- *dir_p = NULL;
- else
- *dir_p = dir;
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_client__default_auth_dir (const char **auth_dir_p,
- const char *path,
- apr_pool_t *pool)
-{
- svn_node_kind_t kind;
-
- SVN_ERR (svn_io_check_path (path, &kind, pool));
- if (kind == svn_node_dir)
- {
- SVN_ERR (svn_client__dir_if_wc (auth_dir_p, path, pool));
-
- /* Handle unversioned dir in a versioned parent. */
- if (! *auth_dir_p)
- goto try_parent;
- }
- else if ((kind == svn_node_file) || (kind == svn_node_none))
- {
- try_parent:
- svn_path_split (path, auth_dir_p, NULL, pool);
- SVN_ERR (svn_client__dir_if_wc (auth_dir_p, *auth_dir_p, pool));
- }
- else
- {
- return svn_error_createf
- (SVN_ERR_NODE_UNKNOWN_KIND, NULL,
- "unknown node kind for '%s'", path);
- }
-
- return SVN_NO_ERROR;
-}
-
-
-
-
 /** Providers. **/
 
 /* Baton type for username/password prompting. */
Index: subversion/libsvn_client/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c (revision 7358)
+++ subversion/libsvn_client/prop_commands.c (working copy)
@@ -148,7 +148,6 @@
 {
   void *ra_baton, *session;
   svn_ra_plugin_t *ra_lib;
- const char *auth_dir;
 
   if (strcmp (propname, SVN_PROP_REVISION_AUTHOR) == 0
       && strchr (propval->data, '\n') != NULL && !force)
@@ -157,12 +156,10 @@
                              "Pass --force to override this restriction");
 
   /* Open an RA session for the URL. Note that we don't have a local
- directory, nor a place to put temp files or store the auth data,
- although we'll try to fetch auth data from the current directory. */
+ directory, nor a place to put temp files. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, URL, pool));
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
 
@@ -459,7 +456,6 @@
   const svn_wc_entry_t *node;
   const char *utarget; /* target, or the url for target */
   svn_revnum_t revnum;
- const char *auth_dir;
 
   *props = apr_hash_make (pool);
 
@@ -476,9 +472,8 @@
 
       SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
       SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, utarget, pool));
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
       SVN_ERR (svn_client__open_ra_session (&session, ra_lib, utarget,
- auth_dir, NULL, NULL,
+ NULL, NULL, NULL,
                                             FALSE, FALSE, ctx, pool));
 
       /* Default to HEAD. */
@@ -578,14 +573,12 @@
 {
   void *ra_baton, *session;
   svn_ra_plugin_t *ra_lib;
- const char *auth_dir;
 
   /* Open an RA session for the URL. Note that we don't have a local
- directory, nor a place to put temp files or store the auth data. */
+ directory, nor a place to put temp files. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, URL, pool));
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
 
@@ -942,7 +935,7 @@
   apr_hash_index_t *hi;
 
   /* Open an RA session for the URL. Note that we don't have a local
- directory, nor a place to put temp files or store the auth data. */
+ directory, nor a place to put temp files. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, URL, pool));
   SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, NULL,
Index: subversion/libsvn_client/delete.c
===================================================================
--- subversion/libsvn_client/delete.c (revision 7358)
+++ subversion/libsvn_client/delete.c (working copy)
@@ -116,7 +116,6 @@
   void *commit_baton;
   const char *log_msg;
   svn_node_kind_t kind;
- const char *auth_dir;
   apr_array_header_t *targets;
   const char *common;
   int i;
@@ -159,11 +158,8 @@
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, common, pool));
 
   /* Open an RA session for the URL. Note that we don't have a local
- directory, nor a place to put temp files or store the auth
- data, although we'll try to retrieve auth data from the
- current directory. */
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, common, auth_dir,
+ directory, nor a place to put temp files. */
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, common, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
 
Index: subversion/libsvn_client/cat.c
===================================================================
--- subversion/libsvn_client/cat.c (revision 7358)
+++ subversion/libsvn_client/cat.c (working copy)
@@ -49,7 +49,6 @@
   svn_string_t *eol_style;
   svn_string_t *keywords;
   apr_hash_t *props;
- const char *auth_dir;
   const char *url;
 
   SVN_ERR (svn_client_url_from_path (&url, path_or_url, pool));
@@ -62,10 +61,8 @@
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, url, pool));
 
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
-
   /* Open a repository session to the URL. */
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, url, auth_dir, NULL,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, url, NULL, NULL,
                                         NULL, FALSE, FALSE,
                                         ctx, pool));
 
Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 7358)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -1147,7 +1147,6 @@
   void *report_baton;
   const svn_delta_editor_t *diff_editor;
   void *diff_edit_baton;
- const char *auth_dir;
 
   /* Sanity check -- ensure that we have valid revisions to look at. */
   if ((revision1->kind == svn_opt_revision_unspecified)
@@ -1158,12 +1157,10 @@
          "do_merge: caller failed to specify all revisions");
     }
 
- SVN_ERR (svn_client__default_auth_dir (&auth_dir, target_wcpath, pool));
-
   /* Establish first RA session to URL1. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, URL1, pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL1, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL1, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
   /* Resolve the revision numbers. */
@@ -1178,7 +1175,7 @@
      the diff, is still being processed the first session cannot be
      reused. This applies to ra_dav, ra_local does not appears to have
      this limitation. */
- SVN_ERR (svn_client__open_ra_session (&session2, ra_lib, URL1, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session2, ra_lib, URL1, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
  
@@ -1228,7 +1225,6 @@
                             const char *path,
                             const svn_opt_revision_t *revision,
                             void *ra_baton,
- const char *auth_dir,
                             struct merge_cmd_baton *merge_b,
                             apr_pool_t *pool)
 {
@@ -1238,7 +1234,7 @@
   apr_status_t status;
 
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, url, pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, url, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, url, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         merge_b->ctx, pool));
   SVN_ERR (svn_client__get_revision_number (rev, ra_lib, session, revision,
@@ -1275,9 +1271,6 @@
   void *ra_baton;
   svn_wc_notify_state_t prop_state = svn_wc_notify_state_unknown;
   svn_wc_notify_state_t text_state = svn_wc_notify_state_unknown;
- const char *auth_dir;
-
- SVN_ERR (svn_client__default_auth_dir (&auth_dir, merge_b->target, pool));
 
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
 
@@ -1285,11 +1278,11 @@
      *totally* different repositories here. :-) */
   SVN_ERR (single_file_merge_get_file (&tmpfile1, &props1, &rev1,
                                        URL1, path1, revision1,
- ra_baton, auth_dir, merge_b, pool));
+ ra_baton, merge_b, pool));
 
   SVN_ERR (single_file_merge_get_file (&tmpfile2, &props2, &rev2,
                                        merge_b->url, merge_b->path,
- merge_b->revision, ra_baton, auth_dir,
+ merge_b->revision, ra_baton,
                                        merge_b, pool));
 
   /* Discover any svn:mime-type values in the proplists */
@@ -1469,7 +1462,6 @@
   void *report_baton;
   const svn_delta_editor_t *diff_editor;
   void *diff_edit_baton;
- const char *auth_dir;
   apr_pool_t *temppool = svn_pool_create (pool);
   svn_boolean_t same_urls;
 
@@ -1490,14 +1482,12 @@
   /* Setup our RA libraries. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, url1, pool));
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, base_path ? base_path : "",
- pool));
 
   /* Open temporary RA sessions to each URL. */
- SVN_ERR (svn_client__open_ra_session (&session1, ra_lib, url1, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session1, ra_lib, url1, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, temppool));
- SVN_ERR (svn_client__open_ra_session (&session2, ra_lib, url2, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session2, ra_lib, url2, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, temppool));
 
@@ -1557,10 +1547,10 @@
   /* Now, we reopen two RA session to the correct anchor/target
      locations for our URLs. */
   SVN_ERR (svn_client__open_ra_session (&session1, ra_lib, anchor1,
- auth_dir, NULL, NULL, FALSE, TRUE,
+ NULL, NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
   SVN_ERR (svn_client__open_ra_session (&session2, ra_lib, anchor1,
- auth_dir, NULL, NULL, FALSE, TRUE,
+ NULL, NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
 
   /* Set up the repos_diff editor on BASE_PATH, if available.
@@ -1631,7 +1621,6 @@
   void *report_baton;
   const svn_delta_editor_t *diff_editor;
   void *diff_edit_baton;
- const char *auth_dir;
   svn_boolean_t rev2_is_base = (revision2->kind == svn_opt_revision_base);
 
   /* Assert that we have valid input. */
@@ -1656,9 +1645,8 @@
   /* Establish RA session to URL1's anchor */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, anchor1, pool));
- SVN_ERR (svn_client__default_auth_dir (&auth_dir, path2, pool));
   SVN_ERR (svn_client__open_ra_session (&session, ra_lib, anchor1,
- auth_dir, NULL, NULL, FALSE, TRUE,
+ NULL, NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
       
   /* Set up diff editor according to path2's anchor/target. */
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 7358)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -281,7 +281,6 @@
   void *edit_baton;
   void *commit_baton;
   svn_revnum_t src_revnum;
- const char *auth_dir;
   svn_boolean_t resurrection = FALSE;
   struct path_driver_cb_baton cb_baton;
   svn_error_t *err;
@@ -357,13 +356,10 @@
         return err;
     }
 
- /* Get the auth dir. */
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
-
   /* Open an RA session for the URL. Note that we don't have a local
- directory, nor a place to put temp files or store the auth data. */
+ directory, nor a place to put temp files. */
   SVN_ERR (svn_client__open_ra_session (&sess, ra_lib, top_url,
- auth_dir,
+ NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
   /* Pass NULL for the path, to ensure error if trying to get a
@@ -587,7 +583,6 @@
   svn_boolean_t commit_in_progress = FALSE;
   const char *base_path;
   const char *base_url;
- const char *auth_dir;
 
   /* The commit process uses absolute paths, so we need to open the access
      baton using absolute paths, and so we really need to use absolute
@@ -687,9 +682,8 @@
     goto cleanup;
 
   /* Open an RA session to BASE_URL. */
- SVN_ERR (svn_client__default_auth_dir (&auth_dir, base_path, pool));
   if ((cmt_err = svn_client__open_ra_session (&session, ra_lib, base_url,
- auth_dir, NULL, commit_items,
+ NULL, NULL, commit_items,
                                               FALSE, FALSE,
                                               ctx, pool)))
     goto cleanup;
@@ -748,20 +742,16 @@
   svn_wc_adm_access_t *adm_access;
   const char *src_uuid = NULL, *dst_uuid = NULL;
   svn_boolean_t same_repositories;
- const char *auth_dir;
   svn_opt_revision_t revision;
 
   /* Get the RA vtable that matches URL. */
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, src_url, pool));
 
- SVN_ERR (svn_client__default_auth_dir (&auth_dir, dst_path, pool));
-
   /* Open a repository session to the given URL. We do not (yet) have a
      working copy, so we don't have a corresponding path and tempfiles
- cannot go into the admin area. We do want to store the resulting
- auth data, though, once the WC is built. */
- SVN_ERR (svn_client__open_ra_session (&sess, ra_lib, src_url, auth_dir,
+ cannot go into the admin area. */
+ SVN_ERR (svn_client__open_ra_session (&sess, ra_lib, src_url, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
       
Index: subversion/libsvn_client/ls.c
===================================================================
--- subversion/libsvn_client/ls.c (revision 7358)
+++ subversion/libsvn_client/ls.c (working copy)
@@ -81,7 +81,6 @@
   void *ra_baton, *session;
   svn_revnum_t rev;
   svn_node_kind_t url_kind;
- const char *auth_dir;
   const char *url;
 
   SVN_ERR (svn_client_url_from_path (&url, path_or_url, pool));
@@ -93,11 +92,9 @@
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, url, pool));
 
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
-
   /* Open a repository session to the URL. */
   SVN_ERR (svn_client__open_ra_session (&session, ra_lib, url,
- auth_dir,
+ NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
 
@@ -126,7 +123,7 @@
       /* Re-open the session to the file's parent instead. */
       svn_path_split (url, &parent_url, &base_name, pool);
       SVN_ERR (svn_client__open_ra_session (&session, ra_lib, parent_url,
- auth_dir,
+ NULL,
                                             NULL, NULL, FALSE, TRUE,
                                             ctx, pool));
 
Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c (revision 7358)
+++ subversion/libsvn_client/log.c (working copy)
@@ -61,7 +61,6 @@
   const char *path;
   const char *base_url;
   const char *base_name = NULL;
- const char *auth_dir;
   apr_array_header_t *condensed_targets;
   svn_revnum_t start_revnum, end_revnum;
   svn_error_t *err = SVN_NO_ERROR; /* Because we might have no targets. */
@@ -168,25 +167,12 @@
   SVN_ERR (svn_ra_init_ra_libs (&ra_baton, pool));
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, base_url, pool));
 
- /* Open a repository session to the BASE_URL. If we got here from a full
- URL passed to the command line, then if the current directory is a
- working copy, we pass it as base_name for authentication
- purposes. But we make sure to treat it as read-only, since when
- one operates on URLs, one doesn't expect it to change anything in
- the working copy. */
+ /* Open a repository session to the BASE_URL. */
   SVN_ERR (svn_path_condense_targets (&base_name, NULL, targets, TRUE, pool));
- if (NULL != base_name)
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, base_url,
- base_name, NULL, NULL, TRUE, TRUE,
- ctx, pool));
- else
- {
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, base_url,
- auth_dir,
- NULL, NULL, FALSE, TRUE,
- ctx, pool));
- }
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, base_url,
+ base_name, NULL, NULL,
+ (NULL != base_name), TRUE,
+ ctx, pool));
 
   /* It's a bit complex to correctly handle the special revision words
    * such as "BASE", "COMMITTED", and "PREV". For example, if the
Index: subversion/libsvn_client/client.h
===================================================================
--- subversion/libsvn_client/client.h (revision 7358)
+++ subversion/libsvn_client/client.h (working copy)
@@ -154,33 +154,6 @@
                                            apr_pool_t *pool);
 
 
-/* Set *DIR_P to DIR if DIR is a working copy directory, else set to NULL.
- * DIR may not be a file. Use POOL only for temporary allocation.
- *
- * Purpose: Helper for callers of svn_client__open_ra_session(),
- * who if not passed a working copy path as an argument, will often
- * wish to try the current directory for auth information, but only if
- * it is a working copy.
- */
-svn_error_t *svn_client__dir_if_wc (const char **dir_p,
- const char *dir,
- apr_pool_t *pool);
-
-
-/* Set *AUTH_DIR_P to PATH if PATH is a working copy directory, else
- * to PATH's parent if the parent is a working copy directory, else to
- * null.
- *
- * If set *AUTH_DIR_P to PATH's parent, allocate *AUTH_DIR_P in POOL;
- * otherwise, use POOL only for temporary allocation.
- *
- * Purpose: similar to svn_client__dir_if_wc().
- */
-svn_error_t *svn_client__default_auth_dir (const char **auth_dir_p,
- const char *path,
- apr_pool_t *pool);
-
-
 
 /* ---------------------------------------------------------------- */
 
Index: subversion/libsvn_client/add.c
===================================================================
--- subversion/libsvn_client/add.c (revision 7358)
+++ subversion/libsvn_client/add.c (working copy)
@@ -403,7 +403,6 @@
   void *edit_baton;
   void *commit_baton;
   const char *log_msg;
- const char *auth_dir;
   apr_array_header_t *targets;
   const char *common;
   int i;
@@ -474,11 +473,8 @@
   SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, common, pool));
 
   /* Open an RA session for the URL. Note that we don't have a local
- directory, nor a place to put temp files or store the auth
- data, although we'll try to retrieve auth data from the
- current directory. */
- SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, common, auth_dir,
+ directory, nor a place to put temp files. */
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, common, NULL,
                                         NULL, NULL, FALSE, TRUE,
                                         ctx, pool));
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 8 20:13:29 2003

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.