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

Re: Mixing recursive and non-recursive commits

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 25 Jul 2013 00:24:11 +0200

On Wed, Jul 24, 2013 at 07:32:20PM +0000, Braun, Eric wrote:
> The enhancement would be to include only parents marked for addition. Nothing special for prop changes as you don't want to commit these later if the directory was already committed (unless explicitly stated).
>
> So, I think's a rather simple request. If commit --parents is loaded then any parent directories for the given command line targets that are in an add state should be included in the targets passed on.
>
> Eric

What would svn commit --parents do if the newly added parents are
replacing a deleted item in the working copy? It seems svn would
then have to commit a replacement instead of an addition. In which
case this option cannot claim to be scoped to just additions, because
a deletion needs to be committed as part of the replacement.

The same questions applies to added items which are inside copies.
Copies can only be committed recursively due to the way cheap copies
are implemented in the repository. That would mean that not only parents
of the explicit commit target would be committed, but also any other
children of those parents.

If the --parents option did nothing for copied and replaced items,
it would probably have to error out if those occur.

For example, the following would commit A and A/B:

  svn mkdir A
  svn mkdir A/B
  svn commit --parents A/B
 
But the following would have to error out or commit the deletion of
the original A, not just an addition:

  svn rm A
  svn mkdir A
  svn mkdir A/B
  svn commit --parents A/B

And this would also error out or commit any children of C along
with the child B, effectively committing C recursively, which
defeats the idea of the --parents option:

  svn cp A C
  svn mkdir C/B
  svn commit --parents C/B

So, due to the recursive nature of copies, the above would be
equivalent to:

  svn cp A C
  svn mkdir C/B
  svn commit C

I'm not sure how this behaviour can be defined in a consistent way.

What about passing the right list of commit targets instead of adding
a new --parents option? Note that the list can be passed via a file using
the --targets option. Perhaps you could generate a file that includes the
proper list of targets, and then run the commit?
Received on 2013-07-25 00:24:49 CEST

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.