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 E3BAB200D52 for ; Fri, 17 Nov 2017 14:26:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E25FF160BF8; Fri, 17 Nov 2017 13:26:11 +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 4029D160BFB for ; Fri, 17 Nov 2017 14:26:11 +0100 (CET) Received: (qmail 21965 invoked by uid 500); 17 Nov 2017 13:26:10 -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 21955 invoked by uid 99); 17 Nov 2017 13:26:10 -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, 17 Nov 2017 13:26:10 +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 866F0C4F5A for ; Fri, 17 Nov 2017 13:26:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id k_SMWnEyr5Uy for ; Fri, 17 Nov 2017 13:26:06 +0000 (UTC) Received: from einhorn-mail.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 272765F39D for ; Fri, 17 Nov 2017 13:26:06 +0000 (UTC) X-Envelope-From: stsp@apache.org Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id vAHDPckx023314 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Nov 2017 14:25:39 +0100 Received: from localhost (ted.stsp.name [local]) by ted.stsp.name (OpenSMTPD) with ESMTPA id 4aede6f6; Fri, 17 Nov 2017 14:25:38 +0100 (CET) Date: Fri, 17 Nov 2017 14:25:38 +0100 From: Stefan Sperling To: Sam White Cc: dev@subversion.apache.org Subject: Re: [RFC] svn commit --parents option needed Message-ID: <20171117132538.GN40733@ted.stsp.name> Mail-Followup-To: Sam White , dev@subversion.apache.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) archived-at: Fri, 17 Nov 2017 13:26:12 -0000 On Tue, Nov 14, 2017 at 03:57:45PM +0000, Sam White wrote: > Hi Developers, > > I propose the addition of an equivalent to the --parents option to "svn > commit", to check in the directory structure as well as any files > specified. > > I understand that with svn add, the --parents option is available. However, > the use case I have in mind is one that I come across quite often, > involving changelists and SVN moves. > > If I add files to changelist, I expect to be able to commit any changes to > them quickly and easily - that's the point, right? But if I perform an SVN > move on these items, to a directory which is not yet committed, because I > cannot yet add directories to the changelist, when I go to commit the > files, I get the error > > svn: E200009: '/some/new/directory/here' is not known to exist in the > repository and is not part of the commit, yet its child > '/some/new/directory/here/file_on_changelist.txt' is part of the commit > > If I then try and commit those files, as sort of a "pre-commit" commit, > then i get the error > > Cannot commit '/some/directory/here' because it was moved from > '/other/directory/here/' which is not part of the commit; both sides of the > move must be committed together > > The workaround for this seems to involve a mess of committing these > directories together, with the option --depth=empty, and then committing > with the changelist. Alternatively, I could just skip the --depth=empty, > and let the commit handle the fiels as well - but then, what was the point > in making a changelist? I still end up formulating some long command! > > I was asking about this in the #svn IRC - here is the chat log: > http://colabti.org/irclogger/irclogger_log/svn?date=2017-11-14#l21 > > Is what I am suggesting clear? I'd appreciate your thoughts. > > Thanks, > > Sam (sixquidsquid) So to reiterate: I move a directory which contains some files which belong to a changelist and some which do not belong to this changelist. I now want to use commit --cl in order to commit the modifications in the files listed in my changelist. Because some or all of these files sit inside the moved directory I have to commit this move as well. In the repository, the moved directory will be both copied to the new location and deleted at its old path in this same commit. And a server-side directory copy is always recursive; there is no way to exclude any children from the copy unless we're explicitly marking them deleted in the copy target. So some files which are not part of my changelist will be moved along. Is your goal to *only move the files* which are part of your changelist? I believe this could not be made to work without lots of headache. Or is your goal to perform the directory move recursively, and in the same revision commit modifications to only those files which are part of the changelist? I believe this can be made to work. I'll note that the current behaviour in the case where a changelist contains a file which has been moved directly, rather than having been moved along with a parent directory, supports your feature request because this case already "just works": $ svn cl my-file alpha A [my-file] alpha $ echo foo >> alpha $ svn mv alpha alpha2 A alpha2 D alpha $ svn st --- Changelist 'my-file': D alpha > moved to alpha2 A + alpha2 > moved from alpha $ svn ci alpha2 $ svn ci --cl my-file -m "edit and move alpha" Deleting alpha Adding alpha2 Transmitting file data .done Committing transaction... Committed revision 3.