Hello tree conflict fans,
I've started thinking a bit about tree conflicts and directories.
The problem: We want to be able to also mark directories as
tree conflict victims. The current code, however, only considers
files. See http://subversion.tigris.org/issues/show_bug.cgi?id=3150
I thought it might be a good idea for all of us to agree on
how directories can become tree conflict victims before we
start implementing anything :)
To kick off a discussion, I've translated the entries about
each use case in notes/tree-conflicts/detection.txt from
files to directories.
Here is the result, please note the open question in use case 5.
Comments and additions welcome, as usual.
-----------------------------------------------------------------------
In all the cases below (except possibly one exception, noted inline)
we never descend into directories recursively. We only consider
the direct children of the directory in question.
==========
USE CASE 1
==========
File:
If 'svn update' modifies a file that has been scheduled for deletion
in the working copy, the file is a tree conflict victim.
Directory:
If 'svn update' modifies a file in a directory that has been scheduled
for deletion in the working copy, the directory is a tree conflict victim.
==========
USE CASE 2
==========
File:
If 'svn update' deletes a file that has local modifications, the file
is a tree conflict victim.
Directory:
If 'svn update' deletes a directory that contains a file with local
modifications, the directory is a tree conflict victim.
==========
USE CASE 3
==========
File:
If 'svn update' deletes a file that has been scheduled for deletion in
the working copy, the file is a tree conflict victim.
Directory:
If 'svn update' deletes a directory that has been scheduled for deletion in
the working copy, the directory is a tree conflict victim.
==========
USE CASE 4
==========
Files:
If 'svn merge' tries to modify a file that does not exist in the
target working copy, then the target file is a tree conflict victim.
Directories:
If 'svn merge' tries to modify a file in a directory that does not exist
in the target working copy, then the target directory is a tree conflict victim.
==========
USE CASE 5
==========
Files:
If 'svn merge' deletes an existing file, the file is a tree conflict
victim if its text is different from the corresponding file on the left
side of the merge source.
Directories:
If 'svn merge' deletes an existing directory, the directory is a tree conflict
victim if its content is different from the corresponding directory on the left
side of the merge source.
Question here: What makes two directories "equal"? Do we need to consider
all subdirectories of a directory? Or should we keep it simple and only
consider direct children as in all the other cases?
Warning: The former might perform quite badly!
==========
USE CASE 6
==========
File:
If 'svn merge' tries to delete a file that does not exist in the
target working copy, then the target file is a tree conflict victim.
Directory:
If 'svn merge' tries to delete a directory that does not exist in the
target working copy, then the target directory is a tree conflict victim.
=========================
OBSTRUCTIONS DURING MERGE
=========================
File:
If 'svn merge' fails to apply an operation to a file because the
file is obstructed (i.e. an unversioned item of the same name is
in the file's place), the obstructed file is a tree conflict victim.
Directory:
If 'svn merge' fails to apply an operation to a directory because the
directory is obstructed (i.e. an unversioned item of the same name is
in the directory's place), the obstructed directory is a tree conflict
victim.
--
Stefan Sperling <stsp_at_elego.de> Software Developer
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de Geschaeftsfuehrer: Olaf Wagner
- application/pgp-signature attachment: stored
Received on 2008-04-02 19:30:49 CEST