Re: missing carriage returns from output of "svn diff" in Windows
On Tue, Feb 01, 2011 at 12:39:29PM -0800, David Chapman wrote: > 000 I n d e x : s v n _ u s a g e > 020 _ n o t e s . t x t \r \n = = = = > 040 = = = = = = = = = = = = = = = = > * > 120 = = = = = = = = = = = = = = = \r > 140 \n - - - s v n _ u s a g e _ n > 160 o t e s . t x t \t ( r e v i s i > 200 o n 1 1 1 6 ) \r \n + + + s v > 220 n _ u s a g e _ n o t e s . t x > 240 t \t ( w o r k i n g c o p y ) > 260 \r \n @ @ - 6 1 2 2 , 3 + 6 1 > 300 2 2 , 6 @ @ \r \n \n M a r k > 320 P h i p p a r d \n h t t p : > 340 / / m a r k p h i p . b l o g s > 360 p o t . c o m / \n + f o o \n + > 400 b a r \n + z o t \n > 413 > > Note how the first part of the file has "\r\n" while the last part > (showing the extra lines) has only '\n'. The file itself has "\r\n" > for every line, and I have the following line in > C:\Users\David\AppData\Roaming\Subversion\config: > > *.txt = svn:eol-style=native This is a known issue: http://subversion.tigris.org/issues/show_bug.cgi?id=3338 Stefan
Re: missing carriage returns from output of "svn diff" in Windows
On 2/1/2011 1:29 PM, Johan Corveleyn wrote: On Tue, Feb 1, 2011 at 9:39 PM, David Chapman wrote: Running Subversion 1.6.15 under Windows 7, if I redirect the output of "svn diff" to a file and then try to edit that file using Notepad, the line breaks are garbled. In particular they have only the '\n' character, not the '\r' character. For example, if "svn_usage_notes.txt" is in my repository, and I do the following in a sandbox: echo foo>> svn_usage_notes.txt echo bar>> svn_usage_notes.txt echo zot>> svn_usage_notes.txt svn diff svn_usage_notes.txt> wowow.txt od -c wowow.txt I get: 000 I n d e x : s v n _ u s a g e 020 _ n o t e s . t x t \r \n = = = = 040 = = = = = = = = = = = = = = = = * 120 = = = = = = = = = = = = = = = \r 140 \n - - - s v n _ u s a g e _ n 160 o t e s . t x t \t ( r e v i s i 200 o n 1 1 1 6 ) \r \n + + + s v 220 n _ u s a g e _ n o t e s . t x 240 t \t ( w o r k i n g c o p y ) 260 \r \n @ @ - 6 1 2 2 , 3 + 6 1 300 2 2 , 6 @ @ \r \n \n M a r k 320 P h i p p a r d \n h t t p : 340 / / m a r k p h i p . b l o g s 360 p o t . c o m / \n + f o o \n + 400 b a r \n + z o t \n 413 Note how the first part of the file has "\r\n" while the last part (showing the extra lines) has only '\n'. The file itself has "\r\n" for every line, and I have the following line in C:\Users\David\AppData\Roaming\Subversion\config: *.txt = svn:eol-style=native Ok, that may be your client side config, but maybe it's not working correctly or not being picked up for whatever reason. Can you verify directly whether the property is set on the file? svn propget svn:eol-style svn_usage_notes.txt "svn propget svn:eol-style svn_usage_notes.txt" returns "native", as expected. I should point out that the problem is not specific to this one file, but is common to every text file in my sandboxes (including C and C++ source code). I've been using Subversion for years under both Windows and Linux and am pretty careful to set autoprops for all appropriate file types. Bad things happen otherwise... The absence of newlines makes it impossible to view the differences file in Notepad. Years ago before I knew about "unzip -a", I wrote a program to add carriage returns to text files being copied from Linux to Windows and so I can use that, but it would be nice to have system-appropriate line endings in the output of "svn diff" without this extra step. Is anyone else seeing this? Is there a configuration parameter I can set to fix it, or is it a bug that should be bumped to the dev list? Certainly no need to escalate to the dev list (unless we're going to discuss design/implementation considerations or something). We can discuss it on this list, and if we find out it's a genuine issue, you can submit it to the issue tracker. It's been a while since I was subscribed to this list, and as I recall bumping to dev was the next step. Submitting an issue works for me if that's the preferred way now. (For the record, I have "UnxUtils.zip" loaded, so I have a number of Unix/Linux utilities such as "od" available under Windows, and only the Windows Subversion executable ever writes into a Windows sandbox.) Ok, this may be a very important detail. Can you first try to reproduce this issue without the UnxUtils loaded? Uninstalling the Unix utility set is rather a drastic step, but I removed its executable directory from the search path for a newly opened shell (there is no "od" and no "diff" on the search path; I checked). Same result. Which client are you using actually (which distribution)? You aren't using one from cygwin are you? There are known problems with the svn client that comes with cygwin (don't know the details, but I think it can be confused about its native eol-style, because it thinks it's running on unix etc.). Also, is this something new you're seeing only from 1.6.15? Can you try reproducing with an older version, and try to find out when the problem first appeared? The installation is Windows native (i.e. Command Prompt) from Setup-Subversion-1.6.15.msi, downloaded December 26, 2010 as I was building a new machine to recover from a crash on my old one. :-( I've never used Cygwin; I always try to ensure that I have enough machines that I can boot Linux in native mode on a separate machine alongside my Windows machine. TortoiseSVN is not installed either. My eight-year-old ThinkPad wheezes a bit, but it still boots Windows XP
Re: missing carriage returns from output of "svn diff" in Windows
On Tue, Feb 1, 2011 at 9:39 PM, David Chapman wrote: > Running Subversion 1.6.15 under Windows 7, if I redirect the output of "svn > diff" to a file and then try to edit that file using Notepad, the line > breaks are garbled. In particular they have only the '\n' character, not > the '\r' character. > > For example, if "svn_usage_notes.txt" is in my repository, and I do the > following in a sandbox: > > echo foo >> svn_usage_notes.txt > echo bar >> svn_usage_notes.txt > echo zot >> svn_usage_notes.txt > svn diff svn_usage_notes.txt > wowow.txt > od -c wowow.txt > > I get: > > 000 I n d e x : s v n _ u s a g e > 020 _ n o t e s . t x t \r \n = = = = > 040 = = = = = = = = = = = = = = = = > * > 120 = = = = = = = = = = = = = = = \r > 140 \n - - - s v n _ u s a g e _ n > 160 o t e s . t x t \t ( r e v i s i > 200 o n 1 1 1 6 ) \r \n + + + s v > 220 n _ u s a g e _ n o t e s . t x > 240 t \t ( w o r k i n g c o p y ) > 260 \r \n @ @ - 6 1 2 2 , 3 + 6 1 > 300 2 2 , 6 @ @ \r \n \n M a r k > 320 P h i p p a r d \n h t t p : > 340 / / m a r k p h i p . b l o g s > 360 p o t . c o m / \n + f o o \n + > 400 b a r \n + z o t \n > 413 > > Note how the first part of the file has "\r\n" while the last part (showing > the extra lines) has only '\n'. The file itself has "\r\n" for every line, > and I have the following line in > C:\Users\David\AppData\Roaming\Subversion\config: > > *.txt = svn:eol-style=native Ok, that may be your client side config, but maybe it's not working correctly or not being picked up for whatever reason. Can you verify directly whether the property is set on the file? svn propget svn:eol-style svn_usage_notes.txt > The absence of newlines makes it impossible to view the differences file in > Notepad. Years ago before I knew about "unzip -a", I wrote a program to add > carriage returns to text files being copied from Linux to Windows and so I > can use that, but it would be nice to have system-appropriate line endings > in the output of "svn diff" without this extra step. > > Is anyone else seeing this? Is there a configuration parameter I can set to > fix it, or is it a bug that should be bumped to the dev list? Certainly no need to escalate to the dev list (unless we're going to discuss design/implementation considerations or something). We can discuss it on this list, and if we find out it's a genuine issue, you can submit it to the issue tracker. > (For the record, I have "UnxUtils.zip" loaded, so I have a number of > Unix/Linux utilities such as "od" available under Windows, and only the > Windows Subversion executable ever writes into a Windows sandbox.) Ok, this may be a very important detail. Can you first try to reproduce this issue without the UnxUtils loaded? Which client are you using actually (which distribution)? You aren't using one from cygwin are you? There are known problems with the svn client that comes with cygwin (don't know the details, but I think it can be confused about its native eol-style, because it thinks it's running on unix etc.). Also, is this something new you're seeing only from 1.6.15? Can you try reproducing with an older version, and try to find out when the problem first appeared? Cheers, -- Johan
missing carriage returns from output of "svn diff" in Windows
Running Subversion 1.6.15 under Windows 7, if I redirect the output of "svn diff" to a file and then try to edit that file using Notepad, the line breaks are garbled. In particular they have only the '\n' character, not the '\r' character. For example, if "svn_usage_notes.txt" is in my repository, and I do the following in a sandbox: echo foo >> svn_usage_notes.txt echo bar >> svn_usage_notes.txt echo zot >> svn_usage_notes.txt svn diff svn_usage_notes.txt > wowow.txt od -c wowow.txt I get: 000 I n d e x : s v n _ u s a g e 020 _ n o t e s . t x t \r \n = = = = 040 = = = = = = = = = = = = = = = = * 120 = = = = = = = = = = = = = = = \r 140 \n - - - s v n _ u s a g e _ n 160 o t e s . t x t \t ( r e v i s i 200 o n 1 1 1 6 ) \r \n + + + s v 220 n _ u s a g e _ n o t e s . t x 240 t \t ( w o r k i n g c o p y ) 260 \r \n @ @ - 6 1 2 2 , 3 + 6 1 300 2 2 , 6 @ @ \r \n \n M a r k 320 P h i p p a r d \n h t t p : 340 / / m a r k p h i p . b l o g s 360 p o t . c o m / \n + f o o \n + 400 b a r \n + z o t \n 413 Note how the first part of the file has "\r\n" while the last part (showing the extra lines) has only '\n'. The file itself has "\r\n" for every line, and I have the following line in C:\Users\David\AppData\Roaming\Subversion\config: *.txt = svn:eol-style=native The absence of newlines makes it impossible to view the differences file in Notepad. Years ago before I knew about "unzip -a", I wrote a program to add carriage returns to text files being copied from Linux to Windows and so I can use that, but it would be nice to have system-appropriate line endings in the output of "svn diff" without this extra step. Is anyone else seeing this? Is there a configuration parameter I can set to fix it, or is it a bug that should be bumped to the dev list? (For the record, I have "UnxUtils.zip" loaded, so I have a number of Unix/Linux utilities such as "od" available under Windows, and only the Windows Subversion executable ever writes into a Windows sandbox.) Thanks. -- David Chapman dcchap...@acm.org Chapman Consulting -- San Jose, CA