[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

TortoiseSVN Diff/Patch creates files with mixed Unix and Win32 line endings when creating patch from pure unix files.

From: demerphq <demerphq_at_gmail.com>
Date: 2006-11-20 12:53:39 CET

Hi,

I've discovered that when producing a unified diff of a file with unix
line endings using Tortoise SVN produces files with mixed Win32/Unix
line endings. The diff headers have Win32 line endings but the rest
does not. This makes many unix patch(1) programs unhappy and renders
the patch inexplicably unappliable and apparently corrupt. Running
dos2unix on the file first removes the spurious win32 line endings.

Steps to reproduce the problem:

  1. Add a file containing unix line endings to a repository.
  2. Change some content in the file
  3. Use Create Patch to create a unified diff.
  4. copy file to new name
  5. Run dos2unix on new file.
  6. File size is different.
  7. Examine original patch file in hex-viewer, header lines of the
diff use different line endings to the rest of the file.

IMO the diff should identify that the files have unix line endings and
produce headers accordingly, or emit only Win32 line endings (which
most modern patches, unix or not, can handle). The problem seems to be
only that the file contains mixed line endings defeating whatever line
ending heuristics patch programs use.

Just wanted to say that you guys have done an outstanding job on this
project. Ive only been using it a short while but it has really
improved my productivity. ++ to you all.

Thanks a lot,
Yves
ps: BTW, Im not subscribed to this list, please CC me on any replies,

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Nov 20 12:59:56 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.