Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26A2E1070F for ; Mon, 8 Apr 2013 09:23:24 +0000 (UTC) Received: (qmail 73150 invoked by uid 500); 8 Apr 2013 09:23:23 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 72985 invoked by uid 500); 8 Apr 2013 09:23:22 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 72961 invoked by uid 99); 8 Apr 2013 09:23:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 09:23:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [82.77.173.100] (HELO mail.sync.ro) (82.77.173.100) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 09:23:16 +0000 Received: from [10.0.0.35] (unknown [10.0.0.35]) by mail.sync.ro (Postfix) with ESMTP id 471ADBE8; Mon, 8 Apr 2013 12:22:53 +0300 (EEST) Message-ID: <51628C6E.9040808@sync.ro> Date: Mon, 08 Apr 2013 12:22:54 +0300 From: Florin Avram User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Daniel Shahaf CC: users@subversion.apache.org, dev@subversion.apache.org Subject: Re: SVN 1.7 - can delete external files References: <515EDBBA.6090806@syncrosvnclient.com> <20130405144156.GG30453@ted.stsp.name> <51625AE2.4020901@sync.ro> <20130408080130.GC2941@lp-shahaf.local> In-Reply-To: <20130408080130.GC2941@lp-shahaf.local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 08.04.2013 11:01, Daniel Shahaf wrote: > [CC += dev@, so fullquote; please drop users@ on replies] > > Florin Avram wrote on Mon, Apr 08, 2013 at 08:51:30 +0300: >> On 05.04.2013 17:41, Stefan Sperling wrote: >>> On Fri, Apr 05, 2013 at 05:12:10PM +0300, Syncro SVN Client Support wrote: >>>> Hi, >>>> >>>> I found that you can delete external files with SVN 1.7, which >>>> should not be allowed. Below are some test I've done with SVN 1.6 >>>> and SVN 1.7 over external files and directories. >>>> >>>> *I.**external file* >>>> *1.**SVN 1.6* - neither "svn delete external.txt" or "svn delete >>>> --keep-local external.txt" work (which is fine, according with the >>>> SVN Book). >>>> svn: E155030: Cannot remove the file external at 'external.txt'; >>>> please propedit or propdel the svn:externals description that >>>> created itII. external dir >>>> >>>> *2**. SVN 1.7.8* - "svn delete external.txt" throws same error (OK). >>>> But, "svn delete --keep-local" works, file is removed and the >>>> EXTERNAL status is lost. >>>>> svn delete --keep-local external.txt >>>> D external.txt >>>> >>>>> svn status external.txt >>>> D external.txt >>>> >>>>> svn status . (on parent directory) >>>> D external.txt >>>> >>>>> svn commit -m "test" external.txt >>>> Deleting external.txt >>>> Committed revision 3128. >>>> * >>>> >>>> **II**.**external dir* >>>> SVN 1.6.17 allows deleting external directories, but SVN 1.7 denies >>>> deletion of external directories (an error like "cannot delete the >>>> root of a working copy"). >>>> >>>> >>>> In the end, I assume "svn delete" should not work for an external >>>> item, ignoring the SVN version, the item type (file or dir) and any >>>> option for delete (like --force or --keep-local), no? >>>> >>>> Regards, >>>> Florin >>> Yes, I agree. >>> >>> The trunk code had the same issue, but with slightly different output. >>> Fixed in http://svn.apache.org/r1464992 >>> >>> Do you think this is an important enough issue to warrant a backport to 1.7? >> Hi, >> >> Well, I don't know how often this situation can be seen, so it is up to >> you (SVN developers) to decide what to do (I just signaled the issue). > What happens after someone deletes (or deletes-and-commits) a file > external? Would revert+cleanup restore the working copy to a valid > state, or would he need to checkout a fresh wc? > > Daniel > >> Regards, >> Florin Another thing to have in sight: what happens if deleting a directory containing EXTERNAL items?! Testing with SVN 1.7.8, items are reported as DELETED and the EXTERNAL state is lost, so, again, I can delete (and commit as deleted) EXTERNAL files. And a last thing, regarding SWITCHED items: shouldn't they be treated same as EXTERNAL ones in what regards the "svn delete" command? What I mean is that either you delete and EXTERNAL item or a SWITCHED item, you will commit (and remove from repository) an item which is not from the branch you work on, but from a different location of the repository (or a different repository, for EXTERNAL dirs). Furthermore, deleting and committing a SWITCHED item can confuse you if you don't pay attention: after committing it as deleted, and doing an update on the parent directory, you get it back on your working copy, but this time it is from the branch you work on (the original URL). And you ask yourself: "Didn't I already deleted this item?!" Looking at what happens with both SVN 1.6 and SVN 1.7, my conclusion is that it should be better if "svn delete" should never work for EXTERNAL and SWITCHED items (and only for them), but should work for their children (since you can see the parent is from another repository location). This is due to the fact that "svn delete" is a "destructive" operation and should be performed only for items being on the same branch as their parent directory (make users aware about where they work). Consequently, replacing EXTERNAL and SWITCHED items would not be allowed.