Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 60433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:09:40+00:00 2026-05-10T18:09:40+00:00

I’m responsible for several (rather small) programs, which share a lot of code via

  • 0

I’m responsible for several (rather small) programs, which share a lot of code via different libraries. I’m wondering what the best repository layout is to develop the different prorgrams (and libraries), and keep the libraries in sync across all the programs.

For the sake of argument let’s say there are two programs with two libraries:

  • Program1
    • Library1
    • Library2
  • Program2
    • Library1
    • Library2

Naturally, bug fixes and enhancements for the libraries should (eventually) merge to all programs. Since the libraries are being worked on while working on the different programs, using externals definitions seems out of the question.

So I thought to treat my libraries at all but one place as vendor branches but I’m not sure what the best layout for this would be.

I was thinking something along the lines of:

  • Libraries
    • Library1 (ancestor)
    • Library2 (ancestor)
  • Program1
    • Program1 code
    • Library1 (vendor branch)
    • Library2 (vendor branch)
  • …

Then say when developing Program1 some changes are made for Library2, I merge them back to the Libraries part of the repository, and merge them from there to all other programs when desired.

Merging to the other programs can’t always happen immediately, the people working on Program2 could be close to a release and rather finish that first, create a tag, and only then update all libraries.

I’m a bit concerned this will result in many merges and a bit of a maintenance headache after a while but I don’t really see a much better solution.

Then again, this seems a rather common use case to me, so I thought I’d just ask the stackoverflow community, what’s the best repository layout to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:09:41+00:00Added an answer on May 10, 2026 at 6:09 pm

    Well, I guess I disagree that externals are out of the question. I’ve had a similar problem in the past. I solved it using the svn property externals.

    Create your library repositories:

    svnadmin create /path/library1 svnadmin create /path/library2 ... 

    Create client repositories:

    svnadmin create /path/program1 svnadmin create /path/program2 ... 

    Now declare the libraries as external within the program repositories:

    cd /path/program1 svn propset svn:externals 'library1 svnpath://wherever/library1/trunk/' . svn propset svn:externals 'library2 svnpath://wherever2/library2/trunk/' . 

    Now then you can make changes to programs 1 & 2 and making commits at the root of those projects doesn’t affect the libraries… but, if you needed to make changes to the libraries you can. Then if and only if you have write permissions to the library repositories you could commit those changes too – but only from the library’s subdirectory.

    I.e. this doesn’t make a commit to the libraries…

    ... make a change in /path/program1/library1 ...  cd /path/program1 svn commit -m 'some change' 

    This commits the change made in the library above:

    cd /path/program1/library1 svn commit -m 'change to library code' 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Related Questions

Loading...

Sidebar

Ask A Question

Stats

  • Questions 54k
  • Answers 54k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I think i have to create a file system filter… May 11, 2026 at 7:28 am
  • added an answer You have a misunderstanding of how asp.net works. Your server… May 11, 2026 at 7:28 am
  • added an answer The following is probably not the neatest way, but it… May 11, 2026 at 7:28 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.