I have an SVN repository containing several components:
- LibraryA
- LibraryB – depends on LibraryA
- Application – depends on LibraryB and LibraryA
More detailed structure (branches and tags are not related to the problem):
- LibraryA
- LibraryA_code
- LibraryB
- LibraryB_code
- svn:externals to a fixed revision R1 of LibraryA_code
- Application
- Application_code
- svn:externals to a fixed revision R2 of LibraryA_code
- svn:externals to a fixed revision R3 of LibraryB_code
The problem I’m trying to solve is automatic detection of situation when R2 differs from R1 (breaking expectations of LibraryB_code) and notification about this (e.g. build failure).
I’ll describe in an answer the only solution which I see for now, but I hope for something more elegant 🙂
Environment: Windows, Visual Studio, SVN.
When you modify the
svn:externalsproperty of Library B and commit this change, you create a new revision of Library B. This means, the Application repository is still consistent. Youonly need to worry when you modify an
svn:externalsproperty of Application itself.This case can be dealt with in a repository hook for the Application repository. That hook checks out the specified revision of Library B to a temporary directory and compares its required version of Library A with that of the version required by the application. See Repository Hooks for a list of available hooks.