James Y Knight via llvm-dev
2019-Feb-08 20:14 UTC
[llvm-dev] arc patch with the new git workflow
Personally I'd like a "git llvm fetch-diff D1234" subcommand, which outputs a patch in the format of "git format-patch", which, you could then pipe to "git am", say, providing whatever prefix options you like. On Fri, Feb 8, 2019 at 2:41 PM Mehdi AMINI via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > Are you trying to apply a revision that was uploaded to Phabricator from > one of the individual repository (or from SVN)? > The issue if I remember correctly is that a patch uploaded from an SVN > checkout would not start with `llvm/` or `clang/` and wouldn't be able to > be applied in the monorepo. Conversely, a revision created from the > monorepo can't be applied by `arc patch` in a single subproject checkout. > I don't think there is a way around this, maybe `--strip-prefix` and > `--add-prefix` options could be added to `arc patch`, but I'm not sure it > would fit the expectation of `arc` upstream. > > -- > Mehdi > > > On Fri, Feb 8, 2019 at 10:42 AM Nicolas Lesser via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi all, >> >> The Phabricator docs seem to say that downloading a patch goes with `arc >> patch`. However, I tried it on several revisions and they all fail with: >> >> Checking patch some/path/to/a/file/that/exists ... >> error: some/path/to/a/file/that/exists: does not exist in index >> >> With the svn repo I found that command to be really useful. But now it >> seems like I have to download the patch manually, create a new branch, >> apply it and create a commit for it. Having `arc patch` would be a really >> great improvement to that - since it also does arc specific stuff I believe >> that I can't do manually (like arc diff telling me which patch to commit). >> >> Is there a way I can make it work? >> >> Thanks >> P.S: I'm not on llvm-dev list, so any replies would have to mention my >> email I guess :) >> - Nicolas >> _______________________________________________ >> 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://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/20190208/6434a063/attachment.html>
Philip Pfaffe via llvm-dev
2019-Feb-08 22:31 UTC
[llvm-dev] arc patch with the new git workflow
`arc patch` applies the patch as is. That means, if someone uploads the patch with arc for the monorepo, arc patch just works. I've had the same issue with the svn monorepo and the git mirrors before. Cheers, Philip On Fri, Feb 8, 2019 at 9:14 PM James Y Knight via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Personally I'd like a "git llvm fetch-diff D1234" subcommand, which > outputs a patch in the format of "git format-patch", which, you could then > pipe to "git am", say, providing whatever prefix options you like. > > On Fri, Feb 8, 2019 at 2:41 PM Mehdi AMINI via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> Are you trying to apply a revision that was uploaded to Phabricator from >> one of the individual repository (or from SVN)? >> The issue if I remember correctly is that a patch uploaded from an SVN >> checkout would not start with `llvm/` or `clang/` and wouldn't be able to >> be applied in the monorepo. Conversely, a revision created from the >> monorepo can't be applied by `arc patch` in a single subproject checkout. >> I don't think there is a way around this, maybe `--strip-prefix` and >> `--add-prefix` options could be added to `arc patch`, but I'm not sure it >> would fit the expectation of `arc` upstream. >> >> -- >> Mehdi >> >> >> On Fri, Feb 8, 2019 at 10:42 AM Nicolas Lesser via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> Hi all, >>> >>> The Phabricator docs seem to say that downloading a patch goes with `arc >>> patch`. However, I tried it on several revisions and they all fail with: >>> >>> Checking patch some/path/to/a/file/that/exists ... >>> error: some/path/to/a/file/that/exists: does not exist in index >>> >>> With the svn repo I found that command to be really useful. But now it >>> seems like I have to download the patch manually, create a new branch, >>> apply it and create a commit for it. Having `arc patch` would be a really >>> great improvement to that - since it also does arc specific stuff I believe >>> that I can't do manually (like arc diff telling me which patch to commit). >>> >>> Is there a way I can make it work? >>> >>> Thanks >>> P.S: I'm not on llvm-dev list, so any replies would have to mention my >>> email I guess :) >>> - Nicolas >>> _______________________________________________ >>> 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://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > 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/20190208/d03d615c/attachment.html>
Don Hinton via llvm-dev
2019-Mar-19 07:05 UTC
[llvm-dev] arc patch with the new git workflow
Not sure if you resolved this, but you could always export the patch to stdout or a file, then just use patch to apply it. This is how I get specific diffs -- D<revision> always gives you the latest. arc export --git --diff <revision id> | patch -p<N> - On Fri, Feb 8, 2019 at 3:32 PM Philip Pfaffe via llvm-dev < llvm-dev at lists.llvm.org> wrote:> `arc patch` applies the patch as is. That means, if someone uploads the > patch with arc for the monorepo, arc patch just works. > > I've had the same issue with the svn monorepo and the git mirrors before. > > Cheers, > Philip > > On Fri, Feb 8, 2019 at 9:14 PM James Y Knight via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Personally I'd like a "git llvm fetch-diff D1234" subcommand, which >> outputs a patch in the format of "git format-patch", which, you could then >> pipe to "git am", say, providing whatever prefix options you like. >> >> On Fri, Feb 8, 2019 at 2:41 PM Mehdi AMINI via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> Hi, >>> >>> Are you trying to apply a revision that was uploaded to Phabricator from >>> one of the individual repository (or from SVN)? >>> The issue if I remember correctly is that a patch uploaded from an SVN >>> checkout would not start with `llvm/` or `clang/` and wouldn't be able to >>> be applied in the monorepo. Conversely, a revision created from the >>> monorepo can't be applied by `arc patch` in a single subproject checkout. >>> I don't think there is a way around this, maybe `--strip-prefix` and >>> `--add-prefix` options could be added to `arc patch`, but I'm not sure it >>> would fit the expectation of `arc` upstream. >>> >>> -- >>> Mehdi >>> >>> >>> On Fri, Feb 8, 2019 at 10:42 AM Nicolas Lesser via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> Hi all, >>>> >>>> The Phabricator docs seem to say that downloading a patch goes with >>>> `arc patch`. However, I tried it on several revisions and they all fail >>>> with: >>>> >>>> Checking patch some/path/to/a/file/that/exists ... >>>> error: some/path/to/a/file/that/exists: does not exist in index >>>> >>>> With the svn repo I found that command to be really useful. But now it >>>> seems like I have to download the patch manually, create a new branch, >>>> apply it and create a commit for it. Having `arc patch` would be a really >>>> great improvement to that - since it also does arc specific stuff I believe >>>> that I can't do manually (like arc diff telling me which patch to commit). >>>> >>>> Is there a way I can make it work? >>>> >>>> Thanks >>>> P.S: I'm not on llvm-dev list, so any replies would have to mention my >>>> email I guess :) >>>> - Nicolas >>>> _______________________________________________ >>>> 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://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>> >> _______________________________________________ >> 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://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/20190319/2b1e4317/attachment.html>
Xing GUO via llvm-dev
2019-Mar-27 02:57 UTC
[llvm-dev] Fwd: arc patch with the new git workflow
---------- Forwarded message --------- From: Xing GUO <higuoxing at gmail.com> Date: Wed, Mar 27, 2019 at 10:56 AM Subject: Re: [llvm-dev] arc patch with the new git workflow To: Don Hinton <hintonda at gmail.com> Hi, I encountered some similar problem today. Shall we document this problem and illustrate the *right* workflow in detail in our developer guides? Best Regards, Xing On Tue, Mar 19, 2019 at 3:06 PM Don Hinton via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Not sure if you resolved this, but you could always export the patch to > stdout or a file, then just use patch to apply it. > This is how I get specific diffs -- D<revision> always gives you the > latest. > > arc export --git --diff <revision id> | patch -p<N> - > > > On Fri, Feb 8, 2019 at 3:32 PM Philip Pfaffe via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> `arc patch` applies the patch as is. That means, if someone uploads the >> patch with arc for the monorepo, arc patch just works. >> >> I've had the same issue with the svn monorepo and the git mirrors before. >> >> Cheers, >> Philip >> >> On Fri, Feb 8, 2019 at 9:14 PM James Y Knight via llvm-dev < >> llvm-dev at lists.llvm.org> wrote: >> >>> Personally I'd like a "git llvm fetch-diff D1234" subcommand, which >>> outputs a patch in the format of "git format-patch", which, you could then >>> pipe to "git am", say, providing whatever prefix options you like. >>> >>> On Fri, Feb 8, 2019 at 2:41 PM Mehdi AMINI via llvm-dev < >>> llvm-dev at lists.llvm.org> wrote: >>> >>>> Hi, >>>> >>>> Are you trying to apply a revision that was uploaded to Phabricator >>>> from one of the individual repository (or from SVN)? >>>> The issue if I remember correctly is that a patch uploaded from an SVN >>>> checkout would not start with `llvm/` or `clang/` and wouldn't be able to >>>> be applied in the monorepo. Conversely, a revision created from the >>>> monorepo can't be applied by `arc patch` in a single subproject checkout. >>>> I don't think there is a way around this, maybe `--strip-prefix` and >>>> `--add-prefix` options could be added to `arc patch`, but I'm not sure it >>>> would fit the expectation of `arc` upstream. >>>> >>>> -- >>>> Mehdi >>>> >>>> >>>> On Fri, Feb 8, 2019 at 10:42 AM Nicolas Lesser via llvm-dev < >>>> llvm-dev at lists.llvm.org> wrote: >>>> >>>>> Hi all, >>>>> >>>>> The Phabricator docs seem to say that downloading a patch goes with >>>>> `arc patch`. However, I tried it on several revisions and they all fail >>>>> with: >>>>> >>>>> Checking patch some/path/to/a/file/that/exists ... >>>>> error: some/path/to/a/file/that/exists: does not exist in index >>>>> >>>>> With the svn repo I found that command to be really useful. But now it >>>>> seems like I have to download the patch manually, create a new branch, >>>>> apply it and create a commit for it. Having `arc patch` would be a really >>>>> great improvement to that - since it also does arc specific stuff I believe >>>>> that I can't do manually (like arc diff telling me which patch to commit). >>>>> >>>>> Is there a way I can make it work? >>>>> >>>>> Thanks >>>>> P.S: I'm not on llvm-dev list, so any replies would have to mention my >>>>> email I guess :) >>>>> - Nicolas >>>>> _______________________________________________ >>>>> 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://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >>>> >>> _______________________________________________ >>> 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://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > 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/20190327/254bf53e/attachment.html>