Index: subversion/include/svn_wc.h =================================================================== --- subversion/include/svn_wc.h (revision 17993) +++ subversion/include/svn_wc.h (working copy) @@ -194,13 +194,13 @@ /** * Checks the working copy to determine the node type of @a path. If - * @a path is a versioned directory then the behaviour is like that of - * svn_wc_adm_open3(), otherwise, if @a path is a file or does not - * exist, then the behaviour is like that of svn_wc_adm_open3() with - * @a path replaced by the parent directory of @a path. If @a path is - * an unversioned directory, the behaviour is also like that of - * svn_wc_adm_open3() on the parent, except that if the open fails, - * then the returned SVN_ERR_WC_NOT_DIRECTORY error refers to @a path, + * @a path is a versioned directory or a symlink to wc root directory then + * the behaviour is like that of svn_wc_adm_open3(), otherwise, if @a path + * is a file or does not exist, then the behaviour is like that of + * svn_wc_adm_open3() with @a path replaced by the parent directory of + * @a path. If @a path is an unversioned directory, the behaviour is also + * like that of svn_wc_adm_open3() on the parent, except that if the open + * fails, then the returned SVN_ERR_WC_NOT_DIRECTORY error refers to @a path, * not to @a path's parent. * * @since New in 1.2. Index: subversion/libsvn_wc/lock.c =================================================================== --- subversion/libsvn_wc/lock.c (revision 17993) +++ subversion/libsvn_wc/lock.c (working copy) @@ -681,7 +681,23 @@ int wc_format; SVN_ERR (probe (&dir, path, &wc_format, pool)); + if (wc_format == 0) + { + svn_wc_adm_access_t *wc_adm; + err = svn_wc_adm_open3 (&wc_adm, associated, path, FALSE, + 0, cancel_func, cancel_baton, pool); + if (!err) + { + svn_boolean_t wc_root; + + SVN_ERR (svn_wc_is_wc_root (&wc_root, path, wc_adm, pool)); + if (wc_root) + dir = path; + } + svn_error_clear (err); + } + /* If we moved up a directory, then the path is not a directory, or it is not under version control. In either case, the notion of a depth does not apply to the provided path. Disable it so that we don't end Index: subversion/tests/cmdline/special_tests.py =================================================================== --- subversion/tests/cmdline/special_tests.py (revision 17993) +++ subversion/tests/cmdline/special_tests.py (working copy) @@ -355,6 +355,24 @@ None, None, None, None, wc_dir) +def info_symlink(sbox): + "info on wc symlink root" + + sbox.build() + wc_dir = sbox.wc_dir + + # create a new symlink + wc_dir_symlnk = os.path.join(os.path.dirname(wc_dir), sbox.name+'_symlnk') + if os.path.islink(wc_dir_symlnk) or os.path.exists (wc_dir_symlnk): + os.remove (wc_dir_symlnk) + os.symlink(sbox.name, wc_dir_symlnk) + + output, err = svntest.actions.run_and_verify_svn(None, None, [], 'info', + wc_dir_symlnk) + if output[0].find(sbox.name) == -1: + raise svntest.Failure + + ######################################################################## # Run the tests @@ -367,6 +385,7 @@ Skip(copy_tree_with_symlink, (os.name != 'posix')), Skip(replace_symlink_with_file, (os.name != 'posix')), Skip(remove_symlink, (os.name != 'posix')), + Skip(info_symlink, (os.name != 'posix')), ] if __name__ == '__main__':