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

Meaning of --force

From: Noe <benoit_at_lrde.epita.fr>
Date: 2004-02-01 23:41:50 CET

Hi,

I recently tried some unusual manipulations with subversion 0.33
(I also tried 0.37.0) and discovered the strange behavior of
'--force' option.

Consider a common repository.

On a simple delete request, let's say:
  $ svn delete foo

As the file 'foo' does not exist either in the repository, nor in
working copy (nor in the current directory), the result is:

  svn: Tried a versioning operation on an unversioned resource
  svn: Use --force to override this restriction
  svn: 'foo' is not under version control
  $ echo $?
  1

Using '--force' in this case avoids subversion to fail.
On a more illegal delete request, let's say:

  $ svn delete --force foo/bar

where the directory 'foo' does not exists, the result is:

*(svn: Path is not a working copy directory)
  svn: 'foo' is not a working copy
  $ echo $?
  1

        Why should svn fail there, since '--force' is enabled ?

On an illegal rename request, let's say:

  $ ls -la
  drwxr-xr-x .svn
  -rw-r--r-- bar
  drwxr--r-- foo
  $ svn rename --force bar foo/bar

Where 'foo' directory exists in working copy and repository, 'bar' file
exists in the current directory but does not either in the working copy
nor in the repository, the result is:

*(svn: Tried a versioning operation on an unversioned resource)
  svn: Use --force to override this restriction
  svn: Cannot copy or move 'bar' -- it's not under version control
  $ echo $?
  1

        Well, my English may be approximative, but '--force'
        is correctly spelled on my command line :)

        In a few words: why subversion's --force does not behave like
        rm or mv's --force ?

(*: line does not appear with subversion 0.37, but it may be related to
the compilation flags I used.)

--
Benoit Perrot
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 2 12:35:09 2004

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.