You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dave Lawrence <dl...@ad-holdings.co.uk> on 2008/05/12 17:21:28 UTC

Bug: svn up file --depth empty

To reproduce this problem:
1) Create a test repo
2) Set it up with a server (svnserve 1.4.5 in my case)
3) Add a file as <server url>/tests/test.txt
4) make a few revisions (3 will do) - make the text obviously indicate 
the revision number
5) svn co <server url>/tests/ .
6) svn up test.txt -r1
7) svn up test.txt --depth empty

Now the working copy is broken.  The file working copy and working base 
are still at revision 1, the checksum is incorrect (presumably the 
checksum is at the head revision).  Errors such as "checksum incorrect" 
and "delta ended unexpectedly" will result if trying to do further updates.

I originally saw this in TSVN - after I reported that Stefan changed a 
use of "svn_depth_empty" to "svn_depth_files" and that particular 
feature of TSVN now works OK (12885).

I don't know whether it is at all valid to update a single file with 
depth set to empty, but it certainly shouldn't cause the working copy to 
be corrupted.

Using svn.exe as built by the TortoiseSVN nightly build, from the head 
revision of 1.5.x (a few days ago).

Windows XP SP2.

b.t.w this doesn't seem to happen with file:// protocol.  I've seen it 
with 2 different server configs:
1) Apache with svn 1.3.1 on Linux
2) svnserve 1.4.5 on Cygwin


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Bug: svn up file --depth empty

Posted by Dave Lawrence <dl...@ad-holdings.co.uk>.
Karl Fogel wrote:
> I haven't been able to reproduce it using the script below, but that's
> with server of 1.5.0-dev.  Before I try with 1.4.5, could you write a
> similar script that reproduces it against a 1.4.x server, so we know
> that we're talking about the same basic recipe?  Thanks.

Karl,
My reply was blocked both for your address and the list address but it 
did make it onto the newsgroup.  Hope this is OK, if not shall I try 
again with a zip?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Bug: svn up file --depth empty

Posted by Dave Lawrence <dl...@ad-holdings.co.uk>.
Karl Fogel wrote:
> Dave Lawrence <dl...@ad-holdings.co.uk> writes:
>> To reproduce this problem:
>> 1) Create a test repo
>> 2) Set it up with a server (svnserve 1.4.5 in my case)
>> 3) Add a file as <server url>/tests/test.txt
>> 4) make a few revisions (3 will do) - make the text obviously indicate
>> the revision number
>> 5) svn co <server url>/tests/ .
>> 6) svn up test.txt -r1
>> 7) svn up test.txt --depth empty
>>
>> Now the working copy is broken.  The file working copy and working
>> base are still at revision 1, the checksum is incorrect (presumably
>> the checksum is at the head revision).  Errors such as "checksum
>> incorrect" and "delta ended unexpectedly" will result if trying to do
>> further updates.
>>
>> I originally saw this in TSVN - after I reported that Stefan changed a
>> use of "svn_depth_empty" to "svn_depth_files" and that particular
>> feature of TSVN now works OK (12885).
>>
>> I don't know whether it is at all valid to update a single file with
>> depth set to empty, but it certainly shouldn't cause the working copy
>> to be corrupted.
>>
>> Using svn.exe as built by the TortoiseSVN nightly build, from the head
>> revision of 1.5.x (a few days ago).
>>
>> Windows XP SP2.
>>
>> b.t.w this doesn't seem to happen with file:// protocol.  I've seen it
>> with 2 different server configs:
>> 1) Apache with svn 1.3.1 on Linux
>> 2) svnserve 1.4.5 on Cygwin
> 
> I haven't been able to reproduce it using the script below, but that's
> with server of 1.5.0-dev.  Before I try with 1.4.5, could you write a
> similar script that reproduces it against a 1.4.x server, so we know
> that we're talking about the same basic recipe?  Thanks.
> 
> -Karl
> 
> --------------------------------------------------------------------------
> #!/bin/sh
> 
> # You probably need to adjust just the next line to run this script.
> 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 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`
> # And put the kill command in a file, in case need to run it manually.
> echo "kill -9 `cat svnserve-pid`" > k
> chmod a+rwx k
> 
> echo "### Making a Greek Tree for import..."
> mkdir import-me
> mkdir import-me/tests
> echo "### Done."
> echo ""
> echo "### Importing it..."
> (cd import-me; ${SVN} import -q -m "Initial import." ${URL})
> echo "### Done."
> echo ""
> 
> ${SVN} co -q ${URL}/tests wc
> 
> cd wc
> echo "New file." >> test.txt
> ${SVN} add -q test.txt
> ${SVN} ci -q -m "Add test.txt."
> ${SVN} up -q
> echo "Made this change in r2." >> test.txt
> ${SVN} ci -q -m "Change test.txt in r2."
> echo "Made this change in r3." >> test.txt
> ${SVN} ci -q -m "Change test.txt in r3."
> echo "Made this change in r4." >> test.txt
> ${SVN} ci -q -m "Change test.txt in r4."
> echo "Made this change in r5." >> test.txt
> ${SVN} ci -q -m "Change test.txt in r5."
> cd ..
> 
> rm -rf wc
> ${SVN} co -q ${URL}/tests wc
> 
> cd wc
> ${SVN} up test.txt -r1
> ${SVN} up test.txt --depth empty
> echo ""
> echo "### No corruption so far... Can we commit another change and update?"
> echo ""
> echo "Another change, in r6." >> test.txt
> ${SVN} ci -q -m "Change test.txt in r6."
> ${SVN} up
> echo ""
> echo "### Yup, apparently so."
> echo ""
> cd ..
> 
> # 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

OK.  To get 1.4.5 server and 1.5.0-dev client on the same PC I used the 
Cygwin installation I already had for the server.
Then from Cygwin:
$ ./server_setup.sh 1> setup_out.txt 2> setup_err.txt
 From CMD
 > client_test 1> test_out.txt 2> test_err.txt

All files attached, except setup_err.txt which was empty.  The error in 
test_out.txt comes from the final svn command

This isn't to do with Cygwin by the way, it happens on with a Linux 
server aswell (although that was 1.3.1).  I suspect my observation that 
it doesn't happen with file:// is related to your observation that it 
doesn't happen with a 1.5.0-dev server.


Re: Bug: svn up file --depth empty

Posted by Karl Fogel <kf...@red-bean.com>.
Dave Lawrence <dl...@ad-holdings.co.uk> writes:
> To reproduce this problem:
> 1) Create a test repo
> 2) Set it up with a server (svnserve 1.4.5 in my case)
> 3) Add a file as <server url>/tests/test.txt
> 4) make a few revisions (3 will do) - make the text obviously indicate
> the revision number
> 5) svn co <server url>/tests/ .
> 6) svn up test.txt -r1
> 7) svn up test.txt --depth empty
>
> Now the working copy is broken.  The file working copy and working
> base are still at revision 1, the checksum is incorrect (presumably
> the checksum is at the head revision).  Errors such as "checksum
> incorrect" and "delta ended unexpectedly" will result if trying to do
> further updates.
>
> I originally saw this in TSVN - after I reported that Stefan changed a
> use of "svn_depth_empty" to "svn_depth_files" and that particular
> feature of TSVN now works OK (12885).
>
> I don't know whether it is at all valid to update a single file with
> depth set to empty, but it certainly shouldn't cause the working copy
> to be corrupted.
>
> Using svn.exe as built by the TortoiseSVN nightly build, from the head
> revision of 1.5.x (a few days ago).
>
> Windows XP SP2.
>
> b.t.w this doesn't seem to happen with file:// protocol.  I've seen it
> with 2 different server configs:
> 1) Apache with svn 1.3.1 on Linux
> 2) svnserve 1.4.5 on Cygwin

I haven't been able to reproduce it using the script below, but that's
with server of 1.5.0-dev.  Before I try with 1.4.5, could you write a
similar script that reproduces it against a 1.4.x server, so we know
that we're talking about the same basic recipe?  Thanks.

-Karl

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

# You probably need to adjust just the next line to run this script.
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 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`
# And put the kill command in a file, in case need to run it manually.
echo "kill -9 `cat svnserve-pid`" > k
chmod a+rwx k

echo "### Making a Greek Tree for import..."
mkdir import-me
mkdir import-me/tests
echo "### Done."
echo ""
echo "### Importing it..."
(cd import-me; ${SVN} import -q -m "Initial import." ${URL})
echo "### Done."
echo ""

${SVN} co -q ${URL}/tests wc

cd wc
echo "New file." >> test.txt
${SVN} add -q test.txt
${SVN} ci -q -m "Add test.txt."
${SVN} up -q
echo "Made this change in r2." >> test.txt
${SVN} ci -q -m "Change test.txt in r2."
echo "Made this change in r3." >> test.txt
${SVN} ci -q -m "Change test.txt in r3."
echo "Made this change in r4." >> test.txt
${SVN} ci -q -m "Change test.txt in r4."
echo "Made this change in r5." >> test.txt
${SVN} ci -q -m "Change test.txt in r5."
cd ..

rm -rf wc
${SVN} co -q ${URL}/tests wc

cd wc
${SVN} up test.txt -r1
${SVN} up test.txt --depth empty
echo ""
echo "### No corruption so far... Can we commit another change and update?"
echo ""
echo "Another change, in r6." >> test.txt
${SVN} ci -q -m "Change test.txt in r6."
${SVN} up
echo ""
echo "### Yup, apparently so."
echo ""
cd ..

# 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: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org