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

Re: svn copy after forced removal of copied file

From: Kevin Musker <kmusker_at_mintel.com>
Date: 2006-08-01 10:19:33 CEST

> 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

OK, granted, I should have used revert instead.

But no amount of user error (other than modifying files in the .svn
directory) should result in
a working copy being in an inconsistent state. If --force should only
really be used in exceptional
circumstances, this should be documented in the rm section, not just in
the general svn section

From the svnbook:

"The command will not remove any unversioned or modified items; use the
--force switch to override this behavior."

This doesn't say anything about not using --force for copied files. The
command line app
even suggests the use of --force:

> svn rm cheese.cc
svn: Use --force to override this restriction
svn: 'cheese.cc' has local modifications

To people experienced in using svn, it's obvious that revert should be
used. But to someone
used to using a shell in unix, rm is the complement of cp.

Maybe it's just a documentation/error message issue, but surely the
cause of an inconsistent
state is a bug?

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
Received on Tue Aug 1 10:20:55 2006

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

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