Hi,
It seems that svn doesn't handle reparse points properly in all
situations. Which causes big problems for TSVN when a working copy is on
a Onedrive folder.
See here for more details:
https://groups.google.com/d/msg/tortoisesvn/hlQj5OifhBg/RX_cw_sQCgAJ
While in this particular situation, other svn clients are not affected,
it still means that there's a problem.
I've attached a patch for handling reparse points better when detecting
and reading the working copy database. With this change, the TSVN
context menu shows up properly.
But while I was trying to figure out this particular problem I noticed
that svn_io_check_path() never tries to resolve the reparse points. Why
is that? I mean if we need to check for links/reparse-points there's
svn_io_check_special_path(). Also, svn_io_check_path() always returns
node_file for reparse points, even if they point to directories.
IMHO handling links/reparse-points specially is only required in very
specific situations, like adding them. In most cases, resolving the
links/reparse points is what should be done. Or am I missing something
big here?
Stefan
Index: subversion/libsvn_wc/wc_db_wcroot.c
===================================================================
--- subversion/libsvn_wc/wc_db_wcroot.c (revision 1831872)
+++ subversion/libsvn_wc/wc_db_wcroot.c (working copy)
@@ -554,6 +554,11 @@
### into wc_db which references a file. calls for directories could
### get an early-exit in the hash lookup just above. */
SVN_ERR(get_path_kind(&kind, db, local_abspath, scratch_pool));
+ if (kind == svn_node_symlink)
+ {
+ /* if this is a symlink, try to get the real node kind */
+ SVN_ERR(svn_io_check_resolved_path(local_abspath, &kind, scratch_pool));
+ }
if (kind != svn_node_dir)
{
/* If the node specified by the path is NOT present, then it cannot
@@ -622,7 +627,7 @@
const char *adm_subdir = svn_dirent_join(local_abspath, adm_relpath,
scratch_pool);
- SVN_ERR(svn_io_check_path(adm_subdir, &adm_subdir_kind, scratch_pool));
+ SVN_ERR(svn_io_check_resolved_path(adm_subdir, &adm_subdir_kind,
scratch_pool));
if (adm_subdir_kind == svn_node_dir)
{