简体   繁体   中英

How to correctly generate a complex externals structure with sharpsvn?

I have a very convoluted repository structure using subversion. Much of this has to do with the limitations of my team, security requirements, and the dependencies of the project. The structure used here is not optional as a consequence and cannot be altered.

The repository structure consists of the following pattern:

root-|- main -|- branches
     |        |- tags
     |        |- trunk - main - plugins
     |
     |- modules -| - module1 -|- branches
                 |            |- tags
                 |            |- trunk - module1 - plugins - plugin1
                 |            |- modules - ...
                 |
                 | - module2 -|- branches
                 |            |- tags
                 |            |- trunk - module2 - plugins - plugin2
                 |            |- modules - ...

The source of each external is a pluginX folder. The target is the plugins folder of the trunk one level lower (or the plugins folder of main). The documentation of the API is nigh non-existent unfortunately. I'm suspecting I need to the propset function somehow but how to point to the specific target directory and source directories is not described anywhere I've been able to find nor have I found any examples.

Edit: Each module may be pulled separately and worked on independent of the root project. I cannot just use the root for this. Hell, I can't even get a hostile response to this question!!

create a folder build in 'root' folder and use relative path to reference projects in your solutions, then configure all projects of their output folder to build\\xxx folder , all output folders are relative path too. and in main program, configure assembly bindings with relative path again. with this pattern, no matter who download repo, they could compile projects to same root folder, and debug with same configure.

For very complex dependencies, like A=>B=>C=>D, the first time to open solution A, if B/C/D is not compiled and not referenced, then A will show a reference warning, you have to open and compile B&C&D, then A will work. but usually, we should add B/C/D to solution A, so, there is no more error at the first time we open it.

Sometimes, some source code is not open for all developers, so they can only get a compiled dlls, for those dlls, we need another folder (like 'tools'), which include all compiled assemblies in Source code server. we add file references with relative path in our solutions, and configure them as "Copy to local"=true

for many of project, we will use post-build or pre-build event to load or copy file from or to somewhere, all of them must be relative path too.

Answering my own question. The library I'm using has a function that sets the externals for a given folder in the local system given an absolute path to that folder. The library is a port from the C version of the library and apparently the authors just assumed that people would "just know" to look there.

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