1

I deleted and ignored from svn a folder I thought was user specific (nbproject if you're interested).

This was careless, it turned out I was wrong, so in a panic to avoid causing a mess, I undid the ignore, added the folder and committed.

This was more careless, I realized I had added a "new" folder in the place the old one was. This caused a merge conflict with anyone who subsequently updated. This folder gets a lot of changes, and I might have had changes in my own version of it, so a messy conflict is guaranteed for everyone, since it is unclear which changes are worth keeping.

What can I do to avoid causing this tree conflict for everyone using the svn?

I'm sure merging will be involved, but I can't figure out how to merge the previous folder over, ordinary merging doesn't seem to work (it doesn't help that I have no experience, and most docs seem to be for simple situations).

I'm tempted to delete the folder again and then merge, but I'm not sure if that would cause a bigger mess.

Any suggestions would be appreciated, including links to relevant questions, I'm not knowledgeable enough to recognize where an answer would be applicable to this situation. I'm assuming the abundant "I got a conflict on merging" questions are not however, I couldn't find anything useful among them.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Finn
  • 45
  • 4

1 Answers1

1

I also find that svn conflicts involving deleted files can sometimes get mind-boggling.

When I have them, I just backup my "good" local version (excluding the .svn directory), delete the infected directory, and fetch it again using svn update (or svn checkout, whichever is appropriate in your case). I then merge my files back (merging common files, and deleting the ones I intended to delete in the first place, if any).

This is probably not the most elegant way (or is it?), but it is simple and safe.

shx2
  • 61,779
  • 13
  • 130
  • 153
  • The problem with this is everyone on the svn will have to do it. I'd prefer a solution that avoided that (ie, undoing my original mistake). I've linked this question in the email I've sent them, so they'll see your answer, but hopefully they won't need it. – Finn Mar 12 '13 at 18:21
  • If you fix what you did, locally, using the method described, and then commit all your changes (and your local copy is up to date according to `svn status`), and as long as they didn't make any conflicting changes in their local copies, they can just `svn update` and get the corrected version. – shx2 Mar 12 '13 at 19:03
  • Ah, I missed your point. That indeed fixed things. Deleting it is the only couter-intuitive bit, but I get it now. Thanks. – Finn Mar 12 '13 at 20:34