Search code examples
svntortoisesvnvisualsvn-server

How I can share parts of my source code for use inside of other projects? (like a library)


I'm starting to use VisualSVN Server ( http://www.visualsvn.com/downloads )

I have a project in a directory like this:

MyAPP_PHP
    - directory General 1 tool for conection db
    - directory General 2 tool for manage strings
    - directory General 3 ... etc.
    - directoryCLASS for this app
    - index.php
    - [other files]

I'm using subversion with tortoise for store a copy of all code inside of repositorie. And also I want to have 3 different repositories within this project. But using tortoise I can not specify a different path to these directories. I'm not allowed to define new repositories. How I can do this?

For your time thanks...


Solution

    1. Read about SVN-externals in SVN Book and understand topic
      • In your current tree you'll have to covert into 3 separate externals three dirs (Class General 1, Class General 2,Class General 3), which you'll add into all subsequent projects
      • In you'll refactor tree and collect Class General** under common directory (smth. like /Core/Class General**) you can to have and add only one externals
    2. You can checkout and inspect this Externals Proving Ground Repository (maybe just trunk will be OK) in order to see, how linking of one directory in repository to real directory in another repository was implemented (/trunk/lib in subversion-troubleshoot-b repo is really /trunk/lib in subversion-troubleshoot repository)

    Escribe en español, será más comprensible (para los lectores) que su Inglés