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

Re: repository conversion on windows fails / binary file

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-06-11 22:10:22 CEST

Ben Collins-Sussman wrote:

>Hontvari Jozsef <hontvari@solware.com> writes:
>>From: "Ben Collins-Sussman"
>>>Is there any way we can look at the dumpfile so we can reproduce?
>>I can reproduce it easily, I make a new repository with the current windows
>>binary, r2140, svn import a single file, dump, delete the repository, create
>>another repository, svnadmin load, and it fails with a similar message.
>>I have attached the example dump file from the above process.
>I just loaded the dumpfile into my emacs, and noticed that the whole
>dumpfile is CRLF terminated. I bet that's screwing up the 'svnadmin
>load' parser -- I think it's looking for '\n' specifically at the end
>of each line.
>Hmmm, I'm not sure I understand why 'svnadmin dump' is producing a
>CRLF file at all, I need to examine... maybe my hypothesis is wrong.
They're CRLF-terminated because we use svn_stream_from_stdio to open the
dumper and loader streams. The stdio streams are translated by default
on Windows.

I don't know what happens during the load (LF <-> CRLF translation
should be reversible), but I suspect that the the translated stdio
thinks it has an EOF when it sees a ^Z in the input stream, which
interestingly enough occurs very near the beginning of a Word document.

Is that broken? Well, it's only true of translated streams, and if you
write binary data to a stream that believes it's text, you get what you

The solution is to reopen the streams in binary mode, obviously. I
wonder how you do that in APR.

Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 11 22:10:53 2002

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