<html><body><p><font size="2">Or use cherry-pick in your scenario.</font><br><br><br><font size="2">If you apply the patch to master</font><ul><ul><ul><ul><font size="2" face="Courier New">F:\llvm-project>curl </font><a href="https://reviews.llvm.org/D77421?download=true"><u><font size="2" color="#0563C1" face="Courier New">https://reviews.llvm.org/D77421?download=true</font></u></a><font size="2" face="Courier New"> -L >patch.txt</font><br><font size="2" face="Courier New">F:\llvm-project>git apply -3 patch.txt</font></ul></ul></ul></ul>Then switch to 10.x branch and cherry-pick it.<br><font size="2" face="Courier New">F:\llvm-project>git checkout release/10.x<br></font><b><font size="2" face="Courier New">F:\llvm-project>git cherry-pick master </font></b><ul><ul><ul><ul><br><br></ul></ul></ul></ul><br><font size="2">If you are using arc, it will be simpler:</font><br><br><font size="2">> arc patch D77421</font><br><font size="2">> </font><font size="2" face="Courier New">git checkout release/10.x</font><br><font size="2">> git cherry-pick arcpatch-D77421 </font><br><br><br><font size="2"><br>Best,<br><br>Jinsong Ji (¼Í½ðËÉ), PhD.<br><br>XL/LLVM on Power Compiler Development <br>E-mail: jji@us.ibm.com</font><br><br><img width="16" height="16" src="cid:1__=8FBB0FD6DFC3360A8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Jinsong Ji via llvm-dev ---04/09/2020 10:38:20 AM---Try using patch instead of git (due to fuzz) $ p"><font size="2" color="#424282">Jinsong Ji via llvm-dev ---04/09/2020 10:38:20 AM---Try using patch instead of git (due to fuzz) $ patch -p1 < D77421.diff</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Jinsong Ji via llvm-dev <llvm-dev@lists.llvm.org></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">Alexandre Ganea <alexandre.ganea@ubisoft.com></font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">LLVM Dev <llvm-dev@lists.llvm.org>, llvm-dev <llvm-dev-bounces@lists.llvm.org></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">04/09/2020 10:38 AM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">[EXTERNAL] Re: [llvm-dev] Applying patches from Phabricator?</font><br><font size="2" color="#5F5F5F">Sent by: </font><font size="2">"llvm-dev" <llvm-dev-bounces@lists.llvm.org></font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font size="2">Try using patch instead of git (due to fuzz)</font><br><font size="2"><br>$ patch -p1 < D77421.diff <br>patching file llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp<br>Hunk #1 succeeded at 454 (offset -46 lines).<br>Hunk #2 succeeded at 486 with fuzz 1 (offset -47 lines).<br>Hunk #3 succeeded at 1278 (offset -142 lines).<br>Hunk #4 succeeded at 1321 (offset -142 lines).<br>patching file llvm/test/Transforms/WholeProgramDevirt/Inputs/unique-retval-same-vtable.yaml<br>patching file llvm/test/Transforms/WholeProgramDevirt/import.ll<br>patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval-same-vtable.ll<br>patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval.ll</font><br><font size="2"><br><br>Best,<br><br>Jinsong Ji (¼Í½ðËÉ), PhD.<br><br>XL/LLVM on Power Compiler Development <br>E-mail: jji@us.ibm.com</font><br><br><img src="cid:1__=8FBB0FD6DFC3360A8f9e8a93df938690918c8FB@" width="16" height="16" alt="Inactive hide details for Alexandre Ganea via llvm-dev ---04/09/2020 10:30:26 AM---Hello, Is there a way for Phabricator to ret"><font size="2" color="#424282">Alexandre Ganea via llvm-dev ---04/09/2020 10:30:26 AM---Hello, Is there a way for Phabricator to retain the patches as originally uploaded?</font><br><font size="2" color="#5F5F5F"><br>From: </font><font size="2">Alexandre Ganea via llvm-dev <llvm-dev@lists.llvm.org></font><font size="2" color="#5F5F5F"><br>To: </font><font size="2">LLVM Dev <llvm-dev@lists.llvm.org>, MyDeveloper Day <mydeveloperday@gmail.com></font><font size="2" color="#5F5F5F"><br>Date: </font><font size="2">04/09/2020 10:30 AM</font><font size="2" color="#5F5F5F"><br>Subject: </font><font size="2">[EXTERNAL] [llvm-dev] Applying patches from Phabricator?</font><font size="2" color="#5F5F5F"><br>Sent by: </font><font size="2">"llvm-dev" <llvm-dev-bounces@lists.llvm.org></font><br><hr width="100%" size="2" align="left" noshade><br><br><br>Hello,<br><br>Is there a way for Phabricator to retain the patches as originally uploaded?<br>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 apply.<br><br>The following works, because I¡¯ve got the latest checkout on master, and the patch was rebased recently:
<ul><ul><ul><ul><font size="2" face="Courier New">F:\llvm-project>curl </font><a href="https://reviews.llvm.org/D77421?download=true"><u><font size="2" color="#0563C1" face="Courier New">https://reviews.llvm.org/D77421?download=true</font></u></a><font size="2" face="Courier New"> -L >patch.txt</font><br><font size="2" face="Courier New"><br>F:\llvm-project>git apply -3 patch.txt</font></ul></ul></ul></ul><br>But if I switch to the release branch and try to apply:
<ul><ul><ul><ul><font size="2" face="Courier New">F:\llvm-project>git reset && git checkout .<br>(...)</font><br><font size="2" face="Courier New">F:\llvm-project>git checkout release/10.x<br>(...)</font><br><font size="2" face="Courier New">F:\llvm-project>git apply -3 patch.txt<br>error: patch failed: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:529<br>error: repository lacks the necessary blob to fall back on 3-way merge.<br>error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not apply</font></ul></ul></ul></ul><br>Is there some magic I¡¯m not aware of?<br><br>Thanks!<br>Alex.<tt><font size="2">_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org</font></tt><tt><u><font size="2" color="#0000FF"><br></font></u></tt><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"><tt><u><font size="2" color="#0000FF">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</font></u></tt></a><tt><font size="2"> </font></tt><br><br><br><tt><font size="2">_______________________________________________<br>LLVM Developers mailing list<br>llvm-dev@lists.llvm.org<br></font></tt><tt><font size="2"><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></font></tt><tt><font size="2"> <br></font></tt><br><br><BR>
</body></html>