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

Should deletes conflict with mods?

From: William Uther <willu.mailingLists_at_cse.unsw.edu.au>
Date: 2003-02-07 12:32:01 CET

Alo,

Consider the following use case:

Two people, A and B, have a file checked out.
Person A deletes the file.
Person B edits the file.
Person A commits.
Person B updates.

In my mind, the update should cause a conflict. At present subversion
simply removes the file from .svn/entries during the update, and leaves
the locally modifed file around. I wonder if this shouldn't be marked
as a conflict (somehow - possibly with a note in the entries file).

There are two reasons why the current behaviour is a problem:

i) It is easy for the conflict to go unnoticed; especially since,
ii) the person updating now has a file in their working copy which is
not checked in. While this is normal for generated files, for source
it can be a problem. You can have a build that succeeds locally and
yet breaks the repository.

Note, I'm guessing that this behaviour also shows up when a directory
is "moved" using copy and delete (although it would cease being
relevant when moving is changed:
http://subversion.tigris.org/issues/show_bug.cgi?id=898). The old dir
is copied, and then any local mods are silently left as untracked files
in the working copy.

Do others also think there should be a conflict here? I couldn't find
an issue about this. Should I file one?

Here is a full example of the current (well relatively recent)
behaviour using delete:

% svn --version
svn, version 0.17.0 (dev build)
    compiled Jan 21 2003, 14:21:21
% mkdir demo
% cd demo
% svnadmin create repos
% svn co file://`pwd`/repos wc1
Checked out revision 0.
% cd wc1
% cat > file
A line of text
% svn add file
A file
% svn commit -m "added a file"
Adding file
Transmitting file data .
Committed revision 1.
% cd ..
% svn co file://`pwd`/repos wc2
A wc2/file
Checked out revision 1.
% cd wc2
% svn rm file
D file
% svn commit -m "removed file"
Deleting file

Committed revision 2.
% cd ..
% cd wc1
% cat > file
A second line of text
% svn up
D file
Updated to revision 2.
% ls
file
% svn st
? file

Later,

Will :-}

--
Dr William Uther                            National ICT Australia
Phone: +61 2 9385 6926             School of Computer Science and 
Engineering
Email: willu@cse.unsw.edu.au             University of New South Wales
Jabber: willu@jabber.cse.unsw.edu.au          Sydney, Australia
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 7 12:32:55 2003

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