[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-issues
Subject:    [Issue 713] New - svn delete --force fails on an already missing file
From:       issues () subversion ! tigris ! org
Date:       2002-05-31 18:39:42
[Download RAW message or body]

http://subversion.tigris.org/issues/show_bug.cgi?id=713

*** shadow/issues_15/713	Fri May 31 11:39:42 2002
--- shadow/issues_15/713.tmp.27773	Fri May 31 11:39:42 2002
***************
*** 0 ****
--- 1,182 ----
+ +============================================================================+
+ | svn delete --force fails on an already missing file                        |
+ +----------------------------------------------------------------------------+
+ |      Issue #: 713                       Component: subversion              |
+ |       Status: NEW                         Version: current                 |
+ |   Resolution:                            Platform: Macintosh               |
+ |   Issue type: DEFECT                   OS/Version: Mac OS X                |
+ |     Priority: P3                     Subcomponent: src                     |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: issues@subversion.tigris.org                                 |
+ |  Reported By: Uther@tigris.org                                             |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |    Milestone: TargetMilestone: ---                                         |
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ svn rm --force is supposed to remove a file regardless of local 
+ modifications.  If the modification is the removal of the file then this fails - 
+ the file is marked as removed in the entries file, but then svn goes to 
+ remove the file from the filesystem and fails because the file is missing.  
+ This is misleading if there is a single file - the rm really succeeded.  This 
+ is incorrect if there are multiple files to be removed - only the first will 
+ succeed.
+ 
+ I would also suggest that svn delete --force on a missing dir should 
+ succeed, possibly with a warning.  Sure - the .svn metadata is missing... 
+ but it is already gone, and failing on the rm doesn't bring it back.
+ 
+ Note:- see also issues 611 and 681.
+ 
+ Example:
+ 
+ % svn --version
+ Subversion Client, version 0.12.0 (dev build)
+    compiled May 24 2002, 18:20:39
+ 
+ Copyright (C) 2000-2002 CollabNet.
+ Subversion is open source software, see http://subversion.tigris.org/
+ 
+ The following repository access (RA) modules are available:
+ 
+ * ra_dav : Module for accessing a repository via WebDAV (DeltaV) 
+ protocol.
+   - handles 'http' schema
+ * ra_local : Module for accessing a repository on local disk.
+   - handles 'file' schema
+ 
+ [will@BATFISH:~:Fri 31, 1:34PM]
+ % mkdir svntest
+ % cd svntest
+ [will@BATFISH:~/svntest:Fri 31, 1:35PM]
+ % svnadmin create repos
+ [will@BATFISH:~/svntest:Fri 31, 1:35PM]
+ % svn mkdir file:///Users/will/svntest/repos/trunk/
+ 
+ Committed revision 1.
+ [will@BATFISH:~/svntest:Fri 31, 1:37PM]
+ % svn checkout file:///Users/will/svntest/repos/trunk/
+ Checked out revision 1.
+ [will@BATFISH:~/svntest:Fri 31, 1:37PM]
+ % ls
+ repos trunk
+ [will@BATFISH:~/svntest:Fri 31, 1:37PM]
+ % cd trunk
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:37PM]
+ % mkdir testdir
+ % svn add testdir
+ A          testdir
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:50PM]
+ % svn commit -m ""
+ Adding    testdir
+ 
+ Committed revision 2.
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:51PM]
+ % ls -a testdir
+ .    ..   .svn
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:51PM]
+ % rm -rf testdir
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:51PM]
+ % ls
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:51PM]
+ % svn rm --force testdir
+ 
+ subversion/libsvn_wc/adm_files.c:618
+ apr_error: #2, src_err 0 : <No such file or directory>
+   testdir/.svn/entries
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:51PM]
+ % cat > testfile
+ this is a test file
+ .
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % svn add testfile
+ A          testfile
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % svn co file:///Users/will/svntest/repos/trunk/testdir
+ Checked out revision 2.
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % svn up
+ At revision 2.
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % ls
+ testdir   testfile
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % svn st
+ A      ./testfile
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % svn commit -m ""
+ Adding    testfile
+ Transmitting file data .
+ Committed revision 3.
+ [will@BATFISH:~/svntest/trunk:Fri 31, 1:52PM]
+ % ls
+ testdir   testfile
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:19PM]
+ % rm testfile
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:19PM]
+ % ls
+ testdir
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:19PM]
+ % svn rm testfile
+ 
+ subversion/clients/cmdline/delete-cmd.c:47
+ svn_error: #21113 : <Attempting restricted operation for modified 
+ resource>
+   Use --force to override this restriction
+ 
+ subversion/libsvn_client/delete.c:70
+ svn_error: #21113 : <Attempting restricted operation for modified 
+ resource>
+   'testfile' has local modifications
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:20PM]
+ % svn rm --force testfile
+ D  testfile
+ 
+ subversion/libsvn_subr/io.c:895
+ apr_error: #2, src_err 0 : <No such file or directory>
+   svn_io_remove_file: failed to remove file "testfile"
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:20PM]
+ % ls -la
+ total 0
+ drwxr-xr-x   4 will  staff   92 May 31 14:19 .
+ drwxr-xr-x   4 will  staff   92 May 31 13:37 ..
+ drwxr-xr-x  12 will  staff  364 May 31 14:20 .svn
+ drwxr-xr-x   3 will  staff   58 May 31 13:52 testdir
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:20PM]
+ % svn st
+ D      ./testfile
+ [will@BATFISH:~/svntest/trunk:Fri 31, 2:20PM]
+ % svn revert testfile
+ Reverted testfile
+ [will@BA
+ TFISH:~/svntest/trunk:Fri 31, 2:20PM]
+ % ls
+ testdir   testfile
+ [will@BATF
+ ISH:~/svntest/trunk:Fri 31, 2:20PM]
+ % rm testfile
+ [will@BATFISH:~/svntest/tr
+ unk:Fri 31, 2:20PM]
+ % svn rm testfile
+ 
+ subversion/clients/cmdline/delete-cmd.c
+ :47
+ svn_error: #21113 : <Attempting restricted operation for modified resourc
+ e>
+   Use 
+ -
+ -force to override this restriction
+ 
+ subversion/libsvn_client/delete.
+ c:70
+ svn_error: #21113 : <Attempting restricted operation for modified res
+ ource>
+   'testfile' has local modifications
+ [will@BATFISH:~/svntest/t
+ r
+ unk:Fri 31, 2:20PM]
+ % svn st
+ !      
+ .
+ /testfile
\ No newline at end of file

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic