[llvm-dev] How to revert a change properly

Don Hinton via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 26 01:56:46 PDT 2019


Hi Xing:

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...

hth...
don

On Tue, Mar 26, 2019 at 12:08 AM Xing GUO via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi folks,
>
> Several days ago, I made a bad change in llvm, and I reverted it using
> following command
> ```
> $ svn merge -r <bad change revision>:<previous revision>
> ```
> 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?
>
> Best Regards,
> Xing
>
> _______________________________________________
> 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/20190326/ad90149b/attachment.html>


More information about the llvm-dev mailing list