[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-09-24 12:59:35 CEST

Ben Collins-Sussman wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>>This function may be of use for other purposes, but I was under the
>>impression that auth info had been removed from the WC some time
>>ago. Shall I remove such usage, or am I misunderstanding?
>
> Wow, I think you're right. Yeah, no more auth info in the wc anymore!

OK - the attached patch removes it all.

The typical scenario within libsvn_client, when it wants an RA session not connected to the WC, is:

  SVN_ERR (svn_client__dir_if_wc (&auth_dir, "", pool));
    # or (svn_client__default_auth_dir (&auth_dir, base_path, pool));
    # or path or dst_path or target_wcpath

  SVN_ERR (svn_client__open_ra_session (&session, ra_lib, url, auth_dir,
                                        NULL, NULL, FALSE, FALSE,
    # "auth_dir" is passed as the value of the "base_dir" parameter.
    # The first "NULL" (base_access) and the first "FALSE" (use_admin)
    # mean that no WC access is wanted.

I think I can just delete the "__dir_if_wc" or "_default_auth_dir" call and pass NULL instead.

BTW, at first I assumed that svn_client__default_auth_dir got the new home-directory location, but it doesn't: it just tries the current and parent WC directories, very similar to __dir_if_wc. So I can also delete those two functions, which have no other use. (I searched.)

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.

The attached patch passes regression tests on RA-local and RA-SVN, and a quick manual test of a few commands over HTTP. It doesn't actually touch RA-DAV code, so I'm not sure that it needs "make davcheck" but, if you think it does, could you run it for me? (Sorry to ask that again. Being on dial-up I can't easily download big things like Apache and its dependencies. I'll get it some time.) I can commit it if/when you're happy with 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/libsvn_client/relocate.c
===================================================================
--- subversion/libsvn_client/relocate.c (revision 7154)
+++ subversion/libsvn_client/relocate.c (working copy)
@@ -61,7 +61,6 @@
   void *sess;
   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;
@@ -95,8 +94,7 @@
 
   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 7154)
+++ subversion/libsvn_client/auth.c (working copy)
@@ -40,60 +40,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 7154)
+++ 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 char *utarget; /* target, or the url for target */
   svn_node_kind_t kind;
   svn_revnum_t revnum;
- const char *auth_dir;
 
   SVN_ERR (maybe_convert_to_url (&utarget, target, revision, pool));
 
@@ -473,9 +469,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));
 
       *props = apr_hash_make (pool);
@@ -593,14 +588,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));
 
@@ -964,7 +957,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 7154)
+++ 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 7154)
+++ 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 7154)
+++ 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 7154)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -282,7 +282,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;
@@ -358,13 +357,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
@@ -567,7 +563,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
@@ -648,9 +643,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;
@@ -709,20 +703,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 7154)
+++ 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 7154)
+++ 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 7154)
+++ 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 7154)
+++ subversion/libsvn_client/add.c (working copy)
@@ -209,7 +209,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;
@@ -280,11 +279,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 Sep 24 12:59:39 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.