a) Update your local copy of the code base to the latest revision.
b) Merge the previous revision to your current code base.
svn merge -rHEAD:xxxx [svn-repository-url] [path-to-local-copy]
- HEAD – indicates the revision of the local copy of the code is the latest revision.
- xxxx – is the revision which want to rollback.
- [svn-repository-url] - is the project's URL in SVN repository
- [path-to-local-copy] - is the path to the local copy of the project
svn merge -rHEAD:1010 https://repo.example.org/project1/trunk /home/sanka/project1/trunk
c) Commit the changes which occurs as a result of above steps.
7 comments:
In my case svn skips all the files and the reversion doesn't work :-(
I had the same problem. I was attempting to rollback commits incorrectly made to a tag. My working copy was linked to the repository base for this project (we have many projects in a single repository) not to a specific branch, tag or trunk. After creating a new working copy linked directly to the tag in question I was able to rollback as directed in the original post.
Thanks for this good article!
It really helps ;)
Thanks ! you save my day !
One should not use -r HEAD in the command line option if somebody else is doing commits at the same time, you may or may not revert it. Always use a fixed revision number instead.
Hi,
You help me a lot, thanks for your advice.
I do it with tortoise SVN client with
Merge / Merge two differents trees / From Head revsion - To specific revision / Merge.
Thanks a lot.
François (Belgium)
Thanks!
Post a Comment