The current git-svnrevert script only works with git-svn repos (e.g. using "git svn find-rev" to find the commit to revert). This adds a similar implementation that works with the llvm git command handler.
Usage:
// Revert by svn id $ git llvm revert r123456 // Forgetting the 'r' is fine $ git llvm revert 123456 // Git commit hash also fine $ git llvm revert abc123456 // Push revert upstream (drop the -n) $ git llvm push -n
Regardless of how the command is invoked (with a svn revision or git hash), the message is:
Revert [LibFoo] Change Foo implementation This reverts r123456 (git commit abc123)
This should search for "^llvm-svn: ...", in re.MULTILINE mode, so it's not confused by "fake" revisions.
See for example, 13c4bc567150f98adb0209aab16cc6d9ba369c7f. The first "> llvm-svn: 355168" came from the user's description committed to svn, since they copied it from the previous attempt. Thus it had a "> " inserted before it by the conversion script.