Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

svn

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?

like image 716
Abhimanyu Grover Avatar asked Jul 20 '10 01:07

Abhimanyu Grover


2 Answers

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" tmp
rm -f -r repocopy
rm tmp2
rm tmp_new
like image 195
panschk Avatar answered Sep 28 '22 06:09

panschk


from the help of svn propset:

propset (pset, ps): Set the value of a property on files, dirs, or revisions. usage: 1. propset PROPNAME PROPVAL PATH... 2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]

  1. Changes a versioned file or directory property in a working copy.
  2. Changes an unversioned property on a repository revision. (TARGET only determines which repository to access.)

svn:externals is a versioned property, which cannot be changed in such way.

like image 36
Adrian Shum Avatar answered Sep 28 '22 05:09

Adrian Shum