New git revert workflow for github repo

Hi all,
Last week I had to revert a change during my build cop shift, and discovered the usual script I used, git-svnrevert, only works w/ git-svn repos, and not the pure github repo, meaning I had to:

  1. Find the git commit hash I needed to revert (given the svn revision that broke it)
  2. Run “git revert” myself, and then I forgot to include the svn id (the git revert default message just includes the git commit hash, and I forgot to change that)

It doesn’t make sense to do that manually, so I committed r357180 to make a new git subcommand do that: “git llvm revert r123456” should now work. “git llvm revert -n r123456” will do nothing but print the commands (if you don’t trust it yet). Also, since it might be useful outside of the revert flow, a second subcommand “git llvm svn-lookup ” will pull the svn id out of the git commit message.

If you’re developing with the pure github repo (not the git-svn method, and not the even older pure-svn method), please try it out next time you have to revert. Patches welcome if you think something could be improved.

– Jordan

Hi,

I think it would be great to document “how to revert a patch” in GettingStarted page.