[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Potential fix for issue #2173: Symlinks aren't ignored under Windows

From: Josh Pieper <jjp_at_pobox.com>
Date: 2005-03-18 14:10:55 CET

Could someone with a working Windows development environment test out
this patch and see if it fixes #2173? See the issue for a detailed
repro recipe, but basically you need to commit a symlink under unix,
then try and check it out under Windows. The untranslated file will
be in your working copy, but all other commands should work fine.

Thanks,
-Josh

-----------------------------------------

Fix issue #2173: Symlinks aren't properly ignored on Windows.

Ignore a file changing from special to non-special status if the
underlying file system cannot support special files. Use a test for
symlink support since they are the only currently supported special
file.

* subversion/libsvn_wc/status.c
  (assemble_status): Check for symlink support before declaring
    conflicts on files that have svn:special but are not special on
    disk.

* subversion/libsvn_client/commit_util.c
  (harvest_committables): Use the same symlink support check before
    throwing a commit error because of changed special type.

Index: subversion/libsvn_wc/status.c
===================================================================
--- subversion/libsvn_wc/status.c (revision 13471)
+++ subversion/libsvn_wc/status.c (working copy)
@@ -306,7 +306,11 @@
       SVN_ERR (svn_wc__get_special (&wc_special, path, adm_access, pool));
 
       /* If the entry is a file, check for textual modifications */
- if ((entry->kind == svn_node_file) && (wc_special == node_special))
+ if ((entry->kind == svn_node_file)
+#ifdef HAVE_SYMLINK
+ && (wc_special == node_special)
+#endif /* HAVE_SYMLINK */
+ )
         SVN_ERR (svn_wc_text_modified_p (&text_modified_p, path, FALSE,
                                          adm_access, pool));
 
@@ -386,8 +390,11 @@
         }
       else if (path_kind != entry->kind)
         final_text_status = svn_wc_status_obstructed;
- else if ((wc_special && (! node_special))
- || ((! wc_special) && (node_special)))
+ else if (((! wc_special) && (node_special))
+#ifdef HAVE_SYMLINK
+ || (wc_special && (! node_special))
+#endif /* HAVE_SYMLINK */
+ )
         final_text_status = svn_wc_status_obstructed;
 
       if (path_kind == svn_node_dir && entry->kind == svn_node_dir)
Index: subversion/libsvn_client/commit_util.c
===================================================================
--- subversion/libsvn_client/commit_util.c (revision 13471)
+++ subversion/libsvn_client/commit_util.c (working copy)
@@ -230,9 +230,11 @@
   SVN_ERR (svn_wc_prop_get (&propval, SVN_PROP_SPECIAL, path, adm_access,
                             pool));
 
- if ((((! propval) && (is_special)) ||
- ((propval) && (! is_special))) &&
- (kind != svn_node_none))
+ if ((((! propval) && (is_special))
+#ifdef HAVE_SYMLINK
+ || ((propval) && (! is_special))
+#endif /* HAVE_SYMLINK */
+ ) && (kind != svn_node_none))
     {
       return svn_error_createf
         (SVN_ERR_NODE_UNEXPECTED_KIND, NULL,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 18 14:12:12 2005

This is an archived mail posted to the Subversion Dev mailing list.