On Mar 12, 2010, at 15:47, Les Mikesell wrote: > On 3/12/2010 3:14 PM, Ryan Schmidt wrote: >> >> On Mar 12, 2010, at 14:43, Les Mikesell wrote: >> >>> What should happen to things that are added to a working copy some other >>> way but aren't managed by subversion? I don't think you want them deleted >>> on an update. After you've removed an external, how is subversion supposed >>> to tell the difference between something it put there from the earlier >>> external reference and something you copied in yourself? >> >> "By keeping track of it," of course. It seems the fact that Subversion >> doesn't keep track of it is the bug. > > But the point of externals is that they are kept track of somewhere else, not > in the parent repo. When you break the linkage to that 'somewhere else', how > are you supposed to know anything about the contents.
Off the top of my head, Subversion could notice when you commit a change in the svn:externals property. If the svn:externals property used to pull an external into the directory foo, and you change the property so this no longer happens (including deleting the property), Subversion could check if the directory foo exists, and if so, if it is a working copy of the URL the external definition used to point to. If so, it could do what it does any other time it removes a directory: remove the files if they're not modified, keep them if they are (or are unversioned), delete empty directories. That would be for the user doing the commit that changes or removes the external. For users updating, Subversion could notice the change in svn:externals on update, and act accordingly.