Question

What we have for now:

    (1) we have a single product with few components developed in separate Mercurial repositories (components are Desktop Client, Mobile Client, Server, etc).
    (2) we use a revision number in version, like 1.0.0.REV

What we want to have:

    (3) have a shared libraries between components (without commiting from one repository to another)
    (4) have a common REV number in version for all components

Question: is it possible to have (4), (5) without merging all repositories into one?

Was it helpful?

Solution

This looks like it can be solved using sub-repositories.

I suggest to setup all your different repositories as sub-repositories of a main repo, which could include your shared libraries (as a sub-repository or directly in the main repo) and the revision file containing your current revision number. Your current repos can remain intact with this method.

Main repo
|-.hg
|
|-Shared libraries
|
|-Desktop Client
|--.hg
|
|-Server
|--.hg
|
...
|
|-.hgsubstate
|-revision.xml
|

At every change in the default branch of any sub-repo, you will have to also commit a change in the main repo to point to the new head of its sub-repo.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top