Workflow to keep Mercurial subrepositories up to date when changes are made in clones?

元气小坏坏 提交于 2019-11-28 10:22:59

You can definitely push manually from your LibrariesSubrepo in Project1 to the Libraries repository on the server and then manually pull from Libraries into LibrariesSubrepo in a Project2 clone.

However, you can also link the subrepos on the server:

  1. The share extension lets you create two or more repositories that share a .hg folder. Do this on the server so that the three instances of the subrepo on the server share the .hg folders.

  2. Symlink the .hg folders -- more oldschol and it only works if you're on a server where you can create symlink (Unix servers or Windows Vista and later with the right priviledge).

  3. Keep just one subrepo on the server but expose it three times in the hgweb configuration. Like this:

    [paths]
    Project1                  = /repos/Project1
    Project1/LibrariesSubrepo = /repos/Libraries
    Project2                  = /repos/Project2
    Project2/LibrariesSubrepo = /repos/Libraries
    

In all cases, there are actually only three repositories on the server: Project1, Project2, and Libraries.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!