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

Re: Can't commit multiple externals with depth infinity

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 09 Jul 2008 00:21:51 +0100

Bert, this is almost certainly caused by the fact that your current working
directory and your externals directories are disjoint.

When doing a recursive checkin, Subversion will try to do the single easiest
recursive lock of the working copy, which means locking the common parent
directory of all the commit targets. Locking happens by crawling a working
copy. But working copy administrative locks don't crawl into disjoint
working copies, even if those working copies are situation as children or
grandchildren of your primary working copy. So in your case, Subversion has
locked "." and the children thereof which are first-class citizens of its
working copy. But then it tries to operate on all your targets, some of
which aren't locked. Hence the locking error.

In non-recursive commit mode, though, Subversion is more conservative about
its locking, which turns out well in your case, as it never bothers to check
for each locked target that they all live in a single working copy.

Bert Huijben (TCG) wrote:
> Hi,
>
> While debugging an issue of an AnkhSVN user I found the following strange
> behavior:
>
> When committing with depth infinity I /can't/ commit to a folder and two
> externals from the same repository at the same time. But when I use depth
> empty I /can/ commit.
>
> Using subversion 1.5.0:
>
> ============================
> # Create a test repository
>
> svnadmin create e:/q/repos
> svn mkdir -m "" file:///e:/q/repos/root
> svn mkdir -m "" file:///e:/q/repos/a
> svn mkdir -m "" file:///e:/q/repos/b
>
> # Create working copy
>
> svn co file:///e:/q/repos/root wc
> pushd wc
> svn pe svn:externals .
>
> # Add this to the externals property
> # a ^/a
> # b ^/b
>
> # Then fetch the externals
> svn up .
>
> # Make a few more changes
> echo > a/file
> echo > /b/file
> svn add a/file b/file
>
> # This fails:
>
> svn ci . a/file b/file -m ""
> #svn: Are all the targets part of the same working copy?
> #svn: Unable to lock 'E:\q\root\a'
>
> # But this succeeds:
> svn ci --depth=empty . a/file b/file -m ""
> #Adding a\file
> #Adding b\file
> #Sending .
> #Transmitting file data ..
> #Committed revision 4.
>
> ============================
>
> TortoiseSVN uses this behavior to allow committing to two externals from the
> same repository at the same time (confirmed by our user), but is this
> expected behavior?
>
> The AnkhSVN user sees UUID mismatch errors around the same issue, but I was
> not able to reproduce these.
>
> My expected behavior would be that both cases succeed or that both cases
> fail, as they specify exactly the same change. (Failing would probably break
> TortoiseSVN)
>
> Bert
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-07-09 01:22:06 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.