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

switch -relocate script

From: solo turn <soloturn99_at_yahoo.com>
Date: 2003-04-07 20:08:48 CEST

i tried to do a switch with a script ... but somehow this seems not
to work. can it be that the path length is stored in dir-wcprops?

K 25
V 35

if yes, why is there so many dependencies in the working copy schema?
should it not be sufficient to have the url once, and thats it (like
in a normalized db-schema)?

the script (try) was:

#! /usr/bin/env bash
# svnswitchurl based oldurl newurl oldfile newfile
# based: the basedirectory where to start the find
# oldurl: the old url of the repository, url consists of protocol,
host and port
# example: http://svn.collab.net:81
# newurl: the new url of the repository
# example: https://svn.collab.net
# olddir: the old url of the repository, with leading slash
# example: /repos/svn
# olddir: the new url of the repository, with leading slash
# example: /repos/svn
# backup-files are created, and can be moved back with a separate

# first, change the file in all the files, and createing *.1bck
backup files
find $1 -type d -name .svn -exec find {} \; | xargs grep -l $4 |
xargs perl -pi.1bck -e "s-^$4-$5-g"

# second, change the urls in the entries file, excluding 1bck files,
# and create a *.2bck backup file
find $1 -type d -name .svn -exec find {} -name entries \; | xargs
perl -pi.2bck -e "s-$2$4-$3$5-g"

Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 7 20:09:35 2003

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

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