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

Re: "svn copy -rHEAD" copies the wrong version.

From: <kfogel_at_collab.net>
Date: 2003-09-30 20:04:49 CEST

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

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.