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

Broken behavior?

From: Dewey M. Sasser <dewey_at_sasser.com>
Date: 2004-09-17 16:19:13 CEST

Long time CVS user/short time svn user.

One of my historical assertions about SCM systems it that it should
support an "always valid" working model, meaning that it should be
possible to maintain the repository in an always valid state.

In subversion (1.0.5 on cygwin and 1.0.6 on Gentoo Linux) it is not
possible to "rename" something properly if the target is under svn
control.

In other words, if I have two items A and B, both under svn control
and I would like to get rid of B and rename A to B, I assert that I
should:

1) svn rm B
2) svn cp A B

This preserves change history and the semantics of my actions. Svn
reports an error when I attempt this.

Attached is a script to illustrate this problem.

Should I write this up in the issue tracker as a feature request?

#!/bin/bash -vx

REPOLOC=/tmp/svntest
TESTAREA=testarea

if [ -d $REPOLOC ] ; then
    echo "Warning: $REPOLOC already exists. Refusing to mess it up."
    exit 1;
fi

if [ -d $TESTAREA ] ; then
    echo "Warning: $TESTAREA already exists. Refusing to mess it up."
    exit 1;
fi

########################################################################
# OK, here's the meat of the script #
########################################################################

svnadmin create $REPOLOC

svn co file://$REPOLOC $TESTAREA

cd $TESTAREA

echo "Testing1" > test1.txt
echo "Testing2" > test2.txt

svn add test1.txt test2.txt

svn commit -m "Setting up files for failiure"

svn rm test1.txt
svn cp test2.txt test1.txt

# END of script

-- 
Dewey Sasser
dewey@sasser.com
---
Note:  resend.  Previous message seems to have disappeared
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 17 16:20:44 2004

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