1

Let's say I have two repositories: "Library Repo" and "Project 1 Repo".

Library repo contains code that should be used by multiple projects and is version controlled appropriately. Project 1 repo is a single project that wishes to use some of the code in the library repo.

Project 1 Repo wishes to use the library repo code as external items. This allows a developer to only have to make changes to the Library 1 repo code instead of every repo that uses the library code.

However, it appears that SVN external items can only be configured if the external item source lives within the same repository. I would actually have to create a master repo where the library and projects are not their own repos, but simply directories as illustrated below:

SVN Repo
    - Library
    - Project 1
    - Project 2
    - Project 3

This works okay, but it forces me to keep every single project within the same repository. This can get heavy weight overtime and gives everyone access to the projects when in reality, they only need access to a single project.

My question: is there a method for external items to be added from a separate SVN repository?

When attempting to do this, SVN will give an error complaining that the external item lives in a separate repo and it isn't allowed. I'm curious if there is a work-around.

Izzo
  • 4,461
  • 13
  • 45
  • 82
  • 1
    I cannot reproduce here on TortoiseSVN 1.10.1, Build 28295 - 64 Bit. Can you please edit the question and provide further details? Specifically, what tool and step trigger the error? Do you get it when you edit the property? When you commit the changes? When you update the working copy? Is it a message received from server or generated by TortoiseSVN itself? – Álvaro González Sep 18 '18 at 16:15
  • @ÁlvaroGonzález I'm using TortoiseSVN 1.10.1, Build 28295 - 64 Bit. I've uploaded the TortoiseSVN error screen cap here - https://imgur.com/a/33HDMte Essentially it is complaining that the external item is not located in the same repository. After I added the external, I performed an "update", this usually adds the external item, however, this time it throws an error. – Izzo Sep 18 '18 at 17:25

1 Answers1

3

svn:externals can be used between different repositories, as long as it is not a file external. File externals are only allowed for the same repository. http://svnbook.red-bean.com/en/1.8/svn.advanced.externals.html

bahrep
  • 29,961
  • 12
  • 103
  • 150
royalTS
  • 603
  • 4
  • 22
  • 1
    What is the difference between an external and a file external? – Izzo Sep 19 '18 at 16:47
  • 1
    @izzo "external" points to a "directory" (i.e. directory path node in the repository), "file external" points to a "file" (i.e. repository path of a file). Read http://svnbook.red-bean.com/en/1.8/svn.advanced.externals.html – bahrep Sep 20 '18 at 12:22