Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-4906

svn patch adds newline to last line of file with svn:eol-style

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.14.2
    • None
    • cmdline client
    • None

    Description

      When a versioned file has the svn:eol-style property, the last line of the file does not end with a newline, and the user applies a patch with 'svn patch' (where the patch does not contain changes to the last line or any lines near it), 'svn patch' adds a newline to the last line of the file.

      I've confirmed that the same issue is reproduced for all possible values of svn:eol-style (native, LF, CRLF, CR).

      This issue was found by Vincent Lefevre, who provided the following reproduction script (see attachment).

      References:

      Mail thread: dev thread "[BUG] svn patch with svn:eol-style set to native" started 14 August 2022: https://lists.apache.org/thread/6pm44zc0kq4d63nfh8h5bw7llfctp6cy

      Originally discovered in dev thread "[PATCH] URL update to https" – see the part starting with "Are you sure" in 14 August 2022 message:[ https://lists.apache.org/thread/w0fld2p0qzg5oo6tqgw1tcvtolndvg9t|https://lists.apache.org/thread/w0fld2p0qzg5oo6tqgw1tcvtolndvg9t]

      Attachments

        1. reproduction-script.txt
          0.4 kB
          Nathan Hartman

        Activity

          People

            Unassigned Unassigned
            hartmannathan Nathan Hartman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: