【问题标题】:Using a specific (git) branch in a mercurial subrepository在 mercurial 子存储库中使用特定 (git) 分支
【发布时间】:2013-01-30 00:16:08
【问题描述】:
我有一个 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 拉取?
【问题讨论】:
标签:
git
mercurial
branch
subrepos
mercurial-subrepos
【解决方案1】:
我自己发现的。
事实上,你不需要做任何特别的事情。在编辑 .hgsub 以添加子存储库并克隆它之后,您所要做的就是将目录更改为该存储库,签出所需的分支或 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)"