How do people manage changes to common library files stored across mutiple (Mercurial) repositories?

后端 未结 3 2078
孤城傲影
孤城傲影 2021-01-03 09:04

This is perhaps not a question unique to Mercurial, but that\'s the SCM that I\'ve been using most lately.

I work on multiple projects and tend to copy source code f

3条回答
  •  难免孤独
    2021-01-03 09:42

    Three solutions, pick your favorite:

    1. Put all projects into one repository.
    2. Make a separate repository for shared code and different repository for each project.
    3. One repository with Subrepositories: https://www.mercurial-scm.org/wiki/subrepos, keep all common code in one subrepo and different subrepos for each project.

    Copying actual files between repositories with no common ancestors will never be optimal as history is not preserved.

提交回复
热议问题