[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: Tobias Ringstrom <tobias_at_ringstrom.mine.nu>
Date: 2003-05-14 17:06:37 CEST

Robert Pluim wrote:
> Well, if you install cygwin on your windows box, yes. You mean you
> don't? ;-)

Of course I do. I'm talking about all the other guys! :-)

> > 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.

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.

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! ;-)

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 14 17:07:39 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.