Using Mercury on Divergent Branches

What is a good workflow for using mercury with two long branches that diverge a little (i.e. I'm never going to merge them all together)?

In my case, it is a CMS software that has been configured differently for two different websites. I started with projectA, and as soon as it worked, cloned it on projectBand made further settings for A and B to configure them. Now I want to develop some functions that appear in both A and B, without merging site-specific settings. How?

hg push everything will push, so it won’t work. Transplantation seems to give me different hashes of changes that bother me.

It seems to me that repositories should be configured differently, but I'm not sure how.

+3
source share
4 answers

As Thilo comments, the common part would be best designed (and published in Aand B) as the third repo, announced as SubRepo .

So you respect the first two repos that are independent (one evolution on Adoes not always mean evolution on B), and you can develop a common part in subrepo C.

+3
source

The solution for Mercurial may be if you can put various areas in files that may be in .hgignore, but then they will not be versioned, so this may not be so good.

- 1 A B / . , if-then-else .

0

hg push, , . , .

0

, , , . projectA projectB ( ).

( ), , .

0

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


All Articles