了解 Mercurial 分支
我正在学习 Mercurial,我去提交了一些更改,我收到了“创建新头”的消息——尽管我可以发誓在做新工作之前我做了一个 hg pull 和一个 hg update。
然后我感到困惑,所以我进行了合并,试图摆脱困境。我正在处理的单个文件很好(当我尝试学习 HG 时,我再次只使用一个文件)。我无法发布我的图像(没有足够的点),但我尝试在下面重新创建它。
当我创建标签 seo_v_1.0 时,我是否自动创建了一个分支?在其他 hg 存储库中,我只需创建一个标签,推送更改并继续。
有人可以帮我破译我在这里做了什么吗?在合并之前我对存储库所做的唯一更改是我提交了“最多 33 个”变更集。那么,根据下面的分支图,也许我已经在分支中但不知道了? 创建标签 seo_v_1.0 是否无意中创建了一个分支?
提前致谢。
请注意,该行从“seo_v_1.0”开始到“已添加标签..”,该行在“最多 33”处返回到“默认提示合并事物”
- 默认提示合并事物[这是黄色的][并且默认为绿色]
- 最多 33
- 为变更集 xxxx 添加了标签 seo_v_1.1
- seo_v1.1 清除了颜色 [这是黄色的]
- 为变更集 xxxx 添加了标记 seo_v_1.0
- seo_v_1.0-已完成 [这是黄色]
- seo 通过第 2 节
- seo交叉引用完成
- 初始提交
编辑:添加了 glog 输出
@ changeset: 9:8637aa6d738f
|\ tag: tip
| | parent: 8:
| | parent: 7:
| |
| | summary: merge thing
| |
| o changeset: 8:
| | parent: 4:
| |
| | summary: up to 33
| |
o | changeset: 7:
| |
| | summary: Added tag seo_v_1.1 for changeset de5f8c81840f
| |
o | changeset: 6:
| | tag: seo_v_1.1
| |
| |
| | summary: cleared left col colors
| |
o | changeset: 5:
|/
|
| summary: Added tag seo_v_1.0 for changeset c13bd5d3cc09
| o changeset: 4:
| tag: seo_v_1.0
|
| summary: -completed cross-reference
I'm learning mercurial and I went to commit some changes and I got the message along the lines of "new head created" -- though I could have sworn that I did an hg pull and an hg update prior to doing new work.
I then got confused so I did a merge to try to get out of the mess. The single file I'm working on is fine (again I'm using only one file as I try to learn HG). I can't post my image (not enough points) but I tried to recreate it below.
When I created the tag seo_v_1.0 did I automatically create a branch? In other hg repos I simply create a tag, push the changes and keep going.
Can someone help me decipher what I did here? The only change I made on the repo before the merge thing was that I committed the "up to 33" changset. So maybe -- according to my branch diagram here below -- I was already in the branch but didn't know it?
Did the creation of tag seo_v_1.0 inadvertently create a branch?
Thanks in advance.
Note that the line out starts from "seo_v_1.0" to "added tag.." and the line comes back in at "up to 33" to "default tip merge thing"
- default tip merge thing [this is in yellow] [and default is in green]
- up to 33
- added tag seo_v_1.1 for changeset xxxx
- seo_v1.1 cleared colors [this is in yellow]
- added tag seo_v_1.0 for changeset xxxx
- seo_v_1.0-completed [this is in yellow]
- seo through section 2
- seo cross reference done
- initial commit
Edit: glog output added
@ changeset: 9:8637aa6d738f
|\ tag: tip
| | parent: 8:
| | parent: 7:
| |
| | summary: merge thing
| |
| o changeset: 8:
| | parent: 4:
| |
| | summary: up to 33
| |
o | changeset: 7:
| |
| | summary: Added tag seo_v_1.1 for changeset de5f8c81840f
| |
o | changeset: 6:
| | tag: seo_v_1.1
| |
| |
| | summary: cleared left col colors
| |
o | changeset: 5:
|/
|
| summary: Added tag seo_v_1.0 for changeset c13bd5d3cc09
| o changeset: 4:
| tag: seo_v_1.0
|
| summary: -completed cross-reference
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您能否向我们展示启用 graphlog 扩展后“hg glog”的输出?
您可以删除大部分更改,但请至少保留足够的更改以显示:
Can you show us the output of "hg glog" with the graphlog extension enabled?
You can strip most of the changes, but please leave at least enough changes to show:
创建标签肯定不会创建命名分支,但它可能会创建匿名分支,因为该行为会修改
.hgtags
文件,然后提交。快速阅读一下本文;它非常有帮助:
http://stevelosh.com/ blog/2009/08/a-guide-to-branching-in-mercurial/
我确信通过 Giorgos 请求的 hg glog 输出,我们可以帮助您弄清楚发生了什么,但从中可以有更多的了解指南您可能会亲自看到。
Creating a tag definitely didn't create a named branch, but it could have created an anonymous branch, because the act modifies the
.hgtags
file and then commits.Give this a quick read; it's immensely helpful:
http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/
I'm sure with the hg glog output Giorgos requested we can help you figure out what happened, but with a little more understanding from that guide you'll probably see it yourself.