Jordan Rupprecht via llvm-dev
2019-Mar-28 16:29 UTC
[llvm-dev] 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 <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>
Xing GUO via llvm-dev
2019-Mar-28 16:47 UTC
[llvm-dev] New git revert workflow for github repo
Hi, I think it would be great to document "how to revert a patch" in `GettingStarted` page. Best Regards, Xing On Fri, Mar 29, 2019 at 12:30 AM Jordan Rupprecht via llvm-dev < llvm-dev at lists.llvm.org> wrote:> 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 > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190329/2d5e669b/attachment.html>