Nice find! Have no idea what causes this, but agree it is an
egregious bug...
Julian Foad <julianfoad@btopenworld.com> writes:
> svn cp -rHEAD WC-FILE NEW-WC-FILE
>
> does not contact the repository to determine "-rHEAD". Instead it copies the version that currently exists in the WC. The following script demonstrates it.
>
> [[[
> #!/bin/bash
> # Show bugs in "svn copy"
>
> set -x -e
> TEST_DIR=svn-copy-test
> mkdir $TEST_DIR
> cd $TEST_DIR
> svnadmin create repos
> REPOS=file://`pwd`/repos
> svn co $REPOS wc
> cd wc
>
> # Now we have a repository and a WC, start playing in the WC.
> echo "File a." > a
> svn add a
> svn ci -m "One line in a." a
> echo "a: line 2" >> a
> svn ci -m "Second line."
> svn up -r1 a
>
> svn copy -rHEAD a b ### copies the wrong version
> # file b should have two lines but only has one
> svn info b
> svn cat b
> svn cat -rHEAD a
> ]]]
>
> I couldn't find an issue for this and I haven't filed one yet.
>
> - Julian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 30 20:55:28 2003