简体   繁体   中英

SVN: Relocate local copy after migration with --parent-dir

We recently migrated one of our subversion repositories that was structured such it could only contain one project (ie trunk, etc. was at the root) so that multiple projects could be controlled in one repository. We used the --parent-dir option when calling svnadmin load to move all files from the repository into a sub-directory of a different repository. Of course the UUID is not the same as the old repository anymore since it is in fact, a new repository.

So originally the repository URL to the project's trunk looked something like this:

http://subversion/repo/trunk

Now it is like this:

http://subversion/repo/project/trunk

Now I need to migrate my local working copies of trunk. I know I can take the one time hit and re-checkout from the project folder, but this is quite a large repository and doing so is pretty expensive time wise and disk space wise.

Is there any way to tell svn relocate to not only ignore the ancestry but also to ignore the fact that the repository UUID has changed as well?

Maybe there is a way to update the meta-data in the .svn folder manually to point to the right repo URL? Maybe there is a way to just checkout the meta-data in the .svn folder and swap it out in my local working copies?

  1. Relocate "... rewrite working copy URL metadata to reflect a syntactic change only.", thus: if you have changed UUID, you can not relocate - new repository is totally new, unrelated to old, relocate will fail
  2. "Of course the UUID is not the same as the old repository anymore" - really?! You can combine --force-uuid | --ignore-uuid on load stage in order to inherit at least one UUID from parent-repository
  3. You can use svnadmin setuuid in order to change UUID of existing repository

here is a way to just checkout the meta-data in the .svn folder

Yes.

You can checkout new URL http://subversion/repo/project/trunk into new Working Copy with --depth 'empty' , get empty WC with .svn folder in it, copy|move all content of old WC (except .svn folder with old metadata) and sync WC with repository, using svn up --set-depth 'infinity' (overload old depth of checkout for future operations)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM