Working with subrepos in Mercurial

I have a large system with many components that I want to distribute across several different mercury repositories (so people working on parts of the system do not need to check the entire system). It should work on both UNIX and Windows.

Inside the system, I have one directory that needs to be used in many places (contains common things like CSS files and images).

I set it up so that each component has a sub reporter for a common repo, and this repo is also checked at a higher level. I did this because I want programmers to be able to execute "hg pull" from the main repository, but not "hg push" (any changes are pushed "hg serve" from their work and are checked first before going back to the main repository).

So, at the top level, the programmer can check:

Basic Style ComponentSetA ComponentSetB et al.

All this applies to http: // machine / hg / RepoName (via clone).

And I have subrepos at:

ComponentSetA / web / style (with style = .. / .. / Style on the network /.hgsub) ComponentSetB / web / style, etc.

My problem is that on "hg clone" I cannot get subrepos to automatically create itself. I would like them to be transparent. If any of the programmers makes no changes, they should not notice that they are there ...

This is fine if I need to check the repo style first and then make one of the components, but I need an additional level of indirection for the top-level repo to allow programmers to push their changes at a lower level into the general repo.

Any suggestions?

+4
source share
1 answer

Correct me if I am wrong, but it looks like you have the .hgsub file in the web subdirectory, and not in the repo root. If you want web/style be a sub-support, you add it to your .hgsub root as follows:

 web/style = ../../Style 
+2
source

Source: https://habr.com/ru/post/1346614/


All Articles