You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2012/10/06 16:43:46 UTC
svn commit: r1395075 - /subversion/trunk/subversion/libsvn_client/add.c
Author: rhuijben
Date: Sat Oct 6 14:43:45 2012
New Revision: 1395075
URL: http://svn.apache.org/viewvc?rev=1395075&view=rev
Log:
Following up on r1395052, another attempt to fix a symlink test.
* subversion/libsvn_client/add.c
(svn_client_add4): Unset is_wc_root when we find a symlink. Update comments.
Modified:
subversion/trunk/subversion/libsvn_client/add.c
Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=1395075&r1=1395074&r2=1395075&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Sat Oct 6 14:43:45 2012
@@ -681,11 +681,9 @@ svn_client_add4(const char *path,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
/* See if we're being asked to add a wc-root. That's typically not
- okay, unless we're in "force" mode. We'll check the node kind
- first, because wc-roots must be directories. But also,
- svn_wc_is_wc_root2() will return TRUE even if LOCAL_ABSPATH is a
- *symlink* to a working copy root, which is a scenario we want to
- treat differently. */
+ okay, unless we're in "force" mode. svn_wc__strictly_is_wc_root()
+ will return TRUE even if LOCAL_ABSPATH is a *symlink* to a working
+ copy root, which is a scenario we want to treat differently. */
err = svn_wc__strictly_is_wc_root(&is_wc_root, ctx->wc_ctx,
local_abspath, pool);
if (err)
@@ -709,8 +707,11 @@ svn_client_add4(const char *path,
SVN_ERR(svn_io_check_special_path(local_abspath, &disk_kind, &is_special,
pool));
- /* A symlink can be an unversioned target and a wcroot */
- if (! is_special)
+ /* A symlink can be an unversioned target and a wcroot. Lets try to add
+ the symlink, which can't be a wcroot. */
+ if (is_special)
+ is_wc_root = FALSE;
+ else
#endif
return svn_error_createf(SVN_ERR_ENTRY_EXISTS, NULL,
_("'%s' is already under version control"),