tags:

views:

35

answers:

2

So I recently had a tree conflict when trying to merge a branch into the trunk. This cascaded into a series of events in which I scrambled to try and fix the issue, but now just can't really do anything (things won't commit, things won't update, etc.)

How can I just say, okay -- go back to here and start fresh, or what other techniques can I use to get myself out of this situation. I realize I haven't provided much detail, but all I really know at this point is that I screwed up, badly (No need to worry about other developers working on it, I'm only one).

+1  A: 

Exactly how you do it depends on your tools. The thing about Subversion is that you always have your history, so you're never totally and completely hosed. I'll assume you're using Tortoise.

The first thing is to check out a new, fresh copy somewhere else. Next, inside that directory do a "Show Log" command. Right-click on the history item which has the last "un-screwed up" version of your code and select "Revert to this Revision". It will then warn you that you're going to do a reverse merge back into your working copy. That's fine. Accept it. After reverting, verify your code works, and you can commit once again, and you're back to where you started.

Dave Markle
Tried, but when I try to commit it doesn't recognize the files added back in.
person
Really, it's quite scary. I simply can't commit files, it doesn't recognize them as new files, even though they are not in the repository.
person
And did you do an "svn add" on these new files?
Dave Markle
Ended up just moving to git.
person
A: 
svn resolve --accept working

often brings subversion repositories back to life.

zellus