Wednesday, April 6, 2011

Problems with WinSCP with whitespaces on ubuntu linux when using SVN Diff

My files are on a remote Ubuntu linux server. When I download the files and edit it in either the WinSCP text client or notepad++, the file whitespaces changes to windows. So when I resave the file back to ubuntu the whitespace are off and SVN Diff thinks every line has changed.

FYI, I edit the file by double clicking the file in WinSCP. This program launches the file in the editor. Every time I save, the file is automatically copied back to the linux server.

How do I prevent the whitespace issue?

thanks in advance

From stackoverflow
  • Does this thread help? More precisely this part:

    From this, it seems to me that you have forced WinSCP to use text mode transfer, which imply the unix->dos conversion. Just force the binary mode to avoid the conversion.

    Tihom : This didn't work for me. It also didn't work for the person on the thread also from what I can tell.
  • I wasn't able to figure out why I had the whitespace issue but I was able to figure out how to ignore whitespaces.

    You can use: svn diff -x'-uw --ignore-eol-style'

    This worked well enough.

0 comments:

Post a Comment