However, this command seemed not working properly. I would like to know, what’s the right way to revert a bad change. I notice that there are some reverting change with proper message, e.g. “Revert: [some tag] commit message”. Shall I type this message manually? Or is there some useful tool that I could use?
There’s too much activity to automatically revert anything, so you need to commit a new change that effectively reverts the original patch – keeping in mind that someone else might have changed some of the same files, and/or lines, in the interim. Here’s how I do it.
Update your local master, and extract the change using svn diff or git diff to a patch file. Then use patch to apply it locally, using the ‘-R’ flag for reverse, and fix any merge conflicts. If your tests run clean, update your source one last time just in case, then commit with a new message indicating that you reverted it with a note on why, etc…
The “Revert [tag] message” is the default message generated by the ‘git revert’ command. Of course you would have to be using a git clone of LLVM instead of an SVN checkout in order to run ‘git revert’. This command is the equivalent of ‘svn merge –r’ run from the top-level directory. I believe svn commands will operate only on the directories below the current working directory, so I speculate that you ran the svn command from the lib subdirectory instead of from the top level, and thus missed the tests that were part of your original commit.