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

Re: [PATCH] make cvs2svn check the exit status of commands

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-05-14 23:29:37 CEST

On Wed, May 14, 2003 at 05:06:37PM +0200, Tobias Ringstrom wrote:
>...
> > > If not, the following fairly obvious code might work:
> > >
> > > def sort_file(dst, src):
> > > lines = open(src).readlines()
> > > lines.sort()
> > > open(dst, 'w').writelines(lines)
> >
> >I assume that would work, but it might consume a large chunk of
> >memory. People who know more about python than I will have to
> >comment.

That is definitely an in-memory operation.

> True. It will consume about as much memory as the file is large. The
> sort happens in place, so there will not be a factor of two.

True.

> One possibility is to try to run sort first, and fall back to a python
> sort if it fails. On the other hand, RAM is really cheap these days! ;-)

Not *that* cheap. The sort was performed externally because that file could
be gigabytes in size. cvs2svn is intended to convert repositories from small
to huge.

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 May 14 23:28:25 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.