Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-12018

smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      If the patch edits a file includes CR+LF and created by "git diff --no-prefix", smart-apply-patch.sh fails to patch. smart-apply-patch.sh checks if the patch is created by "git diff" or "patch", however, if a patch is created by "git diff --no-prefix", smart-apply-patch.sh detects the patch is created by "patch" command. That's why https://builds.apache.org/job/PreCommit-HADOOP-Build/6800/console fails.
      A workaround is to use "git diff" for creating patch if a file includes CR+LF is edited.

      1. HADOOP-12018.001.patch
        2 kB
        Kengo Seki
      2. HADOOP-12018.002.patch
        3 kB
        Kengo Seki
      3. HADOOP-12018.003.patch
        3 kB
        Kengo Seki
      4. HADOOP-12018.004.patch
        3 kB
        Kengo Seki
      5. HADOOP-12018.test-noprefix.patch
        162 kB
        Akira Ajisaka
      6. HADOOP-12018.test-noprefix.patch
        162 kB
        Akira Ajisaka

        Issue Links

          Activity

          Hide
          ajisakaa Akira Ajisaka added a comment -

          I'm thinking there are two patterns to fix this issue.

          1. Fix smart-apply-patch.sh.
          2. Document not to use "git diff --no-prefix" to create patch.
          Show
          ajisakaa Akira Ajisaka added a comment - I'm thinking there are two patterns to fix this issue. Fix smart-apply-patch.sh. Document not to use "git diff --no-prefix" to create patch.
          Hide
          sekikn Kengo Seki added a comment -

          I prefer the plan 1. The root problem is that smart-apply-patch can't recognise the patch created by 'git diff --no-prefix' as git's one. This patch enables smart-apply-patch to detect it and use 'git apply -p0' rather than 'patch -p0'.

          Show
          sekikn Kengo Seki added a comment - I prefer the plan 1. The root problem is that smart-apply-patch can't recognise the patch created by 'git diff --no-prefix' as git's one. This patch enables smart-apply-patch to detect it and use 'git apply -p0' rather than 'patch -p0'.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 0m 0s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 release audit 0m 14s The applied patch does not increase the total number of release audit warnings.
          +1 shellcheck 0m 6s There were no new shellcheck (v0.3.3) issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
              0m 23s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12734858/HADOOP-12018.001.patch
          Optional Tests shellcheck
          git revision trunk / b27ce3c
          Java 1.7.0_55
          uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6802/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 0m 0s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 release audit 0m 14s The applied patch does not increase the total number of release audit warnings. +1 shellcheck 0m 6s There were no new shellcheck (v0.3.3) issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace.     0m 23s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12734858/HADOOP-12018.001.patch Optional Tests shellcheck git revision trunk / b27ce3c Java 1.7.0_55 uname Linux asf902.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6802/console This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Thanks Kengo Seki for taking this issue. Looks good to me. Testing this patch.

          Show
          ajisakaa Akira Ajisaka added a comment - Thanks Kengo Seki for taking this issue. Looks good to me. Testing this patch.
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          -1 patch 0m 0s The patch command could not apply the patch during dryrun.



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12737089/HADOOP-12018.test-noprefix.patch
          Optional Tests shellcheck
          git revision trunk / 806e407
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6901/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 patch 0m 0s The patch command could not apply the patch during dryrun. Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12737089/HADOOP-12018.test-noprefix.patch Optional Tests shellcheck git revision trunk / 806e407 Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6901/console This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          test-patch.sh is not re-executed due to HADOOP-11991. We need to fix this first.

          Show
          ajisakaa Akira Ajisaka added a comment - test-patch.sh is not re-executed due to HADOOP-11991 . We need to fix this first.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Retrying.

          Show
          ajisakaa Akira Ajisaka added a comment - Retrying.
          Hide
          hadoopqa Hadoop QA added a comment -



          -1 overall



          Vote Subsystem Runtime Comment
          -1 patch 0m 3s The patch command could not apply the patch.



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12737094/HADOOP-12018.test-noprefix.patch
          Optional Tests shellcheck
          git revision trunk / a6a8ee3
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6902/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment -1 patch 0m 3s The patch command could not apply the patch. Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12737094/HADOOP-12018.test-noprefix.patch Optional Tests shellcheck git revision trunk / a6a8ee3 Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6902/console This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          I found this issue cannot test by jenkins. This is because test-patch.sh applies the patch before updating smart-apply-patch.sh. I'll test the patch manually.

          Show
          ajisakaa Akira Ajisaka added a comment - I found this issue cannot test by jenkins. This is because test-patch.sh applies the patch before updating smart-apply-patch.sh. I'll test the patch manually.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Two comments:

          1. has_prefix() returns 0 if the input is as follows:

          diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png
          deleted file mode 100644
          

          The method should return 1 with the input.

          2. $1 should be $PATCH_FILE.

          # Case for git-diff patches
          if [[ $(head -1 $1) =~ ^diff\ --git ]]; then
          
          Show
          ajisakaa Akira Ajisaka added a comment - Two comments: 1. has_prefix() returns 0 if the input is as follows: diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png deleted file mode 100644 The method should return 1 with the input. 2. $1 should be $PATCH_FILE . # Case for git-diff patches if [[ $(head -1 $1) =~ ^diff\ --git ]]; then
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Note: I included binary file in HADOOP-12018.test-noprefix.patch intentionally to confirm that smart-apply-patch.sh will apply the patch by --binary option.

          Show
          ajisakaa Akira Ajisaka added a comment - Note: I included binary file in HADOOP-12018 .test-noprefix.patch intentionally to confirm that smart-apply-patch.sh will apply the patch by --binary option.
          Hide
          sekikn Kengo Seki added a comment -

          Thanks Akira Ajisaka, I'm attaching a fixed patch.
          As for the first comment, the previous patch was a bit verbose. We can simplify it as an awk one-liner:

          [sekikn@mobile ~]$ cat sample.patch 
          diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png
          deleted file mode 100644
          [sekikn@mobile ~]$ awk '/^diff --git / { if ($3 !~ "^a/" || $4 !~ "^b/") { exit 1 } }
          > /^\+{3}|-{3} / { if ($2 !~ "^[ab]/" && $2 !~ "/dev/null") { exit 1 } }' sample.patch
          [sekikn@mobile ~]$ echo $?
          1
          [sekikn@mobile ~]$ cat noprefix.patch 
          diff --git NOTICE.txt NOTICE.txt
          deleted file mode 100644
          index 62fc581..0000000
          --- NOTICE.txt
          +++ /dev/null
          @@ -1,2 +0,0 @@
          -This product includes software developed by The Apache Software
          -Foundation (http://www.apache.org/).
          [sekikn@mobile ~]$ awk '/^diff --git / { if ($3 !~ "^a/" || $4 !~ "^b/") { exit 1 } }
          > /^\+{3}|-{3} / { if ($2 !~ "^[ab]/" && $2 !~ "/dev/null") { exit 1 } }' noprefix.patch
          [sekikn@mobile ~]$ echo $?
          1
          [sekikn@mobile ~]$ cat prefix.patch 
          diff --git a/NOTICE.txt b/NOTICE.txt
          deleted file mode 100644
          index 62fc581..0000000
          --- a/NOTICE.txt
          +++ /dev/null
          @@ -1,2 +0,0 @@
          -This product includes software developed by The Apache Software
          -Foundation (http://www.apache.org/).
          [sekikn@mobile ~]$ awk '/^diff --git / { if ($3 !~ "^a/" || $4 !~ "^b/") { exit 1 } }
          > /^\+{3}|-{3} / { if ($2 !~ "^[ab]/" && $2 !~ "/dev/null") { exit 1 } }' prefix.patch
          [sekikn@mobile ~]$ echo $?
          0
          

          It seems fine.

          Show
          sekikn Kengo Seki added a comment - Thanks Akira Ajisaka , I'm attaching a fixed patch. As for the first comment, the previous patch was a bit verbose. We can simplify it as an awk one-liner: [sekikn@mobile ~]$ cat sample.patch diff --git hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/resources/images/rm-ha-overview.png deleted file mode 100644 [sekikn@mobile ~]$ awk '/^diff --git / { if ($3 !~ "^a/" || $4 !~ "^b/" ) { exit 1 } } > /^\+{3}|-{3} / { if ($2 !~ "^[ab]/" && $2 !~ "/dev/ null " ) { exit 1 } }' sample.patch [sekikn@mobile ~]$ echo $? 1 [sekikn@mobile ~]$ cat noprefix.patch diff --git NOTICE.txt NOTICE.txt deleted file mode 100644 index 62fc581..0000000 --- NOTICE.txt +++ /dev/ null @@ -1,2 +0,0 @@ -This product includes software developed by The Apache Software -Foundation (http: //www.apache.org/). [sekikn@mobile ~]$ awk '/^diff --git / { if ($3 !~ "^a/" || $4 !~ "^b/" ) { exit 1 } } > /^\+{3}|-{3} / { if ($2 !~ "^[ab]/" && $2 !~ "/dev/ null " ) { exit 1 } }' noprefix.patch [sekikn@mobile ~]$ echo $? 1 [sekikn@mobile ~]$ cat prefix.patch diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index 62fc581..0000000 --- a/NOTICE.txt +++ /dev/ null @@ -1,2 +0,0 @@ -This product includes software developed by The Apache Software -Foundation (http: //www.apache.org/). [sekikn@mobile ~]$ awk '/^diff --git / { if ($3 !~ "^a/" || $4 !~ "^b/" ) { exit 1 } } > /^\+{3}|-{3} / { if ($2 !~ "^[ab]/" && $2 !~ "/dev/ null " ) { exit 1 } }' prefix.patch [sekikn@mobile ~]$ echo $? 0 It seems fine.
          Hide
          hadoopqa Hadoop QA added a comment -

          A patch to the files used for the QA process has been detected.
          Re-executing against the patched versions to perform further tests.
          The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/6906/console in case of problems.

          Show
          hadoopqa Hadoop QA added a comment - A patch to the files used for the QA process has been detected. Re-executing against the patched versions to perform further tests. The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/6906/console in case of problems.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s dev-support patch detected.
          0 pre-patch 0m 0s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 release audit 0m 15s The applied patch does not increase the total number of release audit warnings.
          +1 shellcheck 0m 6s There were no new shellcheck (v0.3.3) issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
              0m 23s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12737296/HADOOP-12018.002.patch
          Optional Tests shellcheck
          git revision trunk / c59e745
          Java 1.7.0_55
          uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6906/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s dev-support patch detected. 0 pre-patch 0m 0s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 release audit 0m 15s The applied patch does not increase the total number of release audit warnings. +1 shellcheck 0m 6s There were no new shellcheck (v0.3.3) issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace.     0m 23s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12737296/HADOOP-12018.002.patch Optional Tests shellcheck git revision trunk / c59e745 Java 1.7.0_55 uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6906/console This message was automatically generated.
          Hide
          sekikn Kengo Seki added a comment -

          Fixed a wrong regex

          Show
          sekikn Kengo Seki added a comment - Fixed a wrong regex
          Hide
          hadoopqa Hadoop QA added a comment -

          A patch to the files used for the QA process has been detected.
          Re-executing against the patched versions to perform further tests.
          The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/6907/console in case of problems.

          Show
          hadoopqa Hadoop QA added a comment - A patch to the files used for the QA process has been detected. Re-executing against the patched versions to perform further tests. The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/6907/console in case of problems.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s dev-support patch detected.
          0 pre-patch 0m 0s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 release audit 0m 15s The applied patch does not increase the total number of release audit warnings.
          +1 shellcheck 0m 4s There were no new shellcheck (v0.3.3) issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
              0m 22s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12737297/HADOOP-12018.003.patch
          Optional Tests shellcheck
          git revision trunk / c59e745
          Java 1.7.0_55
          uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6907/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s dev-support patch detected. 0 pre-patch 0m 0s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 release audit 0m 15s The applied patch does not increase the total number of release audit warnings. +1 shellcheck 0m 4s There were no new shellcheck (v0.3.3) issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace.     0m 22s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12737297/HADOOP-12018.003.patch Optional Tests shellcheck git revision trunk / c59e745 Java 1.7.0_55 uname Linux asf906.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6907/console This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Thanks Kengo Seki for updating the patch. The one-liner looks good to me. One comment:
          1.

          # Case for git-diff patches
          if [[ $(head -1 "${PATCH_FILE}") =~ ^diff\ --git ]]; then
          

          Detecting by the first line is not sufficient. Developers may upload the patch created by git format-patch, so grepping the line starts with diff --git would be fine.

          Show
          ajisakaa Akira Ajisaka added a comment - Thanks Kengo Seki for updating the patch. The one-liner looks good to me. One comment: 1. # Case for git-diff patches if [[ $(head -1 "${PATCH_FILE}" ) =~ ^diff\ --git ]]; then Detecting by the first line is not sufficient. Developers may upload the patch created by git format-patch , so grepping the line starts with diff --git would be fine.
          Hide
          sekikn Kengo Seki added a comment -

          Developers may upload the patch created by git format-patch, so grepping the line starts with diff --git would be fine.

          Thanks Akira Ajisaka, I didn't recognize such a case.
          Attaching a revised patch. It seems to work fine.

          [sekikn@mobile hadoop]$ cat ~/noprefix.patch 
          diff --git NOTICE.txt NOTICE.txt
          deleted file mode 100644
          index 62fc581..0000000
          --- NOTICE.txt
          +++ /dev/null
          @@ -1,2 +0,0 @@
          -This product includes software developed by The Apache Software
          -Foundation (http://www.apache.org/).
          [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/noprefix.patch 
          
          (snip)
          
          Going to apply git patch with: git apply --binary -v -p0 --stat --apply
          Checking patch NOTICE.txt...
          Applied patch NOTICE.txt cleanly.
           NOTICE.txt |    2 --
           1 file changed, 2 deletions(-)
          
          [sekikn@mobile hadoop]$ cat ~/prefix.patch 
          diff --git a/NOTICE.txt b/NOTICE.txt
          deleted file mode 100644
          index 62fc581..0000000
          --- a/NOTICE.txt
          +++ /dev/null
          @@ -1,2 +0,0 @@
          -This product includes software developed by The Apache Software
          -Foundation (http://www.apache.org/).
          [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/prefix.patch 
          
          (snip)
          
          Going to apply git patch with: git apply --binary -v -p1 --stat --apply
          Checking patch NOTICE.txt...
          Applied patch NOTICE.txt cleanly.
           NOTICE.txt |    2 --
           1 file changed, 2 deletions(-)
          
          [sekikn@mobile hadoop]$ cat ~/noprefix-formatted.patch 
          From acdf7412d765a4d3f9980c1648e86c921c6948c5 Mon Sep 17 00:00:00 2001
          From: sekikn <sekikn@gmail.com>
          Date: Thu, 4 Jun 2015 09:43:02 +0900
          Subject: [PATCH 1/2] a
          
          ---
           NOTICE.txt | 2 --
           1 file changed, 2 deletions(-)
           delete mode 100644 NOTICE.txt
          
          diff --git NOTICE.txt NOTICE.txt
          deleted file mode 100644
          index 62fc581..0000000
          --- NOTICE.txt
          +++ /dev/null
          @@ -1,2 +0,0 @@
          -This product includes software developed by The Apache Software
          -Foundation (http://www.apache.org/).
          -- 
          2.3.2 (Apple Git-55)
          
          [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/noprefix-formatted.patch 
          
          (snip)
          
          Going to apply git patch with: git apply --binary -v -p0 --stat --apply
          Checking patch NOTICE.txt...
          Applied patch NOTICE.txt cleanly.
           NOTICE.txt |    2 --
           1 file changed, 2 deletions(-)
          
          [sekikn@mobile hadoop]$ cat ~/prefix-formatted.patch 
          From acdf7412d765a4d3f9980c1648e86c921c6948c5 Mon Sep 17 00:00:00 2001
          From: sekikn <sekikn@gmail.com>
          Date: Thu, 4 Jun 2015 09:43:02 +0900
          Subject: [PATCH 1/2] a
          
          ---
           NOTICE.txt | 2 --
           1 file changed, 2 deletions(-)
           delete mode 100644 NOTICE.txt
          
          diff --git a/NOTICE.txt b/NOTICE.txt
          deleted file mode 100644
          index 62fc581..0000000
          --- a/NOTICE.txt
          +++ /dev/null
          @@ -1,2 +0,0 @@
          -This product includes software developed by The Apache Software
          -Foundation (http://www.apache.org/).
          -- 
          2.3.2 (Apple Git-55)
          
          [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/prefix-formatted.patch 
          
          (snip)
          
          Going to apply git patch with: git apply --binary -v -p1 --stat --apply
          Checking patch NOTICE.txt...
          Applied patch NOTICE.txt cleanly.
           NOTICE.txt |    2 --
           1 file changed, 2 deletions(-)
          
          Show
          sekikn Kengo Seki added a comment - Developers may upload the patch created by git format-patch, so grepping the line starts with diff --git would be fine. Thanks Akira Ajisaka , I didn't recognize such a case. Attaching a revised patch. It seems to work fine. [sekikn@mobile hadoop]$ cat ~/noprefix.patch diff --git NOTICE.txt NOTICE.txt deleted file mode 100644 index 62fc581..0000000 --- NOTICE.txt +++ /dev/ null @@ -1,2 +0,0 @@ -This product includes software developed by The Apache Software -Foundation (http: //www.apache.org/). [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/noprefix.patch (snip) Going to apply git patch with: git apply --binary -v -p0 --stat --apply Checking patch NOTICE.txt... Applied patch NOTICE.txt cleanly. NOTICE.txt | 2 -- 1 file changed, 2 deletions(-) [sekikn@mobile hadoop]$ cat ~/prefix.patch diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index 62fc581..0000000 --- a/NOTICE.txt +++ /dev/ null @@ -1,2 +0,0 @@ -This product includes software developed by The Apache Software -Foundation (http: //www.apache.org/). [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/prefix.patch (snip) Going to apply git patch with: git apply --binary -v -p1 --stat --apply Checking patch NOTICE.txt... Applied patch NOTICE.txt cleanly. NOTICE.txt | 2 -- 1 file changed, 2 deletions(-) [sekikn@mobile hadoop]$ cat ~/noprefix-formatted.patch From acdf7412d765a4d3f9980c1648e86c921c6948c5 Mon Sep 17 00:00:00 2001 From: sekikn <sekikn@gmail.com> Date: Thu, 4 Jun 2015 09:43:02 +0900 Subject: [PATCH 1/2] a --- NOTICE.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 NOTICE.txt diff --git NOTICE.txt NOTICE.txt deleted file mode 100644 index 62fc581..0000000 --- NOTICE.txt +++ /dev/ null @@ -1,2 +0,0 @@ -This product includes software developed by The Apache Software -Foundation (http: //www.apache.org/). -- 2.3.2 (Apple Git-55) [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/noprefix-formatted.patch (snip) Going to apply git patch with: git apply --binary -v -p0 --stat --apply Checking patch NOTICE.txt... Applied patch NOTICE.txt cleanly. NOTICE.txt | 2 -- 1 file changed, 2 deletions(-) [sekikn@mobile hadoop]$ cat ~/prefix-formatted.patch From acdf7412d765a4d3f9980c1648e86c921c6948c5 Mon Sep 17 00:00:00 2001 From: sekikn <sekikn@gmail.com> Date: Thu, 4 Jun 2015 09:43:02 +0900 Subject: [PATCH 1/2] a --- NOTICE.txt | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 NOTICE.txt diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index 62fc581..0000000 --- a/NOTICE.txt +++ /dev/ null @@ -1,2 +0,0 @@ -This product includes software developed by The Apache Software -Foundation (http: //www.apache.org/). -- 2.3.2 (Apple Git-55) [sekikn@mobile hadoop]$ dev-support/test-patch.sh ~/prefix-formatted.patch (snip) Going to apply git patch with: git apply --binary -v -p1 --stat --apply Checking patch NOTICE.txt... Applied patch NOTICE.txt cleanly. NOTICE.txt | 2 -- 1 file changed, 2 deletions(-)
          Hide
          hadoopqa Hadoop QA added a comment -

          A patch to the files used for the QA process has been detected.
          Re-executing against the patched versions to perform further tests.
          The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/6912/console in case of problems.

          Show
          hadoopqa Hadoop QA added a comment - A patch to the files used for the QA process has been detected. Re-executing against the patched versions to perform further tests. The console is at https://builds.apache.org/job/PreCommit-HADOOP-Build/6912/console in case of problems.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s dev-support patch detected.
          0 pre-patch 0m 0s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 release audit 0m 14s The applied patch does not increase the total number of release audit warnings.
          +1 shellcheck 0m 6s There were no new shellcheck (v0.3.3) issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
              0m 23s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12737433/HADOOP-12018.004.patch
          Optional Tests shellcheck
          git revision trunk / 5766a04
          Java 1.7.0_55
          uname Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6912/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s dev-support patch detected. 0 pre-patch 0m 0s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 release audit 0m 14s The applied patch does not increase the total number of release audit warnings. +1 shellcheck 0m 6s There were no new shellcheck (v0.3.3) issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace.     0m 23s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12737433/HADOOP-12018.004.patch Optional Tests shellcheck git revision trunk / 5766a04 Java 1.7.0_55 uname Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6912/console This message was automatically generated.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          +1, thanks Kengo Seki for updating and testing the patch.

          Show
          ajisakaa Akira Ajisaka added a comment - +1, thanks Kengo Seki for updating and testing the patch.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Committed this to trunk and branch-2. Thanks Kengo Seki for the contribution.

          Show
          ajisakaa Akira Ajisaka added a comment - Committed this to trunk and branch-2. Thanks Kengo Seki for the contribution.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #7960 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7960/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • dev-support/smart-apply-patch.sh
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7960 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7960/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) dev-support/smart-apply-patch.sh hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #218 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/218/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • dev-support/smart-apply-patch.sh
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #218 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/218/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) hadoop-common-project/hadoop-common/CHANGES.txt dev-support/smart-apply-patch.sh
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk #948 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/948/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • dev-support/smart-apply-patch.sh
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #948 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/948/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) hadoop-common-project/hadoop-common/CHANGES.txt dev-support/smart-apply-patch.sh
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk #2146 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2146/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • dev-support/smart-apply-patch.sh
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2146 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2146/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) dev-support/smart-apply-patch.sh hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #207 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/207/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • dev-support/smart-apply-patch.sh
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #207 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/207/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) dev-support/smart-apply-patch.sh hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #216 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/216/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • dev-support/smart-apply-patch.sh
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #216 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/216/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) hadoop-common-project/hadoop-common/CHANGES.txt dev-support/smart-apply-patch.sh
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2164 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2164/)
          HADOOP-12018. smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • dev-support/smart-apply-patch.sh
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2164 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2164/ ) HADOOP-12018 . smart-apply-patch.sh fails if the patch edits CR+LF files and is created by 'git diff --no-prefix'. Contributed by Kengo Seki. (aajisaka: rev b5f0d294f828240ea9a2395db94492e87af0260b) hadoop-common-project/hadoop-common/CHANGES.txt dev-support/smart-apply-patch.sh

            People

            • Assignee:
              sekikn Kengo Seki
              Reporter:
              ajisakaa Akira Ajisaka
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development