我如何知道哪个分支是 Mercurial 中的最新分支?
我想从 Mercurial 的最新分支结帐,但我不知道它是哪一个。如何在 Mercurial 中列出项目的所有分支,以及如何从最新的分支中签出?
I would like to checkout from the latest branch in mercurial, but I don't know which one it is. How do I list all the branches of a project in Mercurial, and how do I checkout from the latest one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
标签
tip
始终分配给最新的变更集;无论您之前在哪个分支工作,hg update -r Tip
都会更新到此变更集。hgtip
将显示有关提示的信息,包括分支名称。The tag
tip
is always assigned to the most recent changeset;hg update -r tip
will update to this changeset regardless of which branch you were working in before.hg tip
will show information about the tip, including the branch name.Wooble 已回答您问题的第二部分。
至于第一部分...
假设您指的是 命名分支,则为
hg 分支
如果您指的是 heads,则为
hg head
每个命令都有关于查看闭合分支等的各种选项。
Wooble has answered the 2nd part of your question.
As for the first part...
Assuming you mean named branches, then
hg branches
If you mean heads then
hg heads
Each of those commands has various options about seeing closed branches, etc.