Search code examples
svn

Is it possible to change "svn:externals" property of subversion repository remotely?


I am trying to change "svn:externals" property of a remote repository via this command:

svn ps svn:externals "vendor1 http://vendor_repo_here.com" http://main-repo-here.com

I am expecting above command to change the "svn:externals" property from whatever it is to "vendor1 http://vendor_repo_here.com".. But it throws an error:

Setting property on non-local target 'http://main-repo-here.com' needs a base revision.

So I try this:

svn ps -r HEAD svn:externals "vendor1 http://vendor_repo_here.com" http://main-repo-here.com

Now it says:

Cannot specify revision for versioned property 'svn:externals'

Am I doing something wrong? Is there anyway to change this remotely via command line?


Solution

  • I had a similar problem. Turtoise seems to checkout and then commit again, so I wrote a script that does the same.

    svn checkout <URL> repocopy --depth 'empty'
    svn propget svn:externals repocopy > tmp2
    //whatever you want to do > tmp_new
    svn propset svn:externals repocopy -F tmp_new
    svn commit -m "commit comment" repocopy
    rm -f -r repocopy
    rm tmp2
    rm tmp_new