> From: Philip Martin [mailto:philip@codematters.co.uk]
> Sent: Monday, November 03, 2003 7:00 PM
[...]
> The problem with a copy and delete implementation is that the copy can
> fail (or be interrupted) part way through, in which case the original
> destination file may be lost. A traditional Unix rename guarantees
> that the destination is either unmodified or replaced.
>
> Perhaps the copy should be made to a temporary file in the destination
> directory, then once the copy is complete the temporary file could be
> renamed, followed by deletion of the temporary or source as
> appropriate.
This makes sense. Also makes sense to keep in in Subversion then.
> Subversion relies on the atomic nature of renames, although I note
> that the APR documentation doesn't provide any such guarantee
> directly. On Unix, at least, it is implied by the warning about
> crossing devices.
Since we don't want to break any other apps that rely on the atomicity
of apr_file_rename, we'd better not change that. FWIW, I think it should
be safe to document apr_file_name() as atomic.
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 3 20:26:19 2003