Reputation: 44395
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.
Upvotes: 6
Views: 7654
Reputation: 3
I had same problem, but solution from @zb226 didn't work.
I was trying all kind of things and it was some sort of bug and maybe it has something to do from changing server from linux Centos to Windows(VisualSVN). The problem was in missing space after " symbol (in this case missing space in front of "mytool"
Without extra space it just didn't work and parsing error occurs. In example I show how it worked for me. It is basically the same solution as @zb226 proposed but with one extra space.
svn propset svn:externals " mytool https://path/to/mytool/tags/1.0.9" .
Upvotes: 0
Reputation: 10539
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 :/
Upvotes: 7