riv
riv

Reputation: 7343

SVN deleted my local changes after resolve

I did an update, which created conflict files. I decided to ignore those files, and proceeded to edit my main file, adding a lot of extra content to it.

Then, as it won't let me commit without resolving changes, I did a resolve and told it to keep my local changes. Well guess what, it just overwrote my local file that I've been editing with whatever I had there before. Is there any way to get my work back?

Upvotes: 0

Views: 182

Answers (1)

Dialecticus
Dialecticus

Reputation: 16779

There is no way to recover from this involving anything from SVN. Unless your editor made an automatic backup the changes are probably lost. If you go to file's properties there's a tab "Previous versions", but chances that there is a version there that kept your changes are about 0.01%.

Maybe some file recovery tool could help you. But don't make changes to the disk, including browsing the internet if temporary internet folder is on the same partition.

Lesson to learn here: resolve conflicts immediately. Second lesson: next time if you make changes to the conflicted file (edit the parts around <<<<<<<, =======, and >>>>>>>, and remove those markers) you have to flag the file as resolved, which should just delete the helper files (filename.ext.mine, filename.ext.rOLDREV, filename.ext.rNEWREV). In TortoiseSVN this is done in menu TortoiseSVN > Resolved. With svn this is done with svn resolve --accept working.

Upvotes: 1

Related Questions