Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change dir name in repository by svndumpfilter?

Is it possible to rename directory in svn repository.

Not create new revision in which this directory will be renamed.

I would like to change the name of this directory starting from the first revision.

As far as I understand svndumpfilter utility can be used for this.

Is it correct?

Does anyone can give me small example how to do it?

like image 407
Volodymyr Bezuglyy Avatar asked Sep 28 '09 10:09

Volodymyr Bezuglyy


1 Answers

You should svnadmin dump your repository, process the dump file and svnadmin load the processed file in an empty repo. No svndumpfilter needed.

svnadmin dump /repos/path > old.dump

The dump file can be processed with Sed or another tool (be sure that binary data doesn't get corrupted) and replace the directory name. For example:

sed -b -e "s#^\(Node.*path\): dir1/dir_old#\1: dir1/dir_new#" old.dump > new.dump

Once you've finished processing the dump file:

svnadmin create /newrepos/path
svnadmin load /newrepos/path < new.dump
like image 123
fglez Avatar answered Nov 09 '22 05:11

fglez