On 08/29/2011 02:23 PM, Daniel Shahaf wrote:
> C. Michael Pilato wrote on Mon, Aug 29, 2011 at 12:23:34 -0400:
>> On 08/29/2011 12:15 PM, Neels J Hofmeyr wrote:
>>> If user wants to commit to a *pegged* external, user should just use a
>>> different, non-externals-ized checkout.
>>
>> AFAIK, we don't have the means to detect and prevent this action.
>
> Did you mean, "no means that don't involve recursing to the parent of
> the wcroot of the commit target"?
That's not sufficient. We'd have to keep recursing up to the root of the
volume to get a definitive answer because the definition of an external
working copy could live in *any* parent directory thereof. I demonstrate
this simply with the following:
{{{
#!/bin/bash
# Cleanup previous runs and make a repository with some top-level dirs.
rm -rf sne-*
svnadmin create sne-repos
svn mkdir -m "Some dirs" file://`pwd`/sne-repos/main \
file://`pwd`/sne-repos/nested \
file://`pwd`/sne-repos/ext
# Checkout main.
svn co file://`pwd`/sne-repos/main \
sne-wc-top
# Checkout nested inside an unversion subdir of the first checkout.
mkdir sne-wc-top/unversioned
svn co file://`pwd`/sne-repos/nested \
sne-wc-top/unversioned/sne-wc-nested
# Now set an external in main that pulls ext all the way down into nested.
svn pset svn:externals \
'^/ext unversioned/sne-wc-nested/unversioned/sne-wc-ext' \
sne-wc-top
svn up sne-wc-top
}}}
After this script is run, you have:
sne-wc-top (an empty wc)
unversioned
sne-wc-nested (a different empty wc from svn-wc-top)
unversioned
sne-wc-ext (a third, different empty wc, which is an
external not of its parent, or even of the
nearest versioned ancestor, or even of any
item within the nearest versioned wc, but
of a wc even farther up the tree.)
--
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on 2011-08-29 20:47:13 CEST