Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you move svn path and have the history "follow" the move?

Tags:

svn

I think this may be something that is intentionally not allowed in SVN, but I wasn't able to get a definitive answer from my searching.

I am wondering if it is possible to move a path in the SVN repository to a new location and have the history moved in such a way that the repository behaves as if the content has always existed in this new location. The behavior of svn rename/mv is such that the content is moved to the new path for current and future revisions, but previous revisions still point to the old location.

As previously mentioned, I can see how this essentially breaks the validity of the repository history (and would require rewriting previous revisions), but it also seems like perhaps something that other users have been looking for and so might be possible. If I understand correctly, this is possible in git via rebase.

Update:

It appears that if I use svnadmin dump to dump the repo contents and svndumpfilter to filter into two separate dumps and then load those dumps into separate locations, the new location will still contain whatever leading paths were appended in the old repository path. To illustrate, if I have a path in my repo "/trunk/PathA" and I want to move it to "/trunk/PathB", and I follow the method found here for moving, it looks like it will go into "/trunk/PathB/trunk/PathA".

like image 937
Quinn Bailey Avatar asked Nov 12 '22 20:11

Quinn Bailey


1 Answers

You can edit the dump file to change the path before you load it. Here is a perl script to do it. SVN-DumpReloc

like image 52
maddoxej Avatar answered Nov 15 '22 11:11

maddoxej