You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/08/08 12:14:43 UTC

[30/50] [abbrv] lucene-solr:feature/autoscaling: Try again to fix precommit on Windows with native line endings

Try again to fix precommit on Windows with native line endings


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/1a3295fb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/1a3295fb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/1a3295fb

Branch: refs/heads/feature/autoscaling
Commit: 1a3295fb007746d6c949cf3da662c974112c96f5
Parents: 440747c
Author: Steve Rowe <sa...@odyssey.net>
Authored: Sun Aug 6 01:31:31 2017 -0400
Committer: Steve Rowe <sa...@odyssey.net>
Committed: Sun Aug 6 01:31:31 2017 -0400

----------------------------------------------------------------------
 build.xml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/1a3295fb/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
old mode 100644
new mode 100755
index 1176dc7..79326e9
--- a/build.xml
+++ b/build.xml
@@ -208,17 +208,16 @@
         def lineNumber = 0;
         singleLineSplitter.split(text).each {
           ++lineNumber;
-          it.trim(); // remove trailing carriage return after split on Windows with native line endings
           if (underSourceHeader) { // This line is either a single source line, or the boundary of a code block
             inCodeBlock = blockBoundaryPattern.matcher(it).matches();
-            if ( ! blockTitlePattern.matcher(it).matches()) { // Keep underSourceHeader=true
+            if ( ! blockTitlePattern.matcher(it).matches()) {
               underSourceHeader = false;
             }
           } else {
             if (inCodeBlock) {
               inCodeBlock = ! blockBoundaryPattern.matcher(it).matches();
             } else {
-              underSourceHeader = sourceHeaderPattern.matcher(it).matches();
+              underSourceHeader = sourceHeaderPattern.matcher(it).lookingAt();
               if ( ! underSourceHeader) {
                 def unescapedSymbolMatcher = unescapedSymbolPattern.matcher(it);
                 if (unescapedSymbolMatcher.find()) {