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 3794692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:58:07+00:00 2026-05-19T12:58:07+00:00

I have a master project that’s using a fairly standard source tree approach +

  • 0

I have a master project that’s using a fairly standard source tree approach + mercurial subrepositories.

Master
\lib - compiled binaries - things like log4net, AutoFac, etc
\source - VS solution, one folder per project, etc
\tools - stuff used during the build process

\source\contrib - contains any subrepos like so:

\source\contrib\Sub1
\source\contrib\Sub2

Master\.hgsub contains something like
source\contrib\Sub1 = https://myserver.com/Sub1

Now, it was recently determined that Sub2 needs some code from Sub1, and hence I have to adjust for this new dependency structure.

The problem of course is that if I follow the same approach as above and add Sub1 as a subrepos of Sub2, I end up with this ugly situation.

\source\contrib\Sub2\source\contrib\Sub1

Master now has 2 independent copies of Sub1!

So I know that I should be using relative paths when referencing subrepos (the RHS of the =) — but that won’t help out my scenario here as I understand it. I don’t think there’s any way to make the LHS live outside of the Master repository, which I think is what I really need here.

I have a couple of ideas on how to fix this, but none sits right with me, and I assume there has to be a better way. My ideal solution allows me to share the same sub-repo amongst multiple projects w/out paying the penalty of having multiple copies around. That just seems wasteful and inefficient in my scenario here (plus, I’d like to have all projects that have a dependency on Sub1 to use the same hg revision, rather than being revisioned independently)

  1. Remove Sub1 as a subrepos of Master, and change any relative paths in the Master solution to reference the doubly nested Sub1. Not only is this path structure hideous, but if add a Sub3 to master that has a dependency on Sub1, I still have 2 copies of Sub1.

  2. Compile a copy of Sub1 and just chuck it in the \lib directory. Sub1 is still undergoing some churn, and I’d rather build against the source versions. I don’t want to pay the tax of constantly copying in new binaries to the source tree all the time (and bloating the tree).

  3. Somehow break the dependency of Sub2 on Sub1. Based on the architecture of the repositories, this is probably not going to happen. Sub1 contains some very general purpose shared library code. Sub2 contains WCF service contract / interface / types that is needed in two very separate projects — a client SDK and server implementation. At this point in time, it makes sense to keep these repositories separate.

Maybe I’m thinking about this wrong… or maybe I’m unaware of some hg trick.

Any help is appreciated.

  • 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. Editorial Team
    Editorial Team
    2026-05-19T12:58:08+00:00Added an answer on May 19, 2026 at 12:58 pm

    I’d say, forget about checking in binaries, that just leads to repository bloat. IMO, any output from a build should not be stored in the source repository.

    How about teaching Sub2 to expect to find Sub1 at ../Sub1? Then, if you find you need to work on Sub2 independently of Sub1, create a “Sub2_standalone” repo, that pull in Sub1 and Sub2 as sub-repos.

    So, when working on everything, you’d get:

    Master/
    Master/source/contrib/Sub1  
    Master/source/contrib/Sub2
    

    But when just working on Sub2:

    Sub2_standalone/
    Sub2_standalone/Sub2
    Sub2_standalone/Sub1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project where a .master page was created without a code behind
I have a master page that contains an ASP.NET server side Menu control (System.Web.UI.WebControls.Menu)
I have a master-detail scenario where I have 1 ComboBox listing companies from an
I have a master page, with a help link in the top menu. This
I have a master page which all my views inherit from. The issue I
Hi I have a master and cloned TClientData set CdsCloned.CloneCursor(CdsMaster,true); CdsMaster has two Fields
I've got a situation where I want to have a master list at the
OK, Here is my problem, I have a master page with a HEAD section
Do you localize your javascript to the page, or have a master application.js or
I have some ASP.NET Master Pages located in one assembly. I need to use

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.