[llvm-dev] Applying patches from Phabricator?

Jinsong Ji via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 9 07:37:05 PDT 2020

Try using patch instead of git (due to fuzz)

 $ patch -p1 < D77421.diff
patching file llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
Hunk #1 succeeded at 454 (offset -46 lines).
Hunk #2 succeeded at 486 with fuzz 1 (offset -47 lines).
Hunk #3 succeeded at 1278 (offset -142 lines).
Hunk #4 succeeded at 1321 (offset -142 lines).
patching file
patching file llvm/test/Transforms/WholeProgramDevirt/import.ll
patching file
patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval.ll


Jinsong Ji (纪金松), PhD.

XL/LLVM on Power Compiler Development
E-mail: jji at us.ibm.com

From:	Alexandre Ganea via llvm-dev <llvm-dev at lists.llvm.org>
To:	LLVM Dev <llvm-dev at lists.llvm.org>, MyDeveloper Day
            <mydeveloperday at gmail.com>
Date:	04/09/2020 10:30 AM
Subject:	[EXTERNAL] [llvm-dev] Applying patches from Phabricator?
Sent by:	"llvm-dev" <llvm-dev-bounces at lists.llvm.org>


Is there a way for Phabricator to retain the patches as originally
When using the “Download Raw Diff” button, it seems Phabricator reformats
the patch, loosing the parent commit along the way, so often patches don’t

The following works, because I’ve got the latest checkout on master, and
the patch was rebased recently:

      F:\llvm-project>curl https://reviews.llvm.org/D77421?download=true -L

      F:\llvm-project>git apply -3 patch.txt

But if I switch to the release branch and try to apply:

      F:\llvm-project>git reset && git checkout .

      F:\llvm-project>git checkout release/10.x

      F:\llvm-project>git apply -3 patch.txt
      error: patch failed:
      error: repository lacks the necessary blob to fall back on 3-way
      error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not

Is there some magic I’m not aware of?

LLVM Developers mailing list
llvm-dev at lists.llvm.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/7c9b0bc4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/7c9b0bc4/attachment.gif>

More information about the llvm-dev mailing list