如何将子仓库添加到Merurial中的现有存储库 [英] How do I add a subrepo to an existing repository in mercurial

查看:54
本文介绍了如何将子仓库添加到Merurial中的现有存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将现有存储库作为子存储库添加到另一个现有存储库的最佳/最简便方法是什么(甚至有可能)?

What is the best/easiest way (or is it even possible) to add an existing repository to another existing repository as a subrepo?

情况是我有一个现有的(主)项目,我想在其中包含一个图书馆项目,这样我就可以从该主要项目中编辑该图书馆项目,并在提交该主要项目时将更改提交给该图书馆项目.

Situation is I have an existing (main) project where I want to include a library project so that i can edit the library project from the main project, and commit the changes to the library project when comitting the main project.

还:我是否需要克隆/推/拉到原始库项目,还是在提交到主项目时自动完成?

Also: Do I need to clone/push/pull to the original library project, or is this done automatically when committing in the main project?

致谢
杰斯珀·豪格

Regards
Jesper Hauge

推荐答案

subrepo文档使我非常困惑,因此我编写了一个shell脚本来将其中的一部分抽象化.

The subrepo documentation confused me so much so I wrote a shell script to abstract that part of it away.

addsubrepo.sh

像这样称呼

$ cd $TOP_OF_HG_PROJECT
$ addsubrepo.sh $URL_TO_HG_PROJECT relative_path/you/want_to/put_the_subrepo

这篇关于如何将子仓库添加到Merurial中的现有存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆