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:
0000000 I n d e x : s v n _ u s a g e
0000020 _ n o t e s . t x t \r \n = = = =
0000040 = = = = = = = = = = = = = = = =
*
0000120 = = = = = = = = = = = = = = = \r
0000140 \n - - - s v n _ u s a g e _ n
0000160 o t e s . t x t \t ( r e v i s i
0000200 o n 1 1 1 6 ) \r \n + + + s v
0000220 n _ u s a g e _ n o t e s . t x
0000240 t \t ( w o r k i n g c o p y )
0000260 \r \n @ @ - 6 1 2 2 , 3 + 6 1
0000300 2 2 , 6 @ @ \r \n \n M a r k
0000320 P h i p p a r d \n h t t p :
0000340 / / m a r k p h i p . b l o g s
0000360 p o t . c o m / \n + f o o \n +
0000400 b a r \n + z o t \n
0000413
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 dcchapman_at_acm.org
Chapman Consulting -- San Jose, CA
Received on 2011-02-01 21:40:16 CET