Author: stsp
Date: Fri Feb 24 05:05:56 2012
New Revision: 1293080
URL: http://svn.apache.org/viewvc?rev=1293080&view=rev
Log:
On the 1.7.x-issue4102 branch, only perform the symlinkness-check for the
root of the status tree, rather than for every node.
Found by: rhuijben
* subversion/libsvn_wc/status.c
(get_dir_status): Stop checking if this-dir is a symlink.
(svn_wc__internal_walk_status): Perform the check here instead, on the
root node of the status tree.
Modified:
subversion/branches/1.7.x-issue4102/subversion/libsvn_wc/status.c
Modified: subversion/branches/1.7.x-issue4102/subversion/libsvn_wc/status.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4102/subversion/libsvn_wc/status.c?rev=1293080&r1=1293079&r2=1293080&view=diff
==============================================================================
--- subversion/branches/1.7.x-issue4102/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/1.7.x-issue4102/subversion/libsvn_wc/status.c Fri Feb
24 05:05:56 2012
@@ -1111,38 +1111,13 @@ get_dir_status(const struct walk_status_
{
/* Handle "this-dir" first. */
if (! skip_this_dir)
- {
-#ifdef HAVE_SYMLINK
- if (dirent->special)
- {
- svn_io_dirent2_t *this_dirent = svn_io_dirent2_dup(dirent,
- iterpool);
-
- /* We're being pointed to "this-dir" via a symlink.
- * Get the real node kind and pretend the path is not a symlink.
- * This prevents send_status_structure() from treating this-dir
- * as a directory obstructed by a file. */
- SVN_ERR(svn_io_check_resolved_path(local_abspath,
- &this_dirent->kind,
iterpool));
- this_dirent->special = FALSE;
- SVN_ERR(send_status_structure(wb, local_abspath,
- parent_repos_root_url,
- parent_repos_relpath,
- parent_repos_uuid,
- dir_info, this_dirent, get_all,
- status_func, status_baton,
- iterpool));
- }
- else
-#endif
- SVN_ERR(send_status_structure(wb, local_abspath,
- parent_repos_root_url,
- parent_repos_relpath,
- parent_repos_uuid,
- dir_info, dirent, get_all,
- status_func, status_baton,
- iterpool));
- }
+ SVN_ERR(send_status_structure(wb, local_abspath,
+ parent_repos_root_url,
+ parent_repos_relpath,
+ parent_repos_uuid,
+ dir_info, dirent, get_all,
+ status_func, status_baton,
+ iterpool));
/* If the requested depth is empty, we only need status on this-dir. */
if (depth == svn_depth_empty)
@@ -2408,6 +2383,28 @@ svn_wc__internal_walk_status(svn_wc__db_
SVN_ERR(svn_io_stat_dirent(&dirent, local_abspath, TRUE,
scratch_pool, scratch_pool));
+#ifdef HAVE_SYMLINK
+ if (dirent->special && !skip_root)
+ {
+ svn_io_dirent2_t *this_dirent = svn_io_dirent2_dup(dirent,
+ scratch_pool);
+
+ /* We're being pointed to the status root via a symlink.
+ * Get the real node kind and pretend the path is not a symlink.
+ * This prevents send_status_structure() from treating the root
+ * as a directory obstructed by a file. */
+ SVN_ERR(svn_io_check_resolved_path(local_abspath,
+ &this_dirent->kind, scratch_pool));
+ this_dirent->special = FALSE;
+ SVN_ERR(send_status_structure(&wb, local_abspath,
+ NULL, NULL, NULL,
+ dir_info, this_dirent, get_all,
+ status_func, status_baton,
+ scratch_pool));
+ skip_root = TRUE;
+ }
+#endif
+
SVN_ERR(get_dir_status(&wb,
anchor_abspath,
target_name,