Nested Repositories

brian.lachniet's Avatar

brian.lachniet

30 Oct, 2014 05:18 PM

For better or for worse, our we have nested repositories in our Mercurial project. For example, our repository structure looks like this:

CoolApp\
    .hg\
    UsefulLib\
        .hg\
        USEFUL.md
    .hgsub
    README.md

.hgsub looks something like this:

UsefulLib = UsefulLib

I successfully added CoolApp as a repository in HgLab. However, when I tried to clone the repository, I received an error stating that http://HgLab:8080/hg/AwesomeProject/CoolApp/UsefulLib is not a valid hg repository. I assume that HgLab is not looking below the top level directory for repositories. Is there any way for me to make this work, or is there no intention for HgLab to support this?

Thanks,
Brian

  1. Support Staff 1 Posted by Anton Gogolev on 13 Nov, 2014 08:18 AM

    Anton Gogolev's Avatar

    Brian,

    Apologies for the delay. HgLab does not currently support nested repositories with "trivial paths", as per Mercurial docs.

    One workaround will be to slightly tweak the '.hgsub' file like this:

    UsefulLib = UsefulLib
    
    [subpaths]
    http://HgLab:8080/hg/AwesomeProject/CoolApp/UsefulLib = <ABSOLUTE_PATH_TO_USEFULLIB_REPOSITORY>
    

    where ABSOLUTE_PATH_TO_USEFULLIB_REPOSITORY is the path where Mercurial can clone the UsefulLib from (e.g. http://HgLab:8080/hg/AwesomeProject/UsefulLib). See this for more information.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Jan, 2025 05:02 PM
13 Jan, 2025 10:42 AM
29 Nov, 2024 10:00 AM
12 Jan, 2023 12:25 PM
10 Jan, 2023 04:49 PM