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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:12:14+00:00 2026-06-06T08:12:14+00:00

Is it possible to create a subrepository using a sibling path? Subversion is our

  • 0

Is it possible to create a subrepository using a sibling path?

Subversion is our “chosen” VCS here, but I’ve already had quite a few issues with out of date commits. It’s much more convenient for me to dual version my files under Hg and SVN, and I have had great success with it. However, I’ve got a few other co-workers using Hg, and we’ve had no problems there except for one they probably haven’t noticed.

Our SVN layout looks like this

Area/
    trunk/
        Program1/
        Program2/
        ...
        Services/
            Program1ServiceA/
            Program1ServiceB/                

    branches/
        Program/
        Program/
        ...
        Services/
            Program1ServiceA/
            Program1ServiceB/                

    tags/
        Program1/
        Program2/
        ...
        Services/
            Program1ServiceA/
            Program1ServiceB/                

Which makes it kind of stupid when you’re working on a project, because if your main project is comprised of Program1 and Program2, and a few more services… I can’t get all of the changesets in one go, because we’ve got a repository that matches the directories. So I have to make sure 4 or 5 repos are in sync, especially with some service references.

I’ve had some good luck using subrepos beneath a single directory:

MainRepo/
    Subrepo1/
    Subrepo2/

But what I would like to do is specify a relative path so I can use sibling directories to the subrepository, so I could have something like this:

Area/
    Project1/
        Program1/ (points to ../trunk/Program1)
        Program2/ (points to ../trunk/Program2)
        Service1/ (... You get the idea)
        Service2/

    trunk/
        Program1/
        Program2/
        Services/
            Service1/
            Service2/

But so far it hasn’t worked like I expected it to. trunk/Program1 is an Hg repo, and my Project1/.hgsub file contains

Program1 = ../trunk/Program1

I’ve also tried ../../trunk/Program1

But the result of either of those is that a new directory is created: Area/Program1/Project1 that is empty.

So far, the only search results I’ve been able to find use http based repositories for subrepos, so I’m not sure where to go from here. Our dev env is Windows 7, so the “easy” answer is to create junctions, but my primary concern is to make things like this easy to do, so the barrier to entry is as low as possible, and even something as easy as mklink /J Program1 ..\trunk\Program1 from an administrator cmd window is one more thing that would prevent people from migrating to a better workflow.

Is it possible to add a subrepository like I want, or is there a better way to do what we’re doing?

  • 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-06-06T08:12:15+00:00Added an answer on June 6, 2026 at 8:12 am

    Subrepositories are always inside another repository. In other words, subrepositories lets you version a collection of repositories where some repositories are nested inside other repositories. Subrepositories can thus not be siblings without creating an outer repository.

    The relative paths you’re talking about are used when Mercurial needs to figure out where to get a new subrepository from. That is, when you run hg update (or when it’s run for you as part of hg clone) and Mercurial notices a .hgsub file, then it needs to create the subrepositories mentioned there. To create the subrepo, Mercurial uses the path on right-hand side:

    sub-A = relative/path
    sub-B = C:/absolute/path
    

    Here sub-A will be checked out in the root of your working copy using the command

    hg clone <default path for main repo>/relative/path sub-A
    

    and sub-B is checked out using the command

    hg clone C:/absolute/path sub-B
    

    That’s all — it’s a very simple mechanism. I’ve tried to describe this in my subrepository guide and it’s also explained in the wiki.

    For your case, you can make a thin shell repository for the parts that belong together. This repo will be like Project1 above and have Program1, Program2, Service1, etc as subrepos. The .hgsub will look like this:

    Program1 = Program1
    Program2 = Program2
    Service1 = Service1
    Service2 = Service2
    

    By using “trivial subrepo paths” you make things easy: a clone looks just like the clone source and everything is kept together.

    A final note: unless you use Program1 or Service1 in other projects, then you should just put everything into a single repository.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Create an Array of the Last 30 Days Using PHP I am
Is it possible to create another user page somehow? I already have a user
Possible Duplicate: Create instance of “Class” Using “Reflection” in JavaScript Java has Class.forName(XYZClass) to
Is it possible to create a single dll using 2 projects in MS VS
Possible Duplicate: Short way to create arrays? I can create an ArrayList, but, is
Is possible create (register) a new class in runtime using delphi. I have a
Is it possible to create federated Subversion servers? As in one server at location
Is it possible create a IPhone application by using java and LWUIT framework?
Is possible to create category in the drop down menu using jquery? so it
Is it possible to create an inline lambda using boost which always throws an

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.