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

Re: Delete of a file/folder from 2 working copies

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-03-21 23:43:35 CET

Greg Hudson wrote:
>
> merge is defined in tree.c, not fs.c, in both back ends. Both back ends
> flag a conflict on double deletes. [...]
>
> This changed in r13222 in fs_fs and in r15569 in fs_base, when the merge
> algorithm was rewritten to take advantage of the "new" (pre-1.0) commit
> system which uses a proper merge ancestor.

So, about the FS layer handling a "double delete":

   * The FS code used to allow it but was re-written to flag a conflict. (See
log messages below.) In the new code, the possibility arises much less
commonly, but still can arise.

   * The document 'subversion/libsvn_fs_base/notes/structure' documents both
the current and the old status of the code.

   * Three of you current committers said in this thread that the FS should
allow a double delete.

So, do we want the current behaviour? Did it get changed on purpose, or just
as a side-effect?

About the idea that the FS layer should allow it and a higher layer can block
it: is that true? I've a feeling the higher layer can't predict that a
double-delete situation is going to arise, so the only way to give it a choice
about the matter would be for it to pass a flag to libsvn_fs to allow or forbid
double deletes.

- Julian

> ------------------------------------------------------------------------
> r13222 | epg | 2005-03-02 00:36:45 +0000 (Wed, 02 Mar 2005) | 30 lines
>
> Rewrite the FSFS auto-merge to use a much simpler algorithm, avoiding
> expensive predecessor walks. The old code was written for the old
> (pre-r624) commit system, which could supply an earlier ancestor to
> merge() than the head revision at the time the target transaction was
> started. This meant the code had to deal with commonality between the
> changes in source and the changes in target. In particular, the old
> code allowed:
>
> - source and target to modify the same file entry, if the target
> entry was a descendent of the source entry,
> - source and target to replace the same entry (file or directory),
> if the target was a descendent of source,
> - source and target to delete the same entry,
> - source and target to add identical entries, or
> - target to replace (but not modify) an entry which source had
> deleted
>
> The new code does not allow any of these things, because the new
> commit system does not have artifacts of that nature.
>
> This change will need to be ported to BDB; that will be done in a
> future commit.
>
> Log message and algorithm by ghudson; code by epg.
>
> ------------------------------------------------------------------------
> r15569 | cmpilato | 2005-08-03 20:14:57 +0100 (Wed, 03 Aug 2005) | 12 lines
>
> Port the libsvn_fs_fs merge() algorithm changes (made circa r13222) to
> libsvn_fs_base.
>
> ------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 21 23:44:03 2006

This is an archived mail posted to the Subversion Dev mailing list.