3

I have multiple svn repositories, that i'm trying to combine to one.

I did a couple of svnadmin dump {old-repo} | svnadmin load --parent-dir {new-subfolder} {new-repo} runs to combine them all. However is there a way to point the working copies to the new revision?

If I do a svn switch --relocate {old-repo} {new-repo} I get get the error:

svn: The repository at '{new-repo}' has uuid '70567957-ca9a-40a3-95c2-c7c7f5304040', but the WC has 'e7f76c56-4d0d-472c-a1f0-6eac23a5d238'

I don't think it is easy to an new clean checkout. Because most of the WC have some local changes (like DB credentials / user images). And one even has a (required) cache dir with millions image thumbnails, which take +/- 2 days to regenerate.

Can I force svn to ignore the uuid, and just accept the new location?

Paul Jacobse
  • 424
  • 1
  • 5
  • 14

2 Answers2

2

There is an answer in a new stack exchange site (Unix & Linux) titled svn switch --relocate: wrong uuid? that explains how to set the UUID of the new repository. That has the following consequences:

  • You may only set 1 UUID, but you have n old repositories. You have to decide which one to use, and for this one, the change of UUID may work.
  • All other will have to a new checkout.

Sorry, no complete solution, it seems.

Community
  • 1
  • 1
mliebelt
  • 15,345
  • 7
  • 55
  • 92
0

You can create patch files of your current working copies, then re-checkout and finally apply the patches.

Create patch file:

$> svn diff > ~/old_repo.patch

Checkout:

$> svn co {new_repo}

Apply patch:

$> cd new_repo
$> patch -p0 -i ~/old_repo.patch
qwertzguy
  • 15,699
  • 9
  • 63
  • 66
  • This does the same thing i manually did, it is still not possible to relocate the WC to the new repo – Paul Jacobse Sep 30 '11 at 14:09
  • Oh ok sorry, I didn't get the question. I will update my answer to what you want. – qwertzguy Sep 30 '11 at 14:38
  • This doesn't work, since the cache is in a `svn:ignore *` folder. So it will not be included in the patch. And even if they where in a normal folder, it still would work because they are binary. Right? – Paul Jacobse Sep 30 '11 at 14:56
  • 1
    Nope, if there are binary files you need to change the commands like [this](http://stackoverflow.com/questions/159853/subversion-diff-including-new-files/2255846#2255846). Also if those are the only files in ignore copy them directly. Otherwise maybe a good thing to do is checkout to a new directory and then use rsync to put the changed files back, but then don't forget to reignore the folders. – qwertzguy Sep 30 '11 at 15:24
  • I solved the issue by doing 'almost' what you said. I checked out the new repo. deleted all .svn folders from the old repo and copied the files over. So the binaries and files in svn:ignore folders are also copied. – Paul Jacobse Oct 03 '11 at 09:33