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

Re: rcsparse.py

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-02-26 02:33:26 CET

On Tue, Feb 25, 2003 at 02:31:08PM -0800, Dale Hirt wrote:
> So,
>
> I finally manage to get everything compiled and working, and what happens?
> Rcsparse.py chokes on the first binary cvs file it finds. Ugh. Any ideas?
> The stack trace follows for your fun and amusement.
>...
> File "D:\work\subversion\tools\cvs2svn\cvs2svn.py", line 232, in visit_file
> p.parse(open(pathname), cd)

Here is the problem. We aren't opening the file in binary mode, so it
defaults to text mode, which does newline translation. That is going to
break things pretty quick.

It happens to work on Unix boxes because there is no difference between text
and binary modes.

The line should read:

  p.parse(open(pathname, 'rb'), cd)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 26 02:28:54 2003

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.