Search code examples
svnphpstorm

How to revert SVN commit in PhpStorm


I made a SVN commit with a wrong message and the SVN server obviously does not support comment editing. So I thought I could generate a "revert" commit and then re-commit with the appropriate message.

Since I don't have any command line SVN client (I use PhpStorm SVN plugin), I'm wondering if it's somehow possible to generate this revert commit in PhpStorm.


Solution

  • Since my commit involves many files, I didn't use barmar's answer (which is perfectly acceptable for single-file commits), but I used patches instead:

    1. create a reverse patch AND a non-reverse patch for the wrong commit (right click > Create patch)
    2. apply the reverse patch
    3. commit with a message like "Reverse previous commit (wrong message - stupid me)"
    4. apply the non-reverse patch
    5. commit with the appropriate message