Reconcile relative external from Subversion

Our Subversion repository has several subdirectories containing common files, as well as subdirectories for each project. Projects are configured with relative svn:externals properties to pull shared directories from the repository and configure them as subdirectories.

So, for example, our repository looks something like this:

  client
 shared
 portable
 app1
 app2

and app1 has svn:externals

  ../shared shared
 ../portable portable

so when checking portable and shared you can use app1 as subdirectories.

TortoiseSVN has an excellent function that makes a commit on app1 automatically detects externals subdirectories, realizes that they are all part of the same repository, and commit all its changes as part of the same commit. However, I cannot figure out how to get the same behavior from the command line client. Any suggestions?

+4
source share
3 answers

It turns out this has a very simple solution, at least with Subversion 1.6.12: explicitly specify paths on the command line.

For example, if I run

 cd app1 svn ci file_in_repository.cpp shared portable 

then Subversion will pass app1 , shared and portable all within the same revision as I want it to. Apparently, the command line client will not process external files by default, but does not have problems processing one commit with them if they are explicitly specified.

0
source

This feature has not yet been implemented. The following is taken from SVN ver. 1.5 book :

Perhaps the most frustrating working copy created through the support of the externals definition is still disconnected from the main copy job (to whose versioned directories the svn: externals property was actually set). And Subversion still really only works on non-dissociating working copies. So, for example, if you want to make changes that you have made to one or more of these external working copies , you must run svn explicitly to transfer to working copies on the primary working copy there will be no external ones.

I also checked the SVN 1.6 release notes and only two improvements that were related to svn: externals. These are: file support in svn: externals and support for the usual shell citation rules in external definitions.

Perhaps this is not a function that should be implemented (and this is also my opinion). Typically, svn: externals are used to include relatively stable headers / files in any project / application that depends on them. They usually refer to tags or paths for specific changes. This is a big question with no particular answer that the svn client should make in this case.

+2
source

To emphasize, the solution above - linking to each external project individually - only works if the external links are absolute.

0
source

Source: https://habr.com/ru/post/1311093/


All Articles