Checkout
Stefan Sperling
committed
on 17 Feb 12
For issues #4102 and #4120, both describing problems with symlinks
pointing to externals with various operations (add/status/diff and more),… Show more
For issues #4102 and #4120, both describing problems with symlinks

pointing to externals with various operations (add/status/diff and more),

change the way we resolve working copy roots for symlinks.

* subversion/libsvn_wc/wc_db_private.h

 (svn_wc__db_t): Use svn_kind_t rather than svn_node_kind_t in the

  parse cache. This allows symlinks to be represented.

* subversion/libsvn_wc/wc_db_wcroot.c

 (get_path_kind): Return svn_kind_t instead of svn_node_kind_t. This allows

  symlinks to be represented. This function used to force symlinks to always

  be treated like directories, which prevents symlinks pointing to externals

  from being handled as part of the external's parent working copy.

 (svn_wc__db_wcroot_parse_local_abspath): If we locate a wcroot via a

  symlink that points to a directory, first treat the symlink like a

  normal file, i.e. walk upwards from the symlink's parent dir.

  If we find a db, and the symlink is versioned in it, use this DB.

  Else, try again, this time treating the symlink like a directory,

  which means we'll find a nested wcroot in case the symlink points

  to a nested working copy (e.g. an external).

  This strategy allows versioned symlinks pointing to externals to work

  within the external's parent wc, and also allows unversioned symlinks

  to point to nested WCs (this is required for our test suite).

  I had to introduce a 'goto' here to avoid major refactoring :(

  This function should probably be refactored in a later commit

  to get rid of the 'goto'.

* subversion/tests/cmdline/special_tests.py

 (externals_as_symlink_targets): Remove XFail marker.

Show less