You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kevin Musker <km...@mintel.com> on 2006/07/31 13:42:42 UTC

svn copy after forced removal of copied file

I experienced a problem with the svn command line client and am pretty
sure it's a bug.

If I svn cp a file from the repository, and subsequently delete it, I
get an error if I try to copy it in again -

> svn cp $SVNROOT/cheese.cc .
> svn rm --force cheese.cc
> svn cp $SVNROOT/cheese.cc .
svn: 'cheese.cc' is not under version control


Not sure if this helps, but the client seems to leave the following
files lying around:

> find . -name "cheese.cc*"
./.svn/text-base/cheese.cc.svn-base
./.svn/prop-base/cheese.cc.svn-base
./.svn/props/cheese.cc.svn-work
./.svn/wcprops/cheese.cc.svn-work
./.svn/tmp/text-base/cheese.cc.svn-base
./.svn/tmp/prop-base/cheese.cc.svn-base
./.svn/tmp/props/cheese.cc.svn-work

> svn --version
svn, version 1.3.2 (r19776)
   compiled Jul 24 2006, 12:09:05

> uname -sr
FreeBSD 6.1-STABLE

Has anyone else experienced this problem?

http://www.mintel.com
providing insight + impact

London Office:
Mintel International Group Ltd (Mintel)
18-19 Long Lane
London
EC1A 9PL
UK

Tel: 020 7606 4533
Fax: 020 7606 5932

Chicago Office:
Mintel International Group Ltd (Mintel)
Floor 8
351 West Hubbard Street
Chicago
IL 60610
USA

Tel: 312 932 0400
Fax: 312 932 0469

Notice
********
This email may contain information that is privileged,
confidential or otherwise protected from disclosure. It
must not be used by, or its contents copied or disclosed
to, persons other than the addressee. If you have received
this email in error please notify the sender immediately
and delete the email. Any views or opinions expressed in
this message are solely those of the author, and do not
necessarily reflect those of Mintel.

No Mintel staff are authorised to make purchases using
email or over the internet, and any contracts so performed
are invalid.

Warning
**********
It is the responsibility of the recipient to ensure that
the onward transmission, opening or use of this message
and any attachments will not adversely affect their systems
or data. Please carry out such virus and other checks, as
you consider appropriate.


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

Re: svn copy after forced removal of copied file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 31, 2006, at 15:42, Kevin Musker wrote:

> I experienced a problem with the svn command line client and am pretty
> sure it's a bug.
>
> If I svn cp a file from the repository, and subsequently delete it, I
> get an error if I try to copy it in again -
>
>> svn cp $SVNROOT/cheese.cc .
>> svn rm --force cheese.cc
>> svn cp $SVNROOT/cheese.cc .
> svn: 'cheese.cc' is not under version control

User error. Don't do that.

If you copied the file

svn cp $SVNROOT/cheese.cc .

and then decided, before committing, that you didn't mean to copy it  
after all, don't

svn rm --force cheese.cc

Instead, revert the copy:

svn revert cheese.cc


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

Re: svn copy after forced removal of copied file

Posted by Mark Phippard <ma...@softlanding.com>.
"Kevin Musker" <km...@mintel.com> wrote on 07/31/2006 09:42:42 AM:

> I experienced a problem with the svn command line client and am pretty
> sure it's a bug.
> 
> If I svn cp a file from the repository, and subsequently delete it, I
> get an error if I try to copy it in again -
> 
> > svn cp $SVNROOT/cheese.cc .
> > svn rm --force cheese.cc
> > svn cp $SVNROOT/cheese.cc .
> svn: 'cheese.cc' is not under version control
> 
> 
> Not sure if this helps, but the client seems to leave the following
> files lying around:
> 
> > find . -name "cheese.cc*"
> ./.svn/text-base/cheese.cc.svn-base
> ./.svn/prop-base/cheese.cc.svn-base
> ./.svn/props/cheese.cc.svn-work
> ./.svn/wcprops/cheese.cc.svn-work
> ./.svn/tmp/text-base/cheese.cc.svn-base
> ./.svn/tmp/prop-base/cheese.cc.svn-base
> ./.svn/tmp/props/cheese.cc.svn-work

svn rm only schedules the deletion.  You have to commit it for it to take 
effect.

It sounds like you would have wanted to run svn revert to undo the copy, 
not svn rm.  Unless Subversion treats this as a special case, you would 
then have to follow up the svn revert with a regular "rm" to remove the 
file from the working copy as Subversion is conservative about potentially 
destroying data.

Mark

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