On Sat, Aug 24, 2013 at 09:04:48PM +0200, Stefan Sperling claimed:
>On Sat, Aug 24, 2013 at 10:22:41AM -0500, Les Mikesell wrote:
>> Don't forget that it was subversion, not the user, that created the
>> directory and abandoned it in the first place.
>
>If a previously versioned directory is left behind unversioned, that
>means there are unversioned (aka obstructing) nodes within the
>directory, such as files created during a build. Those files could
>not have been created by svn.
>
>I hope that we will eventually extend tree conflict handling to the
>point where it makes these kinds of situations trivial to resolve,
>even for novice users. svn should interactively offer a set of
>reasonable courses of action, such as removing the unversioned nodes,
>or moving them to a special lost+found area, or something else that
>allows incoming versioned nodes to be created in their place.

That's just overcomplicating the issue. This doesn't even need to
become a tree conflict. There seems to be confusion about what is
actually needed to solve the OP's original problem and to make svn
switch symmetric. I've attached a simple patch which solves the issue in
the method that I proposed. I've tested it manually and it's fine, but
I haven't run it through the test suite and haven't covered the
directory permission difference case. I'm not sure it is even desirable
to check the directory permissions.

-- 
Travis
[[[
If an unversioned directory exists when an versioned directory of the same name
is incoming, don't create a tree conflict. Instead coopt the existing directory
and all the unversioned objects within.

* subversion/libsvn_wc/update_editor.c
  (add_directory): Don't consider a pre-existing, unversioned directory a
   conflict.

Patch by: Travis Brown <trav...@travisbrown.ca>

]]]
Index: unversioned_dir/subversion/libsvn_wc/update_editor.c
===================================================================
--- unversioned_dir.orig/subversion/libsvn_wc/update_editor.c
+++ unversioned_dir/subversion/libsvn_wc/update_editor.c
@@ -2250,7 +2250,7 @@ add_directory(const char *path,
       else
         db->shadowed = TRUE; /* Only update BASE */
     }
-  else if (kind != svn_node_none)
+  else if (kind != svn_node_none && kind != svn_node_dir)
     {
       /* There's an unversioned node at this path. */
       db->obstruction_found = TRUE;

Attachment: pgpl5a2xxoNdU.pgp
Description: PGP signature

Reply via email to