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

Meaning of --depth=immediates when deleting a tree [was: [PATCH] Make "update" check a dir for local mods before deleting it.]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Sun, 12 Oct 2008 17:33:55 +0100

Karl Fogel wrote:
> Julian Foad <julianfoad_at_btopenworld.com> writes:
> > $ svn update --depth=immediates # tries to delete A/...
> > svn: Unable to lock 'A/B'
> >
> > This errors out because the "update" command puts a write lock only up
> > to the depth of "immediates", but then the scan for modifications needs
> > at least a read lock to depth infinity inside "A/".

I worked around that and committed r33583 to make "update" test the
whole deep directory tree, even with "--depth=immediates".

> > (1) Is this the right semantics of "svn update --depth=immediates", to
> > go and delete a directory tree that extends to depths greater than
> > "immediates"? Or, by analogy with how it would add the tree "A/..." (it
> > would only add the first level), should it only delete an empty
> > directory and refuse to delete anything deeper?
>
> It would make sense for adding to only add the tree to the specified
> depth (i.e., only add the first level). But I'm not sure that's any
> guide to what delete should do...
>
> > $ svn update --depth=immediates # wants to add A/...
> > A A/
> > # and doesn't add anything deeper.
> >
> > So...
> >
> > $ svn update --depth=immediates # wants to delete A/...
> > D A/
> > # if A/ was empty
> >
> > and
> >
> > $ svn update --depth=immediates # wants to delete A/...
> > Error! or Skipped! or something.
> > # if A/ was not empty
>
> Hmrmrmrmrm. I guess that makes the most sense.

Thanks. I'm not currently planning to touch this, but I may do if it
becomes more of a problem.

> Another possibility
> would be to "unversion" A (as in, its .svn directory would go away),
> while leaving subdirectories below it versioned. Would that be nicer
> for users than just erroring, though?

That doesn't sound nice to me.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-12 18:34:15 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.