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

Re: Problem upgrading working copy depth

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-09-19 18:26:47 CEST

Alexander Sinyushkin <Alexander.Sinyushkin@svnkit.com> writes:
> Hi devs,
>
> While playing with depth_tests-15 I noticed a strange thing: if I try to
> invoke the command 'svn up --depth files' within the root of a working
> copy that has been checked out with --depth = empty I get the expected
> depth after all (files). But If I just go somewhere else (for example
> one or more levels upper) and invoke 'svn up --depth files
> /path/to/wc_root' (providing an absolute path) the depth does not change
> (it is still 'empty'), although I do receive files during update.
>
> I think it is this place in update_editor.c in function
> complete_directory(...) which is not accurate:
>
> /* After a depth upgrade the entry must reflect the new depth.
> Upgrading to infinity changes the depth of *all* directories,
> upgrading to something else only changes the target. */
> if (eb->depth == svn_depth_infinity
> || (strcmp(path, eb->target) == 0 && eb->depth > entry->depth))
> entry->depth = eb->depth;

On it -- I think I can reproduce this, please check the script below:

-------------------------------------------------------------------------
#!/bin/sh

SVNDIR=/home/kfogel/src/subversion

SVN=${SVNDIR}/subversion/svn/svn
SVNSERVE=${SVNDIR}/subversion/svnserve/svnserve
SVNADMIN=${SVNDIR}/subversion/svnadmin/svnadmin

# Select an access method. If svn://, the svnserve setup is
# handled automagically by this script; but if http://, then
# you'll have to configure it yourself first.
#
# URL=http://localhost/SOMETHING/repos
# URL=svn://localhost/repos
URL=file:///`pwd`/repos

rm -rf repos wc wc2 import-me

${SVNADMIN} create repos

# These are for svnserve only.
echo "[general]" > repos/conf/svnserve.conf
echo "anon-access = write" >> repos/conf/svnserve.conf
echo "auth-access = write" >> repos/conf/svnserve.conf

# The server will only be contacted if $URL is svn://foo, of course.
${SVNSERVE} --pid-file svnserve-pid -d -r `pwd`

echo "### Making a Greek Tree for import..."
mkdir import-me
mkdir import-me/trunk
mkdir import-me/tags
mkdir import-me/branches
mkdir import-me/trunk/A
mkdir import-me/trunk/A/B/
mkdir import-me/trunk/A/C/
mkdir import-me/trunk/A/D/
mkdir import-me/trunk/A/B/E/
mkdir import-me/trunk/A/B/F/
mkdir import-me/trunk/A/D/G/
mkdir import-me/trunk/A/D/H/
echo "This is the file 'iota'." > import-me/trunk/iota
echo "This is the file 'A/mu'." > import-me/trunk/A/mu
echo "This is the file 'A/B/lambda'." > import-me/trunk/A/B/lambda
echo "This is the file 'A/B/E/alpha'." > import-me/trunk/A/B/E/alpha
echo "This is the file 'A/B/E/beta'." > import-me/trunk/A/B/E/beta
echo "This is the file 'A/D/gamma'." > import-me/trunk/A/D/gamma
echo "This is the file 'A/D/G/pi'." > import-me/trunk/A/D/G/pi
echo "This is the file 'A/D/G/rho'." > import-me/trunk/A/D/G/rho
echo "This is the file 'A/D/G/tau'." > import-me/trunk/A/D/G/tau
echo "This is the file 'A/D/H/chi'." > import-me/trunk/A/D/H/chi
echo "This is the file 'A/D/H/omega'." > import-me/trunk/A/D/H/omega
echo "This is the file 'A/D/H/psi'." > import-me/trunk/A/D/H/psi

echo "### Done."
echo ""
echo "### Importing it..."
(cd import-me; ${SVN} import -q -m "Initial import." ${URL})
echo "### Done."
echo ""

echo "### Check out with --depth=empty:"
${SVN} co -q --depth=empty ${URL}/trunk wc
echo "### Done."
echo ""

echo "### Update to --depth=files from within working copy:"
cd wc
${SVN} up -q --depth=files
if grep --silent empty .svn/entries; then
   echo ' *** PROBLEM: wc still thinks its depth=empty, see .svn/entries'
fi
echo "### Done."
echo ""
cd ..

echo "### Clear away wc and check out again with --depth=empty:"
rm -rf wc
${SVN} co -q --depth=empty ${URL}/trunk wc
echo "### Done."
echo ""

echo "### Update to --depth=files from above working copy:"
${SVN} up -q --depth=files wc
if grep --silent empty wc/.svn/entries; then
   echo ' *** PROBLEM: wc still thinks its depth=empty, see .svn/entries'
fi
echo "### Done."
echo ""

# Put kill command in a file, in case need to run it manually.
echo "kill -9 `cat svnserve-pid`" > k
chmod a+rwx k
./k

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 19 18:26:58 2007

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

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