[Un] Line endings - Windows or Unix?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrewdoull
    Unangband maintainer
    • Apr 2007
    • 872

    [Un] Line endings - Windows or Unix?

    Thoughts please...

    I'm not particular, because I use Eclipse, which supports conversion from one to the other.

    My hunch is windows, because it lowers the bar to contribute...
    The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
    In UnAngband, the level dives you.
    ASCII Dreams: http://roguelikedeveloper.blogspot.com
    Unangband: http://unangband.blogspot.com
  • Bandobras
    Knight
    • Apr 2007
    • 726

    #2
    My emacs supports both and conversion, so no problem for me. I don't know about vi. If we move to CRLF, we should convert all edit and help files --- here is where low-end contributions are most likely to be high-end in quality, as was the case with the options help file by Anne. Or perhaps only move to CRLF in text files and leave *.c in the standard C, that is Unix, format?

    Comment

    • Atarlost
      Swordsman
      • Apr 2007
      • 441

      #3
      wordpad can handle unix line endings and saves as windows text. I've never moved text files the other direction so I can't speak to that. Vi might not handle windows text, but I'd be surprised if Vim doesn't and that's the version that comes with most linuxes. I'd have to reboot to check, though, and I'm too lazy.
      One Ring to rule them all. One Ring to bind them.
      One Ring to bring them all and in the darkness interrupt the movie.

      Comment

      • Blackened
        Rookie
        • Oct 2007
        • 18

        #4
        Originally posted by Bandobras
        My emacs supports both and conversion, so no problem for me. I don't know about vi. […]
        There is no problem with different line ends in Vim either, nor is the conversion. I wonder, is anyone really still coding in old vi?

        Comment

        • takkaria
          Veteran
          • Apr 2007
          • 1951

          #5
          Originally posted by andrewdoull
          Thoughts please...

          I'm not particular, because I use Eclipse, which supports conversion from one to the other.

          My hunch is windows, because it lowers the bar to contribute...
          Why not use the svn:eol-style property in the repository so if you check out on Unix, you get LF, and on Windows, you get CRLF? That makes life easier for everyone.
          takkaria whispers something about options. -more-

          Comment

          • Bandobras
            Knight
            • Apr 2007
            • 726

            #6
            Originally posted by takkaria
            Why not use the svn:eol-style property in the repository so if you check out on Unix, you get LF, and on Windows, you get CRLF? That makes life easier for everyone.
            Pretty wise, but it assumes people are able to use SVN. Some don't and they just download the sources zip. I wonder what unzip does with line endings on various OSes and what line endings you have to feed to zip...

            About svn:eol-style, indeed some files don't have it. It may be borked due to import from CVS, I don't know. E.g.
            Code:
            svn proplist src/option.c
            shows nothing and so gets the Windows line endings even on Linux. Most other files are OK.

            Comment

            • takkaria
              Veteran
              • Apr 2007
              • 1951

              #7
              Originally posted by Bandobras
              Pretty wise, but it assumes people are able to use SVN. Some don't and they just download the sources zip. I wonder what unzip does with line endings on various OSes and what line endings you have to feed to zip...
              unzip -aL converts line endings. However, it would just be better to package the Windows source as a zip with CRLF and source for other platforms as a tar.bz2/gz with LF endings. I would assume that since this thread is about "lowering the cost of contribution", then it's mostly about SVN-- maybe I'm wrong.

              About svn:eol-style, indeed some files don't have it. It may be borked due to import from CVS, I don't know. E.g.
              Code:
              svn proplist src/option.c
              shows nothing and so gets the Windows line endings even on Linux. Most other files are OK.
              I should have just fixed this.
              takkaria whispers something about options. -more-

              Comment

              • andrewdoull
                Unangband maintainer
                • Apr 2007
                • 872

                #8
                Originally posted by Bandobras
                Pretty wise, but it assumes people are able to use SVN. Some don't and they just download the sources zip. I wonder what unzip does with line endings on various OSes and what line endings you have to feed to zip...

                About svn:eol-style, indeed some files don't have it. It may be borked due to import from CVS, I don't know. E.g.
                Code:
                svn proplist src/option.c
                shows nothing and so gets the Windows line endings even on Linux. Most other files are OK.
                Which I accidentally converted from Unix line endings as a part of a commit the other day.

                It seems whomever contributed the original option.c file to the tree forgot to set up the svn property list for this file. They may need some svn training...

                Sounds like the consensus is Windows + set up the properties correctly.

                Andrew
                The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
                In UnAngband, the level dives you.
                ASCII Dreams: http://roguelikedeveloper.blogspot.com
                Unangband: http://unangband.blogspot.com

                Comment

                • Bandobras
                  Knight
                  • Apr 2007
                  • 726

                  #9
                  Originally posted by andrewdoull
                  It seems whomever contributed the original option.c file to the tree forgot to set up the svn property list for this file. They may need some svn training...
                  Ahem. That said noble person might have thought, that our SVN repository is set up to add the property by default to every file. Myself, I'm not sure if and how such defaults can be set for a repository. Anyway, svn propset is cheap, it can even run recursively, but beware of breaking binary files via strange properties.

                  Originally posted by andrewdoull
                  Sounds like the consensus is Windows + set up the properties correctly.
                  Agreed.

                  I'd say windows-style sources are enough, because non-Windows people are likely to be able to master SVN, while the people that contribute only documentation or game content (e.g. dungeon descriptions) are likely to run Wingdows, SVN or not.

                  Comment

                  Working...
                  😀
                  😂
                  🥰
                  😘
                  🤢
                  😎
                  😞
                  😡
                  👍
                  👎