Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Assembla repository and I use Tortoise SVN.

The files and versions are a mess so I wanted to go back to an older version. I used the option "Checkout SVN" to get that version in my computer.

Now I want to transfer everything I have on my computer to the repository (and the delete the stuff that is there).

I could erase everything in the repository but I don't want to lose the info, the versions, etc.

I tried doing Commit but the option to transfer the files that you didn't modify isn't there.

share|improve this question
up vote 0 down vote accepted

When you check out a specific version from repository and try to commit it, you might expect that that revision becomes the HEAD, however that's not the case. You can only commit modified files, regardless of the version you checked out. Of course one hack to do it is checking out the latest version, checking out the revision you want to go back, copying all files from the revision on to latest version, rewriting the existing files and doing the commit later.

However, the correct way to do it is to do a reverse merge. Assume you need to go back to revision 300. Check out the latest version into a directory. On that directory, select Merge from Tortoise SVN menu. Select the first option, Merge a range of revisions. Select the repository URL of your checked out directory. Check Reverse merge. For the Revision range to merge, write 300-HEAD. Select Fully Recursive as Merge Depth and do the Merge.

This will effectively do a reverse merge which is basically undoing all changes back to version 300, but manually. Your working copy is not reverted to version 300, You are at the latest revision, with files modified to content of version 300. You will be able to commit the working copy as a new revision. Please remember to check the merged version in your working copy, if necessary check out revision 300 to another directory and use diff to verify that the files have desired content.

share|improve this answer
Thanks. I did checkout in another folder and deleted everything. Then I copied all those files to that folder and used Commit. Thanks! – user1766833 Dec 22 '12 at 21:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .