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

Re: [PATCH] Make "update" check a dir for local mods before deleting it.

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Sat, 11 Oct 2008 22:47:16 -0400

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/".
>
> (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. 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?

---------------------------------------------------------------------
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 04:47:31 CEST

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