0

I currently have a problem I was not able to find a answer to, as it seems a little special.

My problem:

We have two repositories here. Repository A is holding common stuff and Repository B is one specific project.

In Repository A we have a template project, which itself includes externals from within Repository A. Now we would like to copy this template project to Repository B to start the specific project based on the template. But we would like to keep the externals of the template referenced to the sources in Repository A. They were set with relative paths (^/../, since both repositories share the same base URL), so it should be working.

When creating the template we thought of simply creating a branch of it and starting the development on this working example. But as it turned out, creating a branch is no option when crossing repository borders.

What I tried

(I am using Tortoise SVN)

  1. svn copy from Repository A to Repository B to create something like a branch. This unfortunatly does not work, since svn copy cannot be used across different repositories.

  2. Export the template from Repository A and include it to Repository B. This way I get the current version of the externals, but it is not a svn property any more. The exported version has no svn information anymore, so how should it have worked anyway?

  3. Vendorbranch: This lead to a similar result as the export version. The external property is gone.

My Question

How can I get the Template from Repository A to Repository B but keep the externals as property, without resetting them by hand?

Or even one step back: Do you see another solution of creating a working software project template, which can be used later in other repositories?

Gunter
  • 321
  • 4
  • 13

1 Answers1

0

Relative path in externals for cross-repo transfer is Bad Idea (tm). Replace it with absolute path at step 0

With "good" (portable) externals I see two ways

  1. svnrdump dump URL/TO/TPL/ROOT + svnrdump load /URL/TO/B-PROJECT/ROOT
  2. Have identical UUID for A and B, checkout URL/TO/TPL/ROOT, relocate to /URL/TO/B-PROJECT/ROOT, commit
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • Thanks for your answer. Could you explain, why the relative paths are a bad idea? I mean it is officially mentioned in the svn book and it avoids problems, when the base URL changes. The svnrdump I can give a try. Would I need admin rights for the repository to do this? – Gunter Aug 17 '15 at 06:03
  • @Gunter - I *suppose*, with externals you added some "shared content", which you want to see and use centralized (probably in A's URL) for any child projects in all repositories (which or share common server or not). Repo-relative externals will not allow you to have such centralization – Lazy Badger Aug 18 '15 at 03:07
  • You are right, repository A holds centralized "shared content". All the repositories for child projects are located on the same server and will be there for the next future. So for the current situation it seems to be working. For me it solves the problem, when all repositories move to another location. Which seems more likely to me, than separating the repositories to different servers. When the repositories are moved to different URLs, of course we will have to switch to absolute URLs for the externals. – Gunter Aug 18 '15 at 07:43