[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:18:51 CEST

Branko Čibej wrote:

> 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 deserve.
>
> The solution is to reopen the streams in binary mode, obviously. I
> wonder how you do that in APR.
>
BTW, I can dump and reload a repo that only contains text files. And I
just confirmed my suspicions by adding a ^Z in a file in the wrong place.

(And I have a couple of questions about the dump format:

    * Where are the checksums? I thought there would be checksums ...
    * Why are we dumping timestamps in the old, weird format that we're
      about to forget how to parse?)

-- 
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:19:22 2002

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

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