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

svn update oddity with changed files in a deleted directory

From: <kmradke_at_rockwellcollins.com>
Date: Thu, 8 May 2008 17:03:18 -0500

We had an user move a lot of directories and create symlinks in the old
locations. If any users had working copies with modified files in these
directories, their svn updates would fail with the confusing errors:

svn: REPORT request failed on '/test_repo/!svn/vcc/default'
svn: REPORT of '/test_repo/!svn/vcc/default': 200 OK (http://server)

The apache server logs were a little more useful, since they included
information similar to the test script below. However, normal
users can't see these.

The first svn update would update parts of the working copy and then fail.
Repeated svn updates would update fewer files until ultimately only the
error would occur.

This leaves the working copy in an incomplete state.

The ultimate problem is that Subversion leaves these modified files in
their original locations with their original names, unlike ClearCase which
would append ".keep" to the directory and file names.

I have attached a simple script that shows this behavior. It just creates
a new directory with the same name instead of creating a symlink.
(This should allow it to "fail" on all platforms.)
It fails with a slightly more useful error of:

svn: Failed to add directory 'a': object of the same name already exists

This was tested with 1.5 rc4, but fails similarly in 1.4.6, so it is not
new behavior.

The (now obvious) fix is to simply have the user rename the old
directory in their working copy and re-do the svn update.

Should/can Subversion handle this situation differently?
Is the ClearCase mentality of renaming removed but changed
items (with all it's warts) better in this case?

Kevin R.

#!/bin/sh -v

CWD=`pwd`
REPO_NAME=test_repo
REPOS=file:///${CWD}/repo/${REPO_NAME}

/bin/rm -rf wc
/bin/rm -rf repo

mkdir repo
svnadmin create repo/${REPO_NAME}

svn co ${REPOS} wc
cd wc
svn mkdir a
svn mkdir b
echo "Initial version" > a/file1.txt
echo "Initial version" > a/file2.txt
svn add a/file1.txt
svn add a/file2.txt
svn ci -m "Initial version"
svn mv a b/a
svn ci -m "Move a into b"
svn mkdir a
echo "Different" > a/file3.txt
svn add a/file3.txt
svn ci -m "Create new a"
svn up -r 1
echo "Changed" >> a/file1.txt
svn up
svn st -v
svn up
svn up
svn st -v

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-09 00:33:03 CEST

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