Reputation: 714
This ought to be simple, but somehow I can't figure it out:
I updated to the next-to-last revision, let's say revision 100 (HEAD is at 101), like this: svn up -r 100
. Then I made various changes, and now I want the modified files to be checked in as revision 102 (just so I can get back to 101 if needs be). How do I do that? If I simply do an svn commit
I get an "out of date" error. I can't do svn up
either to fix the out-of-date problem because I don't want any of the changes in HEAD (101) to come back...
Upvotes: 3
Views: 4386
Reputation: 6206
In order to undo the changes of a previous commit, you should use svn merge
, not svn up
:
Instead of svn up -r100
, check out the HEAD revision and do svn merge -c -101 .
That results in the same content in your local files, but now subversion will no longer try to reapply revision 101's changes before allowing you to commit.
See also the svn manual on undoing changes.
Upvotes: 2
Reputation: 46
Save your changed files to a temp folder. Rename local repository for backup. Create new local repository. Paste code changes back into files that were copied to temp folder. Commit.
You might want to do a KDiff to confirm all changes are correct before committing.
Hope this helps this problem.
Upvotes: 3