Alexandre Ganea via llvm-dev
2020-Apr-09 14:30 UTC
[llvm-dev] Applying patches from Phabricator?
Hello, Is there a way for Phabricator to retain the patches as originally uploaded? 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. 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 >patch.txt 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: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:529 error: repository lacks the necessary blob to fall back on 3-way merge. error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not apply Is there some magic I'm not aware of? Thanks! Alex. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/35b3e032/attachment.html>
Andrzej Warzynski via llvm-dev
2020-Apr-09 14:32 UTC
[llvm-dev] Applying patches from Phabricator?
Hi Alex, Have you tried using Arcanist? https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-command-line -Andrzej On 09/04/2020 15:30, Alexandre Ganea via llvm-dev wrote:> Hello, > > Is there a way for Phabricator to retain the patches as originally uploaded? > > 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. > > 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 > >patch.txt > > 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: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:529 > > error: repository lacks the necessary blob to fall back on 3-way merge. > > error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not apply > > Is there some magic I�m not aware of? > > Thanks! > > Alex. > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Jinsong Ji via llvm-dev
2020-Apr-09 14:37 UTC
[llvm-dev] Applying patches from Phabricator?
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 llvm/test/Transforms/WholeProgramDevirt/Inputs/unique-retval-same-vtable.yaml patching file llvm/test/Transforms/WholeProgramDevirt/import.ll patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval-same-vtable.ll patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval.ll Best, 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> Hello, Is there a way for Phabricator to retain the patches as originally uploaded? 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. 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 >patch.txt 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: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:529 error: repository lacks the necessary blob to fall back on 3-way merge. error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not apply Is there some magic I’m not aware of? Thanks! Alex._______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=DvnnfavFQBGT2CDyHzTr_Q&m=9cly9iKKMA3qdN3gPGq-am74jLJ5Oa9fBEFHjpMwphc&s=nkOywuAPIVtHn-hiH47Rw7K6YEylMHgqRm3b3h8wAdM&e -------------- 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>
Jinsong Ji via llvm-dev
2020-Apr-09 14:48 UTC
[llvm-dev] Applying patches from Phabricator?
Or use cherry-pick in your scenario. If you apply the patch to master F:\llvm-project>curl https://reviews.llvm.org/D77421?download=true -L >patch.txt F:\llvm-project>git apply -3 patch.txt Then switch to 10.x branch and cherry-pick it. F:\llvm-project>git checkout release/10.x F:\llvm-project>git cherry-pick master If you are using arc, it will be simpler:> arc patch D77421 > git checkout release/10.x > git cherry-pick arcpatch-D77421Best, Jinsong Ji (纪金松), PhD. XL/LLVM on Power Compiler Development E-mail: jji at us.ibm.com From: Jinsong Ji via llvm-dev <llvm-dev at lists.llvm.org> To: Alexandre Ganea <alexandre.ganea at ubisoft.com> Cc: LLVM Dev <llvm-dev at lists.llvm.org>, llvm-dev <llvm-dev-bounces at lists.llvm.org> Date: 04/09/2020 10:38 AM Subject: [EXTERNAL] Re: [llvm-dev] Applying patches from Phabricator? Sent by: "llvm-dev" <llvm-dev-bounces at lists.llvm.org> 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 llvm/test/Transforms/WholeProgramDevirt/Inputs/unique-retval-same-vtable.yaml patching file llvm/test/Transforms/WholeProgramDevirt/import.ll patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval-same-vtable.ll patching file llvm/test/Transforms/WholeProgramDevirt/unique-retval.ll Best, Jinsong Ji (纪金松), PhD. XL/LLVM on Power Compiler Development E-mail: jji at us.ibm.com Inactive hide details for Alexandre Ganea via llvm-dev ---04/09/2020 10:30:26 AM---Hello, Is there a way for Phabricator to retAlexandre 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? 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> Hello, Is there a way for Phabricator to retain the patches as originally uploaded? 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. 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 >patch.txt 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: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:529 error: repository lacks the necessary blob to fall back on 3-way merge. error: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp: patch does not apply Is there some magic I’m not aware of? Thanks! Alex._______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIGaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=DvnnfavFQBGT2CDyHzTr_Q&m=i8HbVxP4SA7xRPPpRM0203T8ZmPWUN0TAOi8PyeZ35Q&s=BYtYu4oymJB8Ppksv45muF2oGbTqDR1HVczh78ixQAY&e -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/f064ded6/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/f064ded6/attachment.gif>