• SVN messing line endings & adding spaces

    From Nightfox@VERT/DIGDIST to All on Thursday, March 22, 2012 19:41:35
    Where I work, we use SVN (Subversion) as our revision control software for our projects. Sometimes I've noticed that it seems to mess up the line endings in our source files.. I know this because we use Visual Studio for much of our Windows code, and sometimes I'll check code into SVN, and the next time I launch Visual Studio and open one of the source files, it asks me if I want to normalize the line endings.

    Another thing I've seen is that sometimes it seems to add a bunch of extra spaces to the end of lines. I've seen this with some of the copyright headers we add to our source files - some lines have a few spaces added, some have a bunch.

    This doesn't happen all the time though, only sometimes.. It isn't a huge deal but seems odd nonetheless. Has anyone else who has used SVN noticed this?

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digdist.bbsindex.com
  • From Digital Man@VERT to Nightfox on Friday, March 23, 2012 01:42:29
    Re: SVN messing line endings & adding spaces
    By: Nightfox to All on Thu Mar 22 2012 07:41 pm

    Where I work, we use SVN (Subversion) as our revision control software for our projects. Sometimes I've noticed that it seems to mess up the line endings in our source files.. I know this because we use Visual Studio for much of our Windows code, and sometimes I'll check code into SVN, and the next time I launch Visual Studio and open one of the source files, it asks me if I want to normalize the line endings.

    Another thing I've seen is that sometimes it seems to add a bunch of extra spaces to the end of lines. I've seen this with some of the copyright headers we add to our source files - some lines have a few spaces added, some have a bunch.

    This doesn't happen all the time though, only sometimes.. It isn't a huge deal but seems odd nonetheless. Has anyone else who has used SVN noticed this?

    I don't think it's a problem particular to SVN. You can see the same thing when
    using CVS, Visual SourceSafe, or any number of other revision control systems. Especially if you check the file out with a *nix client and then edit it or (even worse) check it back in using a Windows client. First off, make sure the files are added/checked-in originally as text (not binary). Then make sure your
    client is configured to check-out text files in native line-ending mode (i.e. CRLF on Windows, LF on *nix).

    digital man

    Synchronet "Real Fact" #77:
    Synchronet Match Maker had at one time over 4000 profiles of men and women. Norco, CA WX: 49.0øF, 91.0% humidity, 0 mph NNW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Friday, March 23, 2012 18:38:36
    Re: SVN messing line endings & adding spaces
    By: Digital Man to Nightfox on Fri Mar 23 2012 01:42:29

    I don't think it's a problem particular to SVN. You can see the same thing when using CVS, Visual SourceSafe, or any number of other revision control systems. Especially if you check the file out with a *nix client and then edit it or (even worse) check it back in using a Windows client. First
    off, make sure the files are added/checked-in originally as text (not binary). Then make sure your client is configured to check-out text files
    in native line-ending mode (i.e. CRLF on Windows, LF on *nix).

    hmm, interesting.. I suppose that could be happening.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digdist.bbsindex.com
  • From Ragnarok@VERT/DOCKSUD to Digital Man on Monday, April 02, 2012 12:32:42
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    El 23/03/12 05:42, Digital Man escribió:
    Re: SVN messing line endings & adding spaces By: Nightfox to All on
    Thu Mar 22 2012 07:41 pm

    Where I work, we use SVN (Subversion) as our revision control
    software for our projects. Sometimes I've noticed that it seems
    to mess up the line endings in our source files.. I know this
    because we use Visual Studio for much of our Windows code, and
    sometimes I'll check code into SVN, and the next time I launch
    Visual Studio and open one of the source files, it asks me if I
    want to normalize the line endings.

    you can force the line ending with svn properties

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.12 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iEYEARECAAYFAk95xpoACgkQrka4e4h7i+ME0gCfe3PCoLbVKe8KRL8BfcVPZu0y E+AAoMko/47gQ6m6AMBsh1FtMDNUqPGD
    =ZxSC
    -----END PGP SIGNATURE-----

    ---
    þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Purple Nurple@VERT/SHENKS to Nightfox on Thursday, April 05, 2012 10:51:00

    Re: SVN messing line endings & adding spaces
    By: Digital Man to Nightfox on Fri Mar 23 2012 01:42:29

    I don't think it's a problem particular to SVN. You can see the same thin when using CVS, Visual SourceSafe, or any number of other revision contro systems. Especially if you check the file out with a *nix client and then edit it or (even worse) check it back in using a Windows client. First off, make sure the files are added/checked-in originally as text (not binary). Then make sure your client is configured to check-out text files in native line-ending mode (i.e. CRLF on Windows, LF on *nix).

    hmm, interesting.. I suppose that could be happening.

    I had a similar problem back in October when I used some Cygwin utilities
    (awk, I think) to do some batch modification of some VBPs. You can imagine
    my surprise when I did a diff (we use Team Foundation Server) and saw what happened to my line endings.

    Fortunately there was a utility I could use to pipe the output (unix2dos or something like that) and I was good to go.

    ---
    þ Synchronet þ SHENK'S EXPRESS, Virginia Beach, VA, shenks.synchro.net