A couple of months ago I submitted a patch to remove the use of "svn_client__default_auth_dir" from libsvn_client, since it is no longer relevant. However, there was some doubt over whether the patch was harmless, because of the possibility that the directory passed to svn_client__open_ra_session as "auth_dir" might actually be being used to access the administrative area for other purposes. The contention was that if I pass NULL instead, Subversion still works but might be working less efficiently through contacting the repository where it would otherwise have got stuff from the administrative area.
With the following trick I now think I can prove that the patch is safe. I used a constant address of 0xCCCCCCCC instead of the address of the pathname string, so that any attempt to use it would result in a memory access error. I ran "make check" and "make svncheck" and no tests failed, and I think that pretty much proves that the passed-in path is not used. It is still possible that a test for NULL is performed on the path, and different action taken accordingly, without actually using the path itself, but that doesn't seem like a possibility worth worrying about.
Index: subversion/libsvn_client/auth.c
===================================================================
--- subversion/libsvn_client/auth.c (revision 7930)
+++ subversion/libsvn_client/auth.c (working copy)
@@ -41,7 +41,7 @@
if (wc_format == 0)
*dir_p = NULL;
else
- *dir_p = dir;
+ *dir_p = (const char *)0xCCCCCCCC;
return SVN_NO_ERROR;
}
There is one further instance where a path is being passed to svn_client__open_ra_session only for auth. info., but in this case is is not obtained from svn_client__default_auth_dir. The same principle applies:
Index: subversion/libsvn_client/checkout.c
===================================================================
--- subversion/libsvn_client/checkout.c (revision 7930)
+++ subversion/libsvn_client/checkout.c (working copy)
@@ -84,7 +84,7 @@
/* Open an RA session to URL. Note that we do not have an admin area
for storing temp files. We do, however, want to store auth data
after the checkout builds the WC. */
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, path,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, (const char *)0xCCCCCCCC;
NULL, NULL, FALSE, TRUE,
ctx, pool));
The only other instances where a path is being passed in that base_dir parameter are instances where the other parameters are set so as to request that the "base_dir" be used (for purposes other than authentication).
The original patch is updated and attached. Does that now seem OK?
- Julian
Authentication info. is no longer kept in the working copy, so do not pass
a path to svn_client__open_ra_session just for that purpose.
* subversion/libsvn_client/auth.c: Deleted.
* subversion/libsvn_client/client.h
(svn_client__dir_if_wc, svn_client__default_auth_dir): Deleted.
These functions were for finding auth. info. in the WC.
* subversion/libsvn_client/add.c
* subversion/libsvn_client/blame.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 (i.e. when base_access=NULL and use_admin=FALSE), 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.
* subversion/libsvn_client/checkout.c
When calling svn_client__open_ra_session and working copy access is not
needed (i.e. when base_access=NULL and use_admin=FALSE), pass NULL as the
base_dir.
* subversion/include/svn_client.h
Update a comment accordingly.
Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h (revision 7930)
+++ subversion/include/svn_client.h (working copy)
@@ -712,8 +712,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 7930)
+++ 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/delete.c
===================================================================
--- subversion/libsvn_client/delete.c (revision 7930)
+++ 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/client.h
===================================================================
--- subversion/libsvn_client/client.h (revision 7930)
+++ subversion/libsvn_client/client.h (working copy)
@@ -131,7 +131,8 @@
structures, present only for working copy commits, NULL otherwise.
- USE_ADMIN indicates that the RA layer should create tempfiles
- in the administrative area instead of in the working copy itself.
+ in the administrative area instead of in the working copy itself,
+ and read properties from the administrative area.
- READ_ONLY_WC indicates that the RA layer should not attempt to
modify the WC props directly.
@@ -154,33 +155,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/prop_commands.c
===================================================================
--- subversion/libsvn_client/prop_commands.c (revision 7930)
+++ subversion/libsvn_client/prop_commands.c (working copy)
@@ -198,7 +198,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)
@@ -210,12 +209,10 @@
"Bad property name: '%s'", propname);
/* 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));
@@ -492,7 +489,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);
@@ -509,9 +505,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. */
@@ -622,14 +617,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));
@@ -975,7 +968,7 @@
apr_hash_t *proplist;
/* 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/auth.c
===================================================================
--- subversion/libsvn_client/auth.c (revision 7930)
+++ subversion/libsvn_client/auth.c (working copy)
@@ -1,80 +0,0 @@
-/*
- * auth.c: routines that drive "authenticator" objects received from RA.
- *
- * ====================================================================
- * Copyright (c) 2000-2003 CollabNet. All rights reserved.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at http://subversion.tigris.org/license-1.html.
- * If newer versions of this license are posted there, you may use a
- * newer version instead, at your option.
- *
- * This software consists of voluntary contributions made by many
- * individuals. For exact contribution history, see the revision
- * history and logs, available at http://subversion.tigris.org/.
- * ====================================================================
- */
-
-/* ==================================================================== */
-
-
-
-/*** Includes. ***/
-
-#include "svn_error.h"
-#include "svn_path.h"
-#include "client.h"
-
-/*-----------------------------------------------------------------------*/
-
-
-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;
-}
Index: subversion/libsvn_client/checkout.c
===================================================================
--- subversion/libsvn_client/checkout.c (revision 7930)
+++ subversion/libsvn_client/checkout.c (working copy)
@@ -82,9 +82,8 @@
SVN_ERR (svn_ra_get_ra_library (&ra_lib, ra_baton, URL, pool));
/* Open an RA session to URL. Note that we do not have an admin area
- for storing temp files. We do, however, want to store auth data
- after the checkout builds the WC. */
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, path,
+ for storing temp files. */
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, URL, NULL,
NULL, NULL, FALSE, TRUE,
ctx, pool));
Index: subversion/libsvn_client/cat.c
===================================================================
--- subversion/libsvn_client/cat.c (revision 7930)
+++ subversion/libsvn_client/cat.c (working copy)
@@ -48,7 +48,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));
@@ -61,10 +60,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 7930)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -1207,7 +1207,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)
@@ -1218,12 +1217,10 @@
"Not all required revisions specified");
}
- 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. */
@@ -1238,7 +1235,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));
@@ -1288,7 +1285,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)
{
@@ -1297,7 +1293,7 @@
apr_file_t *fp;
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,
@@ -1332,9 +1328,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));
@@ -1342,11 +1335,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 */
@@ -1531,7 +1524,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;
@@ -1552,14 +1544,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));
@@ -1607,10 +1597,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.
@@ -1681,7 +1671,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. */
@@ -1706,9 +1695,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 7930)
+++ 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;
@@ -356,13 +355,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
@@ -586,7 +582,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
@@ -686,9 +681,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;
@@ -747,20 +741,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 7930)
+++ 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));
@@ -128,7 +125,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/blame.c
===================================================================
--- subversion/libsvn_client/blame.c (revision 7930)
+++ subversion/libsvn_client/blame.c (working copy)
@@ -326,7 +326,6 @@
svn_ra_plugin_t *ra_lib;
void *ra_baton, *session;
const char *url;
- const char *auth_dir;
svn_revnum_t start_revnum, end_revnum;
struct blame *walk;
apr_file_t *file;
@@ -354,9 +353,7 @@
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, FALSE,
ctx, pool));
@@ -403,7 +400,7 @@
if (! lmb.eldest)
return SVN_NO_ERROR;
- SVN_ERR (svn_client__open_ra_session (&session, ra_lib, reposURL, auth_dir,
+ SVN_ERR (svn_client__open_ra_session (&session, ra_lib, reposURL, NULL,
NULL, NULL, FALSE, FALSE,
ctx, pool));
Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c (revision 7930)
+++ 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/add.c
===================================================================
--- subversion/libsvn_client/add.c (revision 7930)
+++ subversion/libsvn_client/add.c (working copy)
@@ -406,7 +406,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;
@@ -477,11 +476,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 Thu Dec 4 12:50:09 2003