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 15:38:09 UTC

svn commit: r1395052 - /subversion/trunk/subversion/libsvn_client/add.c

Author: rhuijben
Date: Sat Oct  6 13:38:09 2012
New Revision: 1395052

URL: http://svn.apache.org/viewvc?rev=1395052&view=rev
Log:
Following up on r1395027, try to resolve a symlink case.

* subversion/libsvn_client/add.c
  (svn_client_add4): When the target of an add is a symlink don't use the
    result of the is wcroot check. This automatically documents this
    specific case which was hidden by the previous check for directories added
    in r1394748.

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=1395052&r1=1395051&r2=1395052&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Sat Oct  6 13:38:09 2012
@@ -702,9 +702,19 @@ svn_client_add4(const char *path,
     }
   if (is_wc_root && (! force))
     {
-      return svn_error_createf(SVN_ERR_ENTRY_EXISTS, NULL,
-                               _("'%s' is already under version control"),
-                               svn_dirent_local_style(local_abspath, pool));
+#ifdef HAVE_SYMLINK
+      svn_node_kind_t disk_kind;
+      svn_boolean_t is_special;
+
+      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)
+#endif
+        return svn_error_createf(SVN_ERR_ENTRY_EXISTS, NULL,
+                                 _("'%s' is already under version control"),
+                                 svn_dirent_local_style(local_abspath, pool));
     }
   
   /* ### this is a hack.