You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jean-François Doyon <jf...@methane.ca> on 2004/05/01 22:25:26 UTC

fs_copy FROM a transaction root?

Hello,

I'm developping a Zope (http://www.zope.org) object storage system based on
Subversion's filesystem functionality, on top of Ape
(http://hathaway.freezope.org/Software/Ape). I'm using the Swig/Python API.

I've run into a problem with trying to do move/renames.

The application starts a transaction, executes a variety of filesystem based
operations, and then commits.

One of those operations might be a move/rename.

But, when Ape does this, it does so twice, using a temporary file.

So if I have a file "A" I want to rename to "B" this happens:

A -> TMP
TMP -> B

This is causing me problems because the svn_fs_copy (fs.copy in Python)
wants a REVISION root as a source ... My TMP file gets created within a
transaction however, so I can't really do the TMP -> B step ...

The use of the temporary file gets done by the application (Actually Ape,
the storage adapter) itself, so I don't really have any control over that
...

Anybody have any idea how I might get around this ? Seems to me I shouldn't
be the first (or last) to have this issue, but didn't see anything in the
archives.

Any insight would be greatly appreciated !

Thanks,
J.F.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: fs_copy FROM a transaction root?

Posted by Max Bowsher <ma...@ukf.net>.
Jean-François Doyon wrote:
> Hello,
>
> I'm developping a Zope (http://www.zope.org) object storage system based
on
> Subversion's filesystem functionality, on top of Ape
> (http://hathaway.freezope.org/Software/Ape). I'm using the Swig/Python
API.
>
> I've run into a problem with trying to do move/renames.
>
> The application starts a transaction, executes a variety of filesystem
based
> operations, and then commits.
>
> One of those operations might be a move/rename.
>
> But, when Ape does this, it does so twice, using a temporary file.
>
> So if I have a file "A" I want to rename to "B" this happens:
>
> A -> TMP
> TMP -> B
>
> This is causing me problems because the svn_fs_copy (fs.copy in Python)
> wants a REVISION root as a source ... My TMP file gets created within a
> transaction however, so I can't really do the TMP -> B step ...
>
> The use of the temporary file gets done by the application (Actually Ape,
> the storage adapter) itself, so I don't really have any control over that
> ...
>
> Anybody have any idea how I might get around this ? Seems to me I
shouldn't
> be the first (or last) to have this issue, but didn't see anything in the
> archives.
>
> Any insight would be greatly appreciated !

A copy within the current transaction is a nonsense operation within the
design of the subversion FS.

As far as I can see, you have 2 options:

Either: Fix Ape to not use an intermediate temporary file when using an
underlying FS on which this makes no sense.

Or: Kludge it - If copy source was itself copied into current transaction,
use where the copy source was copied from as the true source.

Max.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: fs_copy FROM a transaction root?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sat, 2004-05-01 at 18:25, Jean-François Doyon wrote:
> Anybody have any idea how I might get around this ? Seems to me I shouldn't
> be the first (or last) to have this issue, but didn't see anything in the
> archives.

Well, you have an impedance mismatch here.  svn_fs_copy is fundamentally
about a "copy with history" operation, which doesn't make sense (in our
model, anyway) unless the copy source is a revision.  Ape is clearly
only concerned about the results of its operations, not the process.

We do have a function called svn_fs_revision_link() which is about
copying without preserving history, but it's not intended for this use
(it's more about efficiency than flexibility), and it still demands that
the source is a revision root.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org