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

  • SEARCH
  • Home
  • 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 3610602
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:46:21+00:00 2026-05-18T21:46:21+00:00

I have a project that I am developing built off CodeIgniter. The main part

  • 0

I have a project that I am developing built off CodeIgniter. The main part of the project is a private system I am creating, but I want to add it to source control, to gain all the associated goodies. Now I’m using Mercurial, so I did the whole hg init bit, so I’ve got the repository set up.

Now, one of the things I’ve done is to make a library for CodeIgniter, which I use in this project. Now I want to make this library open, so I need a separate repo for that.

For anyone unfamiliar with CodeIgniter library development, here’s a reference:

application
  /config <- configuration files
  /libraries <- library logic in here

Now I will probably develop a few more libraries in the course of this project, so I can’t just dump a repo in the application folder without clumping them all together.

What I did was this:

dev/ci/library <- library here
dev/project <- project here

Now in both of those folders, I have made a repository. What I want to do is make the project repository automatically reference the library repository, so I can have a private and a public repository, as I explained earlier.

The main way to do this, I have read, is to use subrepositories, but I can only find examples on nested ones (which are unclear anyway, I find). How do I make it reference another repository like svn:externals?

  • 1 1 Answer
  • 2 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-18T21:46:22+00:00Added an answer on May 18, 2026 at 9:46 pm

    You are correct, subrepos in Mercurial (or submodules in Git) are based on a nested organization.
    But in your specific case you need:

    • two separate repos,
    • not nested

    A way to reconcile both organizations (yours and the nested “subrepo”) would be to have three repos

    • a parent repo (private one, as in can be pushed to a private repo)
    • the project (private one, as in can be pushed to a private repo)
    • the library (public one, as in can be pushed to a public repo)

    That would give the following:

    /dev
      .hg (private repo)
      .hgsubs (declare the two nested repos 'project' and 'ci/library')
      project
        .hg (private repo for your project)
        config
        .hgignore (for ignoring anyhting from libraries)
        libraries (private directory, not version)
          (symlink to /dev/ci/library)
      ci
        library
          .hg (public repo 
    

    That way, you keep:

    • your two repo separate as you want
    • a link between the two in order to be able to get back those two repo at the exact reference you left them (i.e. you last pushed each of those repos).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that compiles and runs on my system but when I
I'm developing an application with node.js and socket.io. I have built a small-scale project
I have a Java project that I've been developing primarily in windows. I have
I have a Sitecore/ASP.NET projects that I'm developing. Today at some point I inadvertently
I have a project that may be started on local machine with ./manage.py runserver
I have a project that I have divided quite aggressively into different layers. I
I have a project that using some third-party libraries. My questions is how to
I have a project that is displaying 16px text font at 0.5ems links on
I have a project that's been changed and modified in bits and pieces over
I have a project that I've added to my Jenkins server. The project includes

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.