[llvm-dev] New git revert workflow for github repo

Jordan Rupprecht via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 28 09:29:52 PDT 2019

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 <git-hash>" 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190328/aa42bd16/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4849 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190328/aa42bd16/attachment.bin>

More information about the llvm-dev mailing list