Lucene.Net
  1. Lucene.Net
  2. LUCENENET-453

Many files need proper svn properties to set the linefeeds

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Lucene.Net 2.9.4
    • Component/s: None
    • Labels:
      None

      Description

      Many files are lacking the svn:eol-style proper which should be set to native, I'll attach a list later.

      Some files have inconsistent linefeeds, I'll attach a patch.

      Some files even have bad mine-types. You need to run

      svn pd svn:mime-type

      on

      test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs

      build.cmd should likely get an svn:eol-style of crlf

        Activity

        Hide
        Stefan Bodewig added a comment -

        patch that fixes inconsistent linefeeds

        Show
        Stefan Bodewig added a comment - patch that fixes inconsistent linefeeds
        Hide
        Stefan Bodewig added a comment -

        list of files that need their svn:eol-style property set to native

        Show
        Stefan Bodewig added a comment - list of files that need their svn:eol-style property set to native
        Hide
        Prescott Nasser added a comment -

        Hey Stefan is test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs the only file with the bad mime-type? Also, how do you run a scan on all files for something like this? I have no idea now that works.

        Also for 'build.cmd should likely get an svn:eol-style of crlf' what does that mean exactly? (Sorry out of my depth here)

        Show
        Prescott Nasser added a comment - Hey Stefan is test/contrib/Core/Analysis/Ext/Analysis.Ext.Test.cs the only file with the bad mime-type? Also, how do you run a scan on all files for something like this? I have no idea now that works. Also for 'build.cmd should likely get an svn:eol-style of crlf' what does that mean exactly? (Sorry out of my depth here)
        Hide
        Stefan Bodewig added a comment -

        Basically I did something like

        find . -name *.cs -print0 | xargs -0 -e svn ps svn:eol-style native

        i.e. I set the eol-style to native for all C# sources and then used "svn status" to see which ones didn't have that already. Repeat for the other file types I expected to have bad line-ends. Another approach would be to run Ant's fixcrlf task over the tree and see what gets changed. I'm sure there are other ways to do this.

        svn will complain if you try to set the svn:eol-style property on a file with a binary MIME type. When I started to write the comment I expected to find more files than the one, that's why it reads a bit weird. Yes, AFAIR this was the only binary source file.

        svn tracks line-feed information in the svn:eol-style property. By default it doesn't do any transformations at all. If you set it to native then all line-feeds will be transformed when checking out files (I think svn uses \n internally) to your platform's default and back on commit. Apart from native there are explicit values for "always \n" and so on. You use that for files that are only meaningful on specific platforms (shell scripts and batch files, mostly). build.cmd is Windows only so it makes sense to set the property to "CRLF".

        See http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style

        Show
        Stefan Bodewig added a comment - Basically I did something like find . -name *.cs -print0 | xargs -0 -e svn ps svn:eol-style native i.e. I set the eol-style to native for all C# sources and then used "svn status" to see which ones didn't have that already. Repeat for the other file types I expected to have bad line-ends. Another approach would be to run Ant's fixcrlf task over the tree and see what gets changed. I'm sure there are other ways to do this. svn will complain if you try to set the svn:eol-style property on a file with a binary MIME type. When I started to write the comment I expected to find more files than the one, that's why it reads a bit weird. Yes, AFAIR this was the only binary source file. svn tracks line-feed information in the svn:eol-style property. By default it doesn't do any transformations at all. If you set it to native then all line-feeds will be transformed when checking out files (I think svn uses \n internally) to your platform's default and back on commit. Apart from native there are explicit values for "always \n" and so on. You use that for files that are only meaningful on specific platforms (shell scripts and batch files, mostly). build.cmd is Windows only so it makes sense to set the property to "CRLF". See http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style
        Hide
        Prescott Nasser added a comment -

        Committed

        Show
        Prescott Nasser added a comment - Committed

          People

          • Assignee:
            Prescott Nasser
            Reporter:
            Stefan Bodewig
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development