[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: Dale Hirt <dale_at_sbcltd.com>
Date: 2003-02-26 02:40:44 CET

And that will work for both text and binary files on both platforms?

-----Original Message-----
From: Greg Stein [mailto:gstein@lyra.org]
Sent: Tuesday, February 25, 2003 5:33 PM
To: Dale Hirt
Cc: dev@subversion.tigris.org
Subject: Re: rcsparse.py

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:41:28 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.