Search code examples
svngoogle-code

Reverting master version in GC/SVN to a early version (i.e., removing bad versions and starting over)


So someone on our team was using TortoiseSVN and made some ten commitments in five minutes (without comments, natuerlich), after which our software stopped working properly. The rest of us were making commitments in command line, and no problems happened. I think he was doing things he wasn't aware of, and now we have a cluster of problems we can't seem to resolve. It was working perfectly at r29, and when one reverts one's local copy to r29, the software behaves as expected. I won't right now detail all the ways we've tried to solve this problem, but we've so far failed to commit r29 to a new version. All the commands about reverting don't seem to work with making a NEW version, and the support doesn't seem relevant when there are major changes to the filesystem.

So can you tell me how to checkout an old version and commit it as the latest version?


Solution

  • You can go back to r29 by performing this merge command in a clean working directory (with no files changed):

    svn merge -rHEAD:29 .
    svn commit -m'rolling back to -r29.'
    

    What this means is "create a patch formed by the difference between HEAD (latest) and -r29, and apply that patch here." This effectively reverses all the changes performed since -r29.