[ 
https://issues.apache.org/jira/browse/YETUS-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15203825#comment-15203825
 ] 

Kengo Seki commented on YETUS-338:
----------------------------------

This patch works, but its console output is somewhat misleading:

{code}
[sekikn@localhost yetus]$ cat /tmp/foo
diff --git a/release-doc-maker/releasedocmaker.py 
b/release-doc-maker/releasedocmaker.py
index 07a1124..b853ca5 100755
--- a/release-doc-maker/releasedocmaker.py
+++ b/release-doc-maker/releasedocmaker.py
@@ -727,3 +727,4 @@ def main():
 
 if __name__ == "__main__":
     main()
+
[sekikn@localhost yetus]$ cat /tmp/bar
diff --git a/shelldocs/shelldocs.py b/shelldocs/shelldocs.py
index 6b0b94f..a64b2a5 100755
--- a/shelldocs/shelldocs.py
+++ b/shelldocs/shelldocs.py
@@ -317,4 +317,3 @@ def main():
 
 if __name__ == "__main__":
   main()
-
[sekikn@localhost yetus]$ precommit/test-patch.sh --basedir=../dev/yetus 
--build-tool=nobuild --patch-dir=/tmp/p --plugins=all --resetrepo /tmp/foo 
/tmp/p has been created
Modes:  ResetRepo 
Processing: /tmp/foo
Patch file /tmp/foo copied to /tmp/p

(snip)

============================================================================
============================================================================
                         Applying patch to master
============================================================================
============================================================================


Applying the patch:
Mon Mar 21 14:39:20 JST 2016
cd /home/sekikn/dev/yetus
git apply --binary -v --stat --apply -p1 /tmp/p/patch
/tmp/p/patch:9: new blank line at EOF.
+
Applied patch release-doc-maker/releasedocmaker.py cleanly.
warning: 1 line adds whitespace errors.
 release-doc-maker/releasedocmaker.py |    1 +
 1 file changed, 1 insertion(+)

(snip)

============================================================================
============================================================================
                              Finished build.
============================================================================
============================================================================


[sekikn@localhost yetus]$ precommit/test-patch.sh --basedir=../dev/yetus 
--build-tool=nobuild --patch-dir=/tmp/p --plugins=all --resetrepo /tmp/bar 
Modes:  ResetRepo 
Processing: /tmp/bar
Patch file /tmp/bar copied to /tmp/p

(snip)

============================================================================
============================================================================
                         Applying patch to master
============================================================================
============================================================================


Applying the patch:
Mon Mar 21 14:39:20 JST 2016
cd /home/sekikn/dev/yetus
git apply --binary -v --stat --apply -p1 /tmp/p/patch
/tmp/p/patch:9: new blank line at EOF.
+
Applied patch release-doc-maker/releasedocmaker.py cleanly.
warning: 1 line adds whitespace errors.
 release-doc-maker/releasedocmaker.py |    1 +
 1 file changed, 1 insertion(+)
Mon Mar 21 14:39:55 JST 2016
cd /home/sekikn/dev/yetus
git apply --binary -v --stat --apply -p1 /tmp/p/patch
Applied patch shelldocs/shelldocs.py cleanly.
 shelldocs/shelldocs.py |    1 -
 1 file changed, 1 deletion(-)

(snip)

============================================================================
============================================================================
                              Finished build.
============================================================================
============================================================================


[sekikn@localhost yetus]$ cd ../dev/yetus
[sekikn@localhost yetus]$ git diff
diff --git a/shelldocs/shelldocs.py b/shelldocs/shelldocs.py
index 6b0b94f..a64b2a5 100755
--- a/shelldocs/shelldocs.py
+++ b/shelldocs/shelldocs.py
@@ -317,4 +317,3 @@ def main():
 
 if __name__ == "__main__":
   main()
-

{code}

In the above case, only the patch bar is applied in the second run actually, 
but both of foo and bar seem applied according to the console output.
This is because the output of git apply is appended to 
apply-patch-git-apply.log, which is created in the first run.
I think it will be fixed if YETUS-57 is addressed and committed (I just 
remembered that I've left it...), but it may take some time. So I'll commit 
this patch first.

> test-patch may not update patchfile in patchdir
> -----------------------------------------------
>
>                 Key: YETUS-338
>                 URL: https://issues.apache.org/jira/browse/YETUS-338
>             Project: Yetus
>          Issue Type: Bug
>          Components: Test Patch
>    Affects Versions: 0.2.0
>            Reporter: Allen Wittenauer
>            Assignee: Allen Wittenauer
>            Priority: Blocker
>         Attachments: YETUS-338.00.patch
>
>
> It's effectively an edge-case, but probably a common one:
> * --patch-dir is used
> * --patch-dir is never cleared between runs
> * --docker mode is not used (maybe?)
> * patch file is given
> See comments.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to