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

moving a non-empty dir failed

From: A.T.Hofkamp <a.t.hofkamp_at_tue.nl>
Date: 2005-08-08 15:57:49 CEST

Hello,

I encountered a serious problem while trying to move a non-empty directory.
The following script reproduces the problem (svn 1.2.0, Linux system, fs
repository):
-----------------------------
#!/bin/sh
#
set -x -u -e

CURDIR=`pwd`
echo "Current dir=${CURDIR}"

# create a svn repository
svnadmin create --fs-type fsfs ${CURDIR}/repository
mkdir myrepo
mkdir myrepo/project
svn import --message imported myrepo file://${CURDIR}/repository

svn checkout file://${CURDIR}/repository/project wc
cd wc

# make a sub directory
mkdir subdir
svn add subdir
svn commit --message "subdir created"

# create subdir/file
echo "data" > subdir/file
svn add subdir/file
svn commit --message "added subdir/file"

# create newdir, move subdir to newdir
mkdir newdir
svn add newdir
svn mv subdir newdir
svn commit --message "dir moved"
-----------------------------
After creating a fresh repository, I create 'subdir', commit it, add
'subdir/file', commit it, then create and add 'newdir', followed by 'mv subdir
newdir' (to create newdir/subdir and newdir/subdir/file).

This failed with the following error:

+ svn commit --message 'dir moved'
svn: Commit failed (details follow):
svn: Out of date: '/project/subdir' in transaction '3-1'
Adding newdir
Adding newdir/subdir
Adding newdir/subdir/file
Deleting subdir

afterwards, 'subdir' still exists, and any attempt to do something with it
through svn resulted in the same 'out of date' error.
I solved the problem eventually by deleting 'subdir' from unix, then 'svn commit'.

I hope there is a better way to move a directory... :-)

Albert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 8 15:59:34 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.