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

Re: svn copy WORKING_DIRECTORY URL gives unexpected results for tags

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-06-17 09:52:48 CEST

"Alan W. Irwin" <irwin@beluga.phys.uvic.ca> writes:
> I have attached such a simple test bash script.
> Here are the results on my Debian sarge system:
>
> [...]
>
> Committed revision 3.
> 1 irwin Jun 16 19:38 branches/
> 3 irwin Jun 16 19:38 tags/
> 3 irwin Jun 16 19:38 tags/mytag/
> 2 irwin Jun 16 19:38 trunk/
> 2 irwin 22 Jun 16 19:38 trunk/test_file
>
> You will have to look at the script for details, but basically I created
> a simple example of a "downgrade" that would automatically delete test_file
> from the local working copy, then svn copied
> to a tag directory, then svn listed the entire repo. However, you can see
> from the above result that test_file is not in mytag so there is
> no bug in the case when the client and server use the same system and/or
> the file:/// access method is used!
>
> Are you in a position to modify the script to use the https access method?
> The preferable test is old svn client and latest svn server. For that
> case, the bug could be in the old client, new server, or in the apache module
> that implements the https access method.

I've tested with a modified version of your script over http://,
svn://, and file://, and can't reproduce the bug (using latest dev
Subversion). In all cases, test_file appears only in trunk/.

Maybe there's some small chance that https:// could cause it, but I
consider that highly unlikely. Whatever you're observing is almost
certainly a client-side problem in 1.1.4, as the client reports the
working copy to the server. I don't think we've ever had a bug where
the RA layer in use changed the client's report in such a dramatic
way.

Here's the script I used, basically yours with some modifications for
portability and convenience:

--------------------8-<-------cut-here---------8-<-----------------------
#!/bin/bash

# Which Subversion binaries to use -- by default, development versions.
BIN_PREFIX=/home/kfogel/src/subversion
SVN=${BIN_PREFIX}/subversion/svn/svn
SVNSERVE=${BIN_PREFIX}/subversion/svnserve/svnserve
SVNADMIN=${BIN_PREFIX}/subversion/svnadmin/svnadmin

# Choose one of these three access methods by {un}commenting.
# In the http:// case, you'll also need to set up something in
# httpd.conf, for example:
#
# <Location /repro>
# DAV svn
# SVNParentPath /home/kfogel/src/repro-dir
# </Location>
#
# URL=http://localhost/repro/repos
URL=svn://localhost/repos
# URL=file:///`pwd`/repos

###########################################################
### You shouldn't have to change anything below here. ###
###########################################################

# Clean up all created directories:
rm -rf import-me repos wc

# Create import tree
mkdir -p import-me/branches import-me/tags import-me/trunk

# Start svnserve
${SVNSERVE} --pid-file svnserve-pid -d -r `pwd`

# Create repository, give svnserve r/w access.
${SVNADMIN} create repos
echo "[general]" > repos/conf/svnserve.conf
echo "anon-access = write" >> repos/conf/svnserve.conf
echo "auth-access = write" >> repos/conf/svnserve.conf

# Populate the repository.
${SVN} import import-me ${URL} -m "initial import"

# Create local working copy of empty tree (revision 1);
# create test file in trunk for revision 2
# update to empty tree (revision 1)
${SVN} checkout ${URL}/trunk wc
cd wc
echo "contents of test file" > test_file
${SVN} add test_file
${SVN} commit -m "commit test file" test_file
${SVN} update --revision 1
cd ..

# copy that result to repository tag, then list the repository
${SVN} copy -m "create mytag" wc ${URL}/tags/mytag
${SVN} list --verbose --recursive ${URL}

# Shut down svnserve.
kill -9 `cat svnserve-pid`

--------------------8-<-------cut-here---------8-<-----------------------

Best,
-Karl

-- 
Subversion support & consulting  <>  http://producingoss.com/consulting.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Jun 17 09:53:02 2007

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.