Hello,
Problem: One hg repository has a file I want to update & maintain in another hg repository, and I do not want to copy & paste. I do want to have the file available in both repos.
Scenario:
Working on Product 0001
Project A has an hg repository.
Down the road, a Project B is spun up. There is largely no coupling between Project A and B, but there are some files that could be shared.
Version controlling files in a managed approach is critical: copy & pasting is not a viable solution.
There are some solutions that may work -
- Merging both repos into a product repo. But, this means the version numbers for a set of files will be changing due to churn elsewhere. Plus, the different projects aren't terribly related.
- Convert both into a subrepo. I am not sure this is the right approach, subrepos seem to have some funky behavior relating with the parent repo. (Or they used to?)
Extending this issue is the concept of sharing certain files between Products. Somehow, a file needs to be shared and correctly tracked as being a singular file, but in two different Products.
The general problem might be stated as this -
Given a set of products, each with their own repository, under development which share and develop upon files living in each other's repositories (think utility routines and frameworks), what is the hg solution to maintaining file-version consistently between products.
What is a good solution here?