简体   繁体   中英

svn-externals with own svn-externals: how to recursively checkout?

So I'm using svn:externals to checkout an external repo. The external repo has its own svn-externals set up.

Now, when updating the working copy of my project, the files from the external repo are being updated, but its externals are not. Is that behavior as designed, can it be extended to also update the external dependencies?

Recursive checkout are supported since Subversion1.5, as this thread illustrates .

The "Version Control with Subversion" book does mention svn checkout , svn update , svn switch , and svn export commands as able to recurse in the externals repos, but:

  • If an external is set for a particular revision, no amount of ' update ' will change any file in it, even though the external repo has had new revisions.
  • the update must be always initiated from the parent repo, not directly from the sub-repo:

Be careful, though, that you don't inadvertently modify your external working copy in subtle ways that cause problems.
For example, while an externals definition might specify that the external working copy should be held at a particular revision number, if you run svn update directly on the external working copy, Subversion will oblige, and now your external working copy is out of sync with its declaration in the primary working copy.

So maybe one of those two cases applied here.


The OP Carsten reports:

It is actually working now.

I had set the externals prop on the root node of the external project (lets say project ' lib ').
In my concrete project (project ' A '), the external was defined on a sub-folder of ' lib ' (ie. myLocalFolder > lib/someFolder ).
That seems to be the reason for subversion not recursing into lib 's externals; only looked inside ' someFolder ', didn't find external defs there, so it didn't checkout someFolder/externalLib .
Now, in ' lib ' I changed externals definitions so that they are defined inside the folder that I refer to in ' A '; works like a charm now!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM