Search code examples
svntortoisesvnsvn-externals

Committing relative externals from Subversion


Our Subversion repository has several subdirectories containing shared files as well as subdirectories for each project. Projects are set up with relative svn:externals properties to pull in shared directories out of the repository and set them up as subdirectories.

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

client
shared
portable
app1
app2

and app1 has as its svn:externals

../shared shared
../portable portable

so that on checkout, portable and shared are usable as subdirectories of app1.

TortoiseSVN has the nifty feature that doing a commit on app1 will automatically detect the externals subdirectories, realize that they're all part of the same repository, and commit all their changes as part of the same commit. However, I can't figure out how to get the same behavior out of the command-line client. Any suggestions?


Solution

  • It turns out that 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 commit app1, shared, and portable all within one revision, as I want it to. Apparently the command-line client won't process externals by default but has no difficulty handling a single commit with them if they're explicitly given.