[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Scripting an svn:externals change

From: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Date: Thu, 2 Sep 2010 11:43:13 -0500

On Sep 2, 2010, at 11:27, BRM wrote:

> I recently had my subversion server die - the box, not subversion itself - and
> have been working through the recovery process.
> Part of that is going through and modifying a number of projects for the change
> in the URL - namely changing from a non-standard port for apache to a standard
> port.
> We have started using svn:externals in some projects, but did not use the
> relative path values - instead, specifying the whole URL; so I need to update
> the URLs in the svn:externals.
>
> I know I can get the values using 'svn pget svn:externals'; but the SVN redbook
> recommends against using pset/propset to set the values.
> So, how do I set the values from a script? "svn help pset" seems to show a "-F"
> parameter for reading the values from a file. This seems like it would take care
> of the concern mentioned issue - that the externals are multi-line.
> If that is the case, then shouldn't the note say to use that parameter with pset
> or use pedit instead of flatly saying use pedit?
> Or is there another reason why I shouldn't use pset?

If you can afford to have the repository offline, make a dumpfile, twiddle it, load it into a new repository, and have everybody check out new working copies, you may want to consider doing that. The twiddling step would be done with the svndumptool script. The advantage would be that you could correct the externals definitions in all past revisions of the repository too, not just the HEAD, so that anybody needing to check out a past revision would still have working externals in the repository's new location. And do use relative externals this time so you won't have to do this kind of surgery ever again, noting that the relative externals syntax is only compatible with Subversion 1.5 and higher.
Received on 2010-09-02 18:43:56 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.