You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by grkvlt <gi...@git.apache.org> on 2017/07/10 15:58:44 UTC

[GitHub] maven pull request #127: Fix concat_lines in mvn to deal with CRLF

GitHub user grkvlt opened a pull request:

    https://github.com/apache/maven/pull/127

    Fix concat_lines in mvn to deal with CRLF

    Change from `tr` to `paste` to deal with CRLF line endings properly

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/grkvlt/maven patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven/pull/127.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #127
    
----
commit b9762ae480d27bf0e4ee7a86c571234035a575c6
Author: Andrew Donald Kennedy <an...@gmail.com>
Date:   2017-07-10T15:58:33Z

    Fix concat_lines in mvn to deal with CRLF
    
    Change from `tr` to `paste` to deal with CRLF line endings properly

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: [MNG-6255] Fix concat_lines in mvn to deal with CRLF

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the issue:

    https://github.com/apache/maven/pull/127
  
    @Tunaki I will disable the *CR* test, then


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: Fix concat_lines in mvn to deal with CRLF

Posted by Tunaki <gi...@git.apache.org>.
Github user Tunaki commented on the issue:

    https://github.com/apache/maven/pull/127
  
    This doesn't seem to work on CRLF files on Git Bash (or Ubuntu). Result is the same as with `tr`.
    
    ```sh
    $ echo -e "Foo\nBar" > test.txt
    $ cat -e test.txt 
    Foo$
    Bar$
    $ paste -s -d' ' test.txt 
    Foo Bar
    $ unix2dos test.txt 
    unix2dos: converting file test.txt to DOS format ...
    $ cat -e test.txt 
    Foo^M$
    Bar^M$
    $ paste -s -d' ' test.txt 
     Bar
    ```
    
    When the line endings were changed to Windows format, only the last line was kept.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: [MNG-6255] Fix concat_lines in mvn to deal with CRLF

Posted by Tunaki <gi...@git.apache.org>.
Github user Tunaki commented on the issue:

    https://github.com/apache/maven/pull/127
  
    This looks OK, verified with `bash` and `dash` (on Ubuntu 16.04), `tcsh` and `sh` (on FreeBSD 11.0). Could you add an integration test for this (https://github.com/apache/maven-integration-testing)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: Fix concat_lines in mvn to deal with CRLF

Posted by michael-o <gi...@git.apache.org>.
Github user michael-o commented on the issue:

    https://github.com/apache/maven/pull/127
  
    JIRA issue please.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: [MNG-6255] Fix concat_lines in mvn to deal with CRLF

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the issue:

    https://github.com/apache/maven/pull/127
  
    ping?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: Fix concat_lines in mvn to deal with CRLF

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the issue:

    https://github.com/apache/maven/pull/127
  
    Good point, I reverted to the original `tr` command, but stripping out both *CR* and *LF* now, which will have the desired effect on files with any set of line endings.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven issue #127: [MNG-6255] Fix concat_lines in mvn to deal with CRLF

Posted by Tunaki <gi...@git.apache.org>.
Github user Tunaki commented on the issue:

    https://github.com/apache/maven/pull/127
  
    Looks like we have a similar bug in `mvn.cmd`. The added `testJvmConfigFileCR` test fails on Windows:
    
    ```
    testJvmConfigFileCR(org.apache.maven.it.MavenITmng6255FixConcatLines)  Time elapsed: 1.983 sec  <<< FAILURE!
    junit.framework.ComparisonFailure: null expected:<ok[]> but was:<ok[-Xms256m-Xmx512m]>
      at junit.framework.Assert.assertEquals(Assert.java:81)
      at junit.framework.Assert.assertEquals(Assert.java:87)
      at org.apache.maven.it.MavenITmng6255FixConcatLines.runWithLineEndings(MavenITmng6255FixConcatLines.java:89)
      at org.apache.maven.it.MavenITmng6255FixConcatLines.testJvmConfigFileCR(MavenITmng6255FixConcatLines.java:50)
    ```
    
    Looks like the carriage returns at the end of the line were stripped and everything was put on a single line.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org