如何使用Mercurial将上游变更引入到fork中?
我已经创建了Mercurial存储库,现在我想将更改从主存储库拉到我的存储库中。如果这是git,我会做一些像如何使用Mercurial将上游变更引入到fork中?,mercurial,Mercurial,我已经创建了Mercurial存储库,现在我想将更改从主存储库拉到我的存储库中。如果这是git,我会做一些像 git remote add upstream <url> git pull upstream master git远程添加上游 git向上拉主控器 在Mercurial中如何执行此类操作?您是否尝试过pull命令 hg pull http://master.com/master 如果不起作用,请详细说明。如果您从要从中提取更改的存储库克隆了存储库,您只需执行以下操作:
git remote add upstream <url>
git pull upstream master
git远程添加上游
git向上拉主控器
在Mercurial中如何执行此类操作?您是否尝试过pull命令
hg pull http://master.com/master
如果不起作用,请详细说明。如果您从要从中提取更改的存储库克隆了存储库,您只需执行以下操作:
hg pull
如果从其他存储库克隆了存储库,则可以:
hg pull <location of repository to pull from>
无论如何,这是最基本的。更多详细信息请参见您也可以在回购协议中修改hgrc文件
default = ssh://hg@bitbucket.org/<my_user>/<my_repo>
upstream = ssh://hg@bitbucket.org/<other_user>/<other_repo>
您还可以在repo中修改hgrc文件,以使用特殊路径名default和default push
default-push = ssh://hg@bitbucket.org/<my_user>/<my_repo>
default = ssh://hg@bitbucket.org/<other_user>/<other_repo>
并使用
如果其他用户对
进行更改,这不会中断吗?这只适用于单独用户回购,对吗?
hg pull upstream
default-push = ssh://hg@bitbucket.org/<my_user>/<my_repo>
default = ssh://hg@bitbucket.org/<other_user>/<other_repo>
hg pull
hg push