简体   繁体   中英

Using SVN for shared codebase with custom content

I have a website that I need to deploy to about 30 customers. They are all the same apart from the branding. Using SVN, I would like to have one base version of the product, and then just the different branded content (images, CSS) for each customer. That way, when I maintain the base product, I don't have to replicate that change for each customer. Deployment would just be a case of updating and releasing.

Sounds simple, but I am having problems achieving this in SVN. I have been looking into SVN externals using a structure as follows:

  • Main
    • Base
      • .
      • .
      • Images
  • Customer 1

    • Base
    • Custom
      • Images
  • Customer 2

    • Base
    • Custom
      • Images

and then using externals pointing the Customer Base folders to the main base folder. That works, but I then need to overwrite (for example) the images in the Customer 1\\Base\\Images folder with the customer specific ones, and when I set up the externals for that it complains “Customer 1\\Base\\Images is not a working copy root”. It does appear to have overwritten the image with the customer one though.

Maybe externals are not the answer.

In your case, the interface is clearly separeted from the functionality. A possibility is the following (if I well understood your problem) :

Manage your application in a dedicated SVN repository (as usual, with your trunk, branches and tags). And manage your design versions in another repository, with for example the following structure :

./Customer_1
./Customer_1/trunk
./Customer_1/tags
./Customer_1/branches
./Customer_2
./Customer_2/trunk
./Customer_2/tags
./Customer_2/branches
...

With this separation, it's easy to you to manage the version number of your main application. And you have a "small" repository for each customer with possibility to easily copy a design version to start another one by svn copy .

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