如何将我的自定义 CodePlex Mercurial 前叉与主干同步?
我已经创建了一些 codeplex 项目的分支。完成了一些额外的代码等,甚至将我的自定义代码提取到源代码控制存储库中。
自从我开始开发自己的叉子以来的几周和几个月里,他们的主干已经更新了。
如何将我的代码与主干的代码同步?
(我想要将我的代码与主干同步的主要原因是他们升级到了vs2010,而我仍在使用vs2008项目版本:( )。
I've made a fork of some codeplex project. Done some extra code, etc and have even pulled my custom code into the source control repo.
In those few weeks and months since i was working on my own fork, their main trunk has been updated.
how can i sync my code with that of the trunk?
(the main reason for me wanting to sync my code with the trunk is that they upgraded to vs2010 and i'm still using a vs2008 project version :( ).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚遇到了同样的问题并最终来到这里。虽然上面的评论给出了正确的答案,但对于想要为开源项目做出贡献的 Mercurial 新手来说,它们可能并不适用。
普通的
hg pull
只会将任何更改从您的分支拉到本地克隆存储库,在这种情况下没有帮助。有一个可选参数[SOURCE]
,允许您从后备箱拉取。以下是完成该工作所需的 Mercurial 命令行命令(根据您所需的 CodePlex 项目替换“someprojectname”,或者对于类似系统,将整个 URL 替换为您的分叉的主干 URL [与您的分叉的 URL]):
hg传入 https://hg01.codeplex.com/someprojectname
hg pull https:// hg01.codeplex.com/someprojectname
hg merge
hg commit -m "Some有关合并主干更改的消息。”
hg Push
I just ran into the same issue and ended up here. While the comments above lead to the correct answer, they may not cut it for a person new to Mercurial who wants to contribute to an open source project.
A plain
hg pull
would only pull any changes from your fork to your local cloned repository, not helpful in this case. There is an optional parameter[SOURCE]
that allows you to pull from the trunk instead.Here are the Mercurial command-line commands needed to do the job (replace "someprojectname" accordingly for your desired CodePlex project or, for similar systems, replace the entire URL with your fork's trunk's URL [vs. your fork's URL]):
hg incoming https://hg01.codeplex.com/someprojectname
hg pull https://hg01.codeplex.com/someprojectname
hg merge
hg commit -m "Some message about merging changes from trunk."
hg push