Sorry everyone for the noise; it turned out to be a red herring.  Yetus can
handle patches created by IntelliJ fine.  If it didn't, Yetus will still
comment and loudly complain of such a patch problem (as evidenced in other
projects using Yetus).  Allen Wittenauer was instrumental in helping out
here.

On Wed, Jul 25, 2018 at 2:31 PM David Smiley <[email protected]>
wrote:

> Maybe... though I find the quickness of a bash/sed script more desirable.
> Our ant build has a lot going on as it is.  I could add this to dev-tools
> somewhere.
>
> I posted here: https://issues.apache.org/jira/browse/YETUS-645 and it is
> getting some traction so lets see where it leads.
>
> On Wed, Jul 25, 2018 at 1:13 PM Erik Hatcher <[email protected]>
> wrote:
>
>> David -
>>
>> Would it make sense to bake that into the build file so that it's
>> immediately handy?    maybe `ant idea-patch-fix`?
>>
>> Erik
>>
>>
>>
>> On Jul 25, 2018, at 10:35 AM, David Smiley <[email protected]>
>> wrote:
>>
>> I use IntelliJ IDEA, and furthermore I use the "create patch" feature to
>> generate a patch file.  This is far more convenient than using the CLI when
>> there are multiple "change lists", and for other reasons, since at the CLI
>> I would have to presumably list out each changed file to include.
>>
>> However, IntelliJ's patches aren't always compatible with other tools
>> that consume patch files.  We use Apache Yetus and it doesn't like them --
>> it won't even kick off a build so you'll never see a comment from it in the
>> related JIRA issue.  JetBrains is tracking this patch compatibility
>> deficiency and they may improve it in the future but it's been years.
>>
>> I wrote the following one-liner script on my path that I use to convert a
>> patch file in-place.  The only thing that it does that is necessary to make
>> Yetus like it is to add the "a/" and "b/" to the file paths in the patch.
>> Here it is:
>>
>> # see https://youtrack.jetbrains.com/issue/IDEA-92793
>> sed -i '' -e 's/^--- /--- a\//g' -e 's/^+++ /+++ b\//g' "$1"
>>
>> I'm sharing this so others know of the issue and may want to use this
>> script as well.  I will report it to Yetus; maybe they'll include detection
>> of when to do this so I don't have to remember to.
>>
>> ~ David
>> --
>> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
>> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
>> http://www.solrenterprisesearchserver.com
>>
>>
>> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
> http://www.solrenterprisesearchserver.com
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Reply via email to