[
https://issues.apache.org/jira/browse/YETUS-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16556017#comment-16556017
]
Allen Wittenauer commented on YETUS-645:
----------------------------------------
I tried the patch attached at LUCENE-8408 against the
6f24be9457e4f4f0de9af1d78f96754110348f67 version of the repo (random hash that
I knew didn't have it already applied). Looks like smart-apply-patch did the
correct thing:
{code}
awmbp-work:lucene-solr aw$ smart-apply-patch --version
0.7.0
awmbp-work:lucene-solr aw$ git checkout --force
6f24be9457e4f4f0de9af1d78f96754110348f67
HEAD is now at 6f24be9457 LUCENE-8357: Fix function score explanations
awmbp-work:lucene-solr aw$ smart-apply-patch LUCENE-8408.patch
Processing: LUCENE-8408.patch
Patch file LUCENE-8408.patch copied to /tmp/yetus-10098.27267
Applying the patch:
Wed Jul 25 10:29:54 PDT 2018
cd /tmp/lucene-solr
git apply --binary -v --stat --apply -p0 /tmp/yetus-10098.27267/patch
Applied patch
lucene/highlighter/src/java/org/apache/lucene/search/highlight/TokenStreamFromTermVector.java
cleanly.
.../highlight/TokenStreamFromTermVector.java | 8 --------
1 file changed, 8 deletions(-)
{code}
> Make leading path component optional in patch files (support IntelliJ patch
> files)
> ----------------------------------------------------------------------------------
>
> Key: YETUS-645
> URL: https://issues.apache.org/jira/browse/YETUS-645
> Project: Yetus
> Issue Type: Improvement
> Reporter: David Smiley
> Priority: Major
>
> IntelliJ IDEA has a "create patch" feature that generates patch files in a
> format that isn't supported by some tools like Yetus. In particular, there
> is no leading "a/" and "b/" in the paths. That appears to be the sole
> difference requiring these patches to be supported.
>
> See [https://youtrack.jetbrains.com/issue/IDEA-92793]
>
> To work around this, I wrote a one-liner Bash script using SED to insert the
> "a/" and b/" at the right spots:
> {code:java}
> sed -i '' -e 's/^--- /--- a\//g' -e 's/^+++ /+++ b\//g' "$1"
> {code}
> In this issue I propose that Yetus detect the absence of a/ and b/ and either
> (a) insert them using a similar script, or (b) toggling the "-p" option when
> the patch is applied using [git-apply|https://git-scm.com/docs/git-apply] or
> other tool.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)