hg pull 到底有什么作用?

发布于 2024-08-23 23:20:37 字数 1093 浏览 4 评论 0原文

我正在使用水银。 hg pull 到底有什么作用?使用它后我的工作流程中还需要执行哪些其他步骤?

主要克隆被称为“农场”。我克隆了它,称为“myfarm”,我一直在本地开发它。现在我想将更改从我的克隆推送到托管在 googlecode 的真实克隆。

因此,在我自己的克隆“myfarm”的上下文中,我运行 [hg传入农场]。这似乎列出了自从我克隆“farm”以来对它所做的所有更改。列出了一堆东西,例如:

changeset:   545:edfe4dadf
parent:      549:ea8e55929bcF
parent:      592:dfdf05dbcfA3
user:        Some user
date:        Some date
summary:     Some comments

好的,然后我运行了 [hg pull farm]。我在命令提示符处留下以下内容:

pulling from https://blah.googlecode.com/hg
searching for changes
adding changesets
adding manifests
adding file changes
added 6 changesets with 3 changes to 2 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)

问题:

  • 所有内容都已经为我合并了吗,还是我现在需要运行 hg merge farm

  • 我如何知道是否存在冲突?如果是这样,我也不确定是否必须运行:

hg merge farm
hg merge

我的意思是,我想合并拉取的结果,但不确定以上两者中哪一个合适。


我习惯使用 svn,所以在这种情况下,我会这样做:

svn update (notified of merge changes)
svn ci

谢谢

I'm using Mercurial. What exactly does hg pull do and what other steps need to be in my workflow after I use it?

The main clone is called "farm". I made a clone of it called "myfarm" which I've been developing locally. Now I want to push the changes from my clone to the real clone hosted at googlecode.

So in the context of my own clone "myfarm", I run [hg incoming farm]. This seems to list all the changes that have been made to "farm" since I made my clone of it. Lists a bunch of stuff like:

changeset:   545:edfe4dadf
parent:      549:ea8e55929bcF
parent:      592:dfdf05dbcfA3
user:        Some user
date:        Some date
summary:     Some comments

ok so then I ran [hg pull farm]. I'm left with the following at the command prompt:

pulling from https://blah.googlecode.com/hg
searching for changes
adding changesets
adding manifests
adding file changes
added 6 changesets with 3 changes to 2 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)

Questions:

  • Is everything merged for me already, or do I need to run hg merge farm now?

  • How will I know if there are conflicts? If so, I'm also not sure if I have to run:

.

hg merge farm
hg merge

I mean, I want to merge the results of the pull, but am not sure which of the above two is appropriate.


I'm used to using svn, so in this case, I would have just done:

svn update (notified of merge changes)
svn ci

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ま柒月 2024-08-30 23:20:37

在您描述的情况下,您将运行 hg mergepull 只是一个同步步骤,它不会修改本地工作文件夹,不会添加任何合并或任何其他实际工作。

Joel Spolsky 最近在 http://hginit.com 上发布了一篇有关使用 Subversion 进行版本控制的优秀教程。如果您仍然不太了解这些概念,我建议您仔细阅读本文。我建议按顺序阅读本教程(而不是跳到“合并”页面),因为他使用的示例是相互构建的,如果您阅读了前面的部分,将会更容易理解。

In the case you've described, you would run hg merge. pull is just a synchronization step, it doesn't modify the local working folders not add any merges or so any other real work.

Joel Spolsky has recently published a good tutorial on version control with Subversion at http://hginit.com. I would suggest having a read through this if you're still not quite up to speed with the concepts. I would recommend reading through the tutorial sequentially (rather than skipping to the "Merge" page) because the examples he uses build upon one another and will be easier to follow if you've read the previous sections.

始终不够 2024-08-30 23:20:37

Hg 有一个 svnbook 也是
第 3 章清楚地解释了您的问题。

hg merge 确实是我会做的。

Hg has an svnbook too.
Chapter 3 clearly explains your problem.

hg merge is indeed what I would do.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文