[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: Michael Wood <mwood_at_its.uct.ac.za>
Date: 2003-05-14 16:58:49 CEST

On Wed, May 14, 2003 at 04:15:06PM +0200, Robert Pluim wrote:
> Tobias Ringstrom writes:
[snip]
> > > def pass3(ctx):
> > > # sort the log files
> > >- os.system('sort %s > %s' % (ctx.log_fname_base + CLEAN_REVS_SUFFIX,
> > >- ctx.log_fname_base + SORTED_REVS_SUFFIX))
> > >+ run_external('sort %s > %s' % (ctx.log_fname_base + CLEAN_REVS_SUFFIX,
> > >+ ctx.log_fname_base + SORTED_REVS_SUFFIX))
> > Unrelated to your patch, but does sort exist for non-unix systems?
>
> Well, if you install cygwin on your windows box, yes. You mean you
> don't? ;-)

This is what the cvs2svn.py README says about it:

     - Make sure you have GNU 'sort' installed, or some other sort
       program that handles large files other than by reading them
       entirely into memory.

> > 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.
[snip]

I think the whole point of using GNU sort or an equivalent is that you
avoid using "a large chunk of memory."

-- 
Michael Wood <mwood@its.uct.ac.za>
---------------------------------------------------------------------
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:00:14 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.