I've recently updated Subversion repositories from an old 1.2.3 version to 1.6.0 via svnadmin dump/load. The old repositories all used the same UUID (repositories were created using by copying a template repository). I've changed the UUID on a couple of the new repositories via svnadmin setuuid to be unique. I can't just relocate my existing working copies of those repositories because the UUIDs are different. I know about exporting the working copy and checking out from the new repository, but I was wondering whether there was a way to just change the UUID of the working copy in-place, like what svnadmin setuuid does for repositories.

link|improve this question
feedback

3 Answers

up vote 2 down vote accepted

You need to edit all the 'entries' files in your pulled repo. If the repo has a lot of directories, find + a sed script will make short work of the task.

link|improve this answer
feedback

Here is a command that does the trick:

sed -i 's/old-uuid/new-uuid/' $(find . -type f -name entries -print)

Replace old-uuid and new-uuid with the actual ids.

link|improve this answer
+1Thanks for the solution. This is not working for directories having spaces. "find . -type f -name entries -exec sed -i 's/old-uuid/new-uuid/g' {} \;" without double quotes seems working. – Tommy Oct 26 '11 at 10:32
feedback

The section "Managing Repository UUIDs" in svn red-bean book may have the answer you are looking for.

link|improve this answer
That section talks about repository UUIDs, not working copy UUIDs. – Ioan Jan 6 '11 at 21:30
@Ioan: Quoting from that section: For folks using versions of Subversion earlier than 1.5, these tasks are a little more complicated. You can explicitly set a repository's UUID by piping a repository dump file stub that carries the new UUID specification through svnadmin load --force-uuid REPOS-PATH - Isn't this what you needed? – yasouser Jan 6 '11 at 21:31
1  
Again, no, I'm not talking about repository UUIDs, but rather working copy UUIDs; working copies are the same as a checkout. – Ioan Jan 7 '11 at 13:00
You cannot change the working copy UUID to that of the server repo without updating or svn switch-ing the working copy to the [new/existing] location of the repo. – yasouser Jan 7 '11 at 13:59
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.