On Thu, Mar 01, 2012 at 04:35:32PM +0100, Humm, Markus wrote:
> Hello,
>
> I'm currently learning SVN as we're planning to use it here in the near future.
> Some of our projects are structured like this (MS Windows):
>
> D:\Source\Project1
> D:\Source\Project2
> D:\Source\CommomLibraries
>
> Where Project1 and Project2 are individual projects but both rely on files
> which reside in D:\Source\CommomLibraries and should reside there.
>
> One could try to use svn:externals not to set this up properly so that a
> Checkout of Project1 also checks out CommonLibraries and a update on Project1
> also takes into account the changes you've made to CommonLibraries.
You could use this kind of structure if you make "Source" a working copy
of a folder that has 2 or 3 externals defined that pull in the desired
subfolders.
And there is an alternative to using externals. You can use the
shallow working copy depth feature instead.
Put the folders side-by-side into the repository:
/trunk/Project1
/trunk/Project2
/trunk/CommomLibraries
Then, either check out everything from /trunk, or check out sparse
working copies as follows:
svn co --depth empty URL/trunk Source
cd Source
svn update --set-depth infinity CommomLibraries
svn update --set-depth infinity Project1
or:
svn update --set-depth infinity Project2
This gives you the following working copy layout, with Project1
and Project2 being optionally excluded via depth:
D:\Source\Project1
D:\Source\Project2
D:\Source\CommomLibraries
If you'd like to automate depth configuration during checkout there
is a helper script available at
https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-viewspec.py
It would be nice to have this kinf of "view" feature in Subversion's
core so that this would work without an external script.
> I'm using Tortoise SVN 1.7.5 and this one managed to allow me to set up
> svn:externals like I assumed would work. It even commited the structure
> properly to the repository. But when I tried to checkout this project on
> another computer I get a assertion from svn itsself.
>
> In File
> »D:\Development\SVN\Releases\TortoiseSVN-1.7.5\ext\subversion\subversion\libsvn_wc\wc_db.c«,
> Zeile 2890: Assert-Anweisung schlug fehl
> (svn_dirent_is_ancestor(wcroot->abspath, local_abspath))
>
> The local path of my svn:externals was this: D:/u/svnexternaltest2/gemeinsamme_bibliotheken
>
> If I tried to use ../svnexternaltest2/gemeinsamme_bibliotheken instead Tortoise would detect that it contains a .. Or is a absolute path. Obviously either Tortoises or SVN's absolute path detection loginc is not 100% fool proof as well.
Yes, this is a bug. Coincidentally this problem was discussed just today.
See http://svn.haxx.se/users/archive-2012-03/0012.shtml
Received on 2012-03-01 17:28:32 CET