You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/02/17 21:27:35 UTC
svn commit: r1245746 - /subversion/trunk/subversion/libsvn_wc/status.c
Author: stsp
Date: Fri Feb 17 20:27:34 2012
New Revision: 1245746
URL: http://svn.apache.org/viewvc?rev=1245746&view=rev
Log:
For issues #4102 and #4120, fix another symlink regression that is
present in 'svn status' since 1.7. If the status root node is a symlink
pointing to an external, it would be shown as obstructed.
* subversion/libsvn_wc/status.c
(get_dir_status): If the root node of the status walk is a symlink,
resolve the real on-disk kind before sending the status for the root
node. This prevents the root node from being considered a file that
obstructs a directory.
Modified:
subversion/trunk/subversion/libsvn_wc/status.c
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1245746&r1=1245745&r2=1245746&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Fri Feb 17 20:27:34 2012
@@ -1318,13 +1318,37 @@ get_dir_status(const struct walk_status_
/* Handle "this-dir" first. */
if (! skip_this_dir)
- 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));
+ {
+#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));
+ }
/* If the requested depth is empty, we only need status on this-dir. */
if (depth == svn_depth_empty)