Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with WinSCP with end-of-line style 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 editor or Notepad++, the file end-of-line style changes to Windows. So when I resave the file back to Ubuntu the lines 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 end-of-line style issue?

like image 811
Tihom Avatar asked Dec 27 '09 23:12

Tihom


People also ask

How do I change transfer settings in WinSCP?

Default Transfer Settings To change the settings, use Edit button to show Transfer Settings dialog (alternatively you may click Transfer settings box). You cannot delete nor reorder the default transfer settings.

Can we use WinSCP for Linux?

Transfer Files with WinSCP After connecting, you'll get two panels with files. The one on the right shows the files on the Linux instance and it opens by default in the user's home directory. This is /root for the root user and /home/name_of_user for other users.


2 Answers

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.

like image 149
Pascal Thivent Avatar answered Sep 25 '22 03:09

Pascal Thivent


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.

like image 37
Tihom Avatar answered Sep 26 '22 03:09

Tihom