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

Re: svn commit: r20191 - trunk/subversion/tests/cmdline

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-06-21 17:11:28 CEST

On Wed, Jun 21, 2006 at 07:28:22PM +0530, Kamesh Jayachandran wrote:
> >+ # eol styl of test.dsp is CRLF, so diff will use that too. Make sure we
> >+ # define CRLF in a platform independent way.
> >+ if os.name == 'nt':
> >+ crlf = '\n'
> >+ else:
> >+ crlf = '\r\n'
> >
> Should it not be(Or my eyes are wrong!!), windows line endings are
> '\r\n' and unix(posix) ones are '\n' .
>

That's right, so I assume that in Python on Windows, '\n' expands to
CR LF, while on saner platforms, it expands to LF. The code above will
therefore assign CR LF to the crlf variable on all platforms.

> In anycase why not use os.linesep?
>

Possibly because we want CRLF in all cases?

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 21 17:12:15 2006

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.