Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while setting svn externals property

Tags:

svn

I have a problem setting (or changing) an svn:externals definition in my local svn working copy. First

svn propget svn:externals

lists the following:

https://path/to/mytool/tags/1.0.8 mytool

I want to change this property so it points to a tag with revision number 1.0.9. I tried the following:

svn propset svn:externals https://path/to/mytool/tags/1.0.9 mytool
svn: Error parsing svn:externals property on 'mytool': 'https://path/to/mytool/tags/1.0.9'

and

svn propset mytool svn:externals https://path/to/mytool/tags/1.0.9
svn: Setting property on non-local target 'https://path/to/mytool/tags/1.0.9' needs a base revision

and the same of the above with the URL and the target directory set in quotes (as found as answer to the same problem), which both yields an error

svn: Explicit target required ('https://path/to/mytool/tags/1.0.9 mytool' interpreted as prop value)

So what the heck am I doing wrong? How to change the property correctly. svn help does not really help here...

Addendum: With svn propedit svn:externals . it does seem to work. I am able to change this property, which I can commit now. But propset does not seem to work.

like image 828
Alex Avatar asked Sep 17 '13 11:09

Alex


1 Answers

You have to specify the PROPVAL in the form of TARGET-DIRECTORY EXTERNAL-PATH and set it on parent directory of TARGET-DIRECTORY. So in your example that would be...

svn propset svn:externals "mytool https://path/to/mytool/tags/1.0.9" .

...to be executed in the directory parent to the directory called mytool.

Update: To do this with multiple lines, the normal approach I use is to write the properties into a file, e.g. externals.txt, then set it up with

svn propset svn:externals -F externals.txt .

Under Linux you might also get away with this one-liner, but I'm not aware of a Win32 analogue for this.

SVN does not particularly shine when it comes to this task :/

like image 197
zb226 Avatar answered Oct 30 '22 17:10

zb226