在mercurial子数据库中使用特定的(git)分支



我有一个mercurial项目,我想在其中使用jQuery File Upload。我在我的.hgsub文件中添加了以下内容,以便为该插件创建一个子博客:

public/assets/common/js/filedrop = [git]git://github.com/blueimp/jQuery-File-Upload.git

我遇到的问题是,我需要在我的项目中使用这个git repo的jquery-ui分支。

有没有任何方法可以指定git repo的分支名称作为hg subrepo?

自己发现的。

事实上,你不需要做任何特别的事情。在编辑.hgsub以添加子Po并克隆它之后,您所要做的就是将目录更改为该存储库,签出所需的分支或rev,然后使用mercurial进行提交。

在我的案例中,整个过程是(在终端中):

$ echo "public/assets/common/js/jQuery-File-Upload = [git]git://github.com/blueimp/jQuery-File-Upload.git" >> .hgsub
$ cd public/assets/common/js/
$ git clone git://github.com/blueimp/jQuery-File-Upload.git
$ cd jQuery-File-Upload
$ git checkout jquery-ui
$ hg commit -m"ADDED: jQuery-File-Upload subrepo (jquery branch)"

最新更新