Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 88CE5200BA0 for ; Fri, 14 Oct 2016 14:40:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 877B7160ADD; Fri, 14 Oct 2016 12:40:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D140E160AD9 for ; Fri, 14 Oct 2016 14:40:54 +0200 (CEST) Received: (qmail 21466 invoked by uid 500); 14 Oct 2016 12:40:54 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 21451 invoked by uid 99); 14 Oct 2016 12:40:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2016 12:40:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 32AF8C2002 for ; Fri, 14 Oct 2016 12:40:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=visualsvn.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id RKRdG3FVVRCz for ; Fri, 14 Oct 2016 12:40:49 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C2BCB5F1BE for ; Fri, 14 Oct 2016 12:40:48 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id b81so191384508lfe.1 for ; Fri, 14 Oct 2016 05:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=visualsvn.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=aLaDwsgSk2e4ZXPctMSV7C4gWpbf8//PTB6CWH72A6k=; b=GDTpINdG7Ce/G8q0w7FaCdDoXEnlJRg//0j0RFYUwA4UpVoblNEUXVMPBT6cOmECbK 6gz9UQwhpfpzTwQuF6ONXa2ahHNkFUkLGnCnWcHnfzc31bekSMZQZJWrfBV+i4GbauQB R/nisVM4uX1VsdmvLcWZMMn9AlQ8B9qy/fm4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aLaDwsgSk2e4ZXPctMSV7C4gWpbf8//PTB6CWH72A6k=; b=khx/mqj1S2TTQBz0wg/eQrm9sWtHSD8XTkoeTiAwHX4PgvW5YXZz3YH4XJQF3j4zaY KQtccYygGeAFd6FVAv9RXb3oLfjwYo5htEeCpfukKUwn/4/k/KaJAhu/ii4yixrp9SiR E8BOz1p0llU9LWsBhdr+ig7R9EhDT2SUYb94rF2ZBfsfnKi80OWX+C+xKIN2D43x2Hom dgExXJuXSuqReRyt0LOJlFHHaFAUTbwBT/G2Gj4EysNC6chySt0JWWVMrH4se13Cm2aN kir/7oNJFd+y//N+soA3go6+o+f8mNeYxcTWGu0uFXtpoULWxzqrvrR8S9ZooWkbwv1P UPLg== X-Gm-Message-State: AA6/9Rk833Rtg4uR+2IVbxXM4yc9erm7XVjJPxHqomjYM0CmpHeVSqFMoelfGpK0IuLQX+ScNAZDUjeIXlOF912g X-Received: by 10.28.103.70 with SMTP id b67mr5528254wmc.74.1476448846255; Fri, 14 Oct 2016 05:40:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.216.71 with HTTP; Fri, 14 Oct 2016 05:40:25 -0700 (PDT) In-Reply-To: <20161012142805.njen7ikgmc67ykyw@pks-xps> References: <20161012142805.njen7ikgmc67ykyw@pks-xps> From: Ivan Zhakov Date: Fri, 14 Oct 2016 14:40:25 +0200 Message-ID: Subject: Re: [PATCH] Reject checkouts to existing directory To: Patrick Steinhardt Cc: Subversion Content-Type: text/plain; charset=UTF-8 archived-at: Fri, 14 Oct 2016 12:40:55 -0000 On 12 October 2016 at 16:28, Patrick Steinhardt wrote: > Hi, > > attached is a patch to reject checkouts to already existing > directories when `--force` is not given. This is according to > `svn co --help`. > > [[ > Reject checkout to existing paths without force > > * subversion/svn/checkout-cmd.c: > - (svn_cl__checkout): Reject checkout to existing directory > without --force > ]] > As far I see we have four different cases of checking out to existing directory: a. Checkout of non-empty directory to non-empty local directory b. Checkout of non-empty directory to empty local directory c. Checkout of empty directory to non-empty local directory d. Checkout of empty directory to empty local directory I think that cases (b),(c),(d) should not require '--force'. It seems to be pretty safe operations. Also (c) is common way to 'takeover' (version) existing repository. I meant: 1. Create empty directory in repository 2. Check it to existing directory with source code 3. Add all requested files/directories 4. Review all changes and commit. But it makes sense for to require '--force' flag for case (a): it's very easy mess up local changes in this situation. -- Ivan Zhakov