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

Re: [Issue 1896] [libsvn_fs_fs] Fix 'Directory not empty' error when removing committed txn

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2004-05-27 18:37:10 CEST

Branko Čibej wrote:

> rooneg@tigris.org wrote:
>
>> Actually, since APR lacks a 'recursively delete directory' function,
>> I'm not
>> sure if this can be solved there. Working around the problem involves
>> rewinding
>> a directory every time we delete something in it. apr_file_remove and
>> apr_dir_remove can't do that, because it has no knowledge of the
>> enclosing
>> directory. It's likely that we'll have to fix the bug in Subversion,
>> rather
>> than APR.
>>
>>
> Another workaround is to do the complete readdir into memory first, then
> iterate over that list. It uses more memory during a recursive delete,
> but avoids having to rewinddir all the time. I'd really rather waste the
> memory than issue an extra system call for every directory entry.

I'm not especially thrilled with the idea of reading an arbitrary amount
of data into memory... If someone else wants to implement this, they
can feel free, but IMO the rewinddir solution (which can be ifdef'd to
only occur on systems where the problem exists) is cleaner.

> It would be nice if the recursive-delete function went into APR, though.

I'm not saying that it shouldn't, but even if it does, we're going to
need to support older APRs for a while, so we need a fix in svn.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 27 18:37:34 2004

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.