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 
> <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 
> <http://linkedin.com/in/davidwsmiley> | Book: 
> http://www.solrenterprisesearchserver.com 
> <http://www.solrenterprisesearchserver.com/>

Reply via email to