2
votes

I'm not sure if this is possible, and if it's not any alternative solutions would be welcomed!

I have a number of solutions using Orchard - which mandates that any modules be in a certain directory inside it's folder structure. I have some modules, and based on the power of DVCS I'd like to be able to reproduce a new project using just suprepos. And also update Orchard with just Mercurial.

My folder structure looks like:

Project
    - Orchard
        - Modules
            - Orchard module 1
            - Orchard module 2
    - My other code

I've just copied the orchard files to my repo, and then added my modules as subrepos.

What I'd like to be able to do is to also have the rest of the Orchard structure a subrepo. But I can't find a way to have a suprepo inside another subrepo. It won't be a nested subrepo, as the 'base' repo will be mine in both cases (orchard and the modules).

ie Project/.hgsub would look like:

Orchard = http://path/to/orchard
Orchard/Modules/Module1 = http://path/to/module1
Orchard/Modules/Module2 = http://path/to/module2

But this doesn't seem to work and I can't find documentation to say if/how I can do it.

Any help appreciated!

Edit: In case it wasn't clear I don't have write access to the Orchard repo, and I can't move the modules.

1
I actually answered a very similar question before: stackoverflow.com/a/11324635/705048hcarver
I think I know what you are saying. Are there any other solutions?Carl
No, no other solution. Your top-most folder can't place sub-repos within other of its sub-repos. Your only options are to rearrange the folder layout, have Orchard not be a sub-repo or make Module1 and Module2 be sub-repos of Orchard (but not of Project).hcarver
All well... pity that, as I can't do either easily. Will look at some build shenanigans to see if I can move the modules and then copy them to their location on successful build.Carl

1 Answers

0
votes

Just tested this scenario.

Here is what you need to do.

Add a folder to Orchard repository with 'modules' as folder (place atleast one file inside that). Do a commit with .hgsub (subrepos), now the subrepos should be added, do a pull on the subrepos and update their references in .hgsubstate.

Please share if you have any questions.