Derby
  1. Derby
  2. DERBY-5979

ant release target creates a release.properties that has conflicting line endings so automatic checkin fails

    Details

    • Urgency:
      Urgent
    • Issue & fix info:
      High Value Fix

      Description

      The ant release target on Windows creates release.properties with inconsistent line endings that prevent checkin.

      This may be a configuration issue. I have *.properties = svn:eol-style=native which I think is correct but I could not diff or checkin the file until I removed the dos line endings. There are similar issues with the release notes but because they are not checked in as part of the a script we document how to fix them up.

      1. derby-5979-1.diff
        1 kB
        Dyre Tjeldvoll
      2. derby-5979-2.diff
        2 kB
        Dyre Tjeldvoll
      3. derby-5979-3-a.diff
        3 kB
        Dyre Tjeldvoll
      4. derby-5979-3-b.diff
        1 kB
        Dyre Tjeldvoll

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          242d 11h 50m 1 Dyre Tjeldvoll 03/Jul/13 12:25
          Resolved Resolved Closed Closed
          566d 12h 57m 1 Myrna van Lunteren 21/Jan/15 00:23
          Myrna van Lunteren made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Myrna van Lunteren added a comment -

          bulk change to close all issues resolved but not closed and not changed since June 1, 2014.

          Show
          Myrna van Lunteren added a comment - bulk change to close all issues resolved but not closed and not changed since June 1, 2014.
          Myrna van Lunteren made changes -
          Fix Version/s 10.10.2.0 [ 12326659 ]
          Fix Version/s 10.10.1.4 [ 12324247 ]
          Kathey Marsden made changes -
          Labels derby_triage10_11 derby_backport_reject_10_8
          Gavin made changes -
          Workflow jira [ 12732532 ] Default workflow, editable Closed status [ 12802561 ]
          Dyre Tjeldvoll made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.10.1.3 [ 12324247 ]
          Resolution Fixed [ 1 ]
          Hide
          ASF subversion and git services added a comment -

          Commit 1499287 from Dyre Tjeldvoll
          [ https://svn.apache.org/r1499287 ]

          DERBY-5979: Part a: Do not use \n to terminate lines in Apache License header String constant and instead join the line strings with the value of line.separator property.

          Show
          ASF subversion and git services added a comment - Commit 1499287 from Dyre Tjeldvoll [ https://svn.apache.org/r1499287 ] DERBY-5979 : Part a: Do not use \n to terminate lines in Apache License header String constant and instead join the line strings with the value of line.separator property.
          Hide
          ASF subversion and git services added a comment -

          Commit 1499244 from Dyre Tjeldvoll
          [ https://svn.apache.org/r1499244 ]

          DERBY-5979: Part b: 1) Make properties.dir absolute by prepending $

          {basedir}. This way the release-targets work even when cwd is not equal to ${basedir}

          (as could be the case when invoking those target from within an IDE). 2) Change the value of derby.junit.jvm from java to $

          {java.home}

          /bin/java. This ensures that junit-ant-tasks work even if invoked from an environment (such as an IDE) where the JAVA_HOME jvm may be different from the first jvm in PATH.

          Show
          ASF subversion and git services added a comment - Commit 1499244 from Dyre Tjeldvoll [ https://svn.apache.org/r1499244 ] DERBY-5979 : Part b: 1) Make properties.dir absolute by prepending $ {basedir}. This way the release-targets work even when cwd is not equal to ${basedir} (as could be the case when invoking those target from within an IDE). 2) Change the value of derby.junit.jvm from java to $ {java.home} /bin/java. This ensures that junit-ant-tasks work even if invoked from an environment (such as an IDE) where the JAVA_HOME jvm may be different from the first jvm in PATH.
          Hide
          Knut Anders Hatlen added a comment -

          +1 to both patches.

          Show
          Knut Anders Hatlen added a comment - +1 to both patches.
          Dyre Tjeldvoll made changes -
          Attachment derby-5979-3-a.diff [ 12590429 ]
          Attachment derby-5979-3-b.diff [ 12590430 ]
          Hide
          Dyre Tjeldvoll added a comment -

          Splitting into derby-5979-3-a.diff (line endings in ReleaseProperties.java) and
          derby-5979-3-b.diff (build.xml changes).

          Show
          Dyre Tjeldvoll added a comment - Splitting into derby-5979-3-a.diff (line endings in ReleaseProperties.java) and derby-5979-3-b.diff (build.xml changes).
          Hide
          Knut Anders Hatlen added a comment -

          I think the updated patch only replaces the last newline character in the license header, and that parentheses are needed to make the replace() call work on the entire string.

          The changes in build.xml look like good improvements that will make building and testing more robust. (Although not strictly necessary to fix the line endings, if I understand?)

          Show
          Knut Anders Hatlen added a comment - I think the updated patch only replaces the last newline character in the license header, and that parentheses are needed to make the replace() call work on the entire string. The changes in build.xml look like good improvements that will make building and testing more robust. (Although not strictly necessary to fix the line endings, if I understand?)
          Dyre Tjeldvoll made changes -
          Attachment derby-5979-2.diff [ 12590261 ]
          Hide
          Dyre Tjeldvoll added a comment - - edited

          Thanks for the review, Knut. Attaching derby-5979-2.diff which hopefully will have the entire change as well as removing the extra variable. The patch also changes the derby.junit.jvm property from "java" to "$

          {java.home}

          /bin/java" in build.xml.

          Show
          Dyre Tjeldvoll added a comment - - edited Thanks for the review, Knut. Attaching derby-5979-2.diff which hopefully will have the entire change as well as removing the extra variable. The patch also changes the derby.junit.jvm property from "java" to "$ {java.home} /bin/java" in build.xml.
          Dyre Tjeldvoll made changes -
          Assignee Dyre Tjeldvoll [ dyret ]
          Hide
          Knut Anders Hatlen added a comment -

          Thanks, Dyre. You mentioned some changes to the properties.dir property, but I can't find them in the patch (only the changes to ReleaseProperties.java are there).

          I think the changes look good. In order to clear up the potential confusion of having two constants with almost the same name, what about collapsing them to a single constant declared like this:

          private static final String APACHE_LICENSE_HEADER = (
          "# Licensed to the Apache Software Foundation (ASF) under one or more\n" +
          ...
          "\n").replace('\n', ...);

          Show
          Knut Anders Hatlen added a comment - Thanks, Dyre. You mentioned some changes to the properties.dir property, but I can't find them in the patch (only the changes to ReleaseProperties.java are there). I think the changes look good. In order to clear up the potential confusion of having two constants with almost the same name, what about collapsing them to a single constant declared like this: private static final String APACHE_LICENSE_HEADER = ( "# Licensed to the Apache Software Foundation (ASF) under one or more\n" + ... "\n").replace('\n', ...);
          Dyre Tjeldvoll made changes -
          Attachment derby-5979-1.diff [ 12590226 ]
          Hide
          Dyre Tjeldvoll added a comment - - edited

          Patch derby-5979-1.diff fixes the hard-coded LF-line endings in the Apache licence String constant. Also adds basedir to the properties.dir property to make it absolute.

          Show
          Dyre Tjeldvoll added a comment - - edited Patch derby-5979-1.diff fixes the hard-coded LF-line endings in the Apache licence String constant. Also adds basedir to the properties.dir property to make it absolute.
          Rick Hillegas made changes -
          Labels derby_triage10_11
          Mike Matrigali made changes -
          Component/s Build tools [ 11405 ]
          Myrna van Lunteren made changes -
          Link This issue relates to DERBY-5461 [ DERBY-5461 ]
          Kathey Marsden made changes -
          Field Original Value New Value
          Link This issue is related to DERBY-5924 [ DERBY-5924 ]
          Kathey Marsden created issue -

            People

            • Assignee:
              Dyre Tjeldvoll
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development