水银分支和书签 [英] Mercurial branching and bookmarks

查看:97
本文介绍了水银分支和书签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了有关命名分支以及使用书签的一些信息.不幸的是,我仍然看不到它们之间的区别.有吗?

I read some information about named branches and working with bookmarks. Unfortunately I still don't see a difference between them. Is there any?

两者之间是否有区别?

hg branch blah
hg up blah

hg bookmark blah
hg up blah

?

为什么要使用书签,它与命名分支有何不同?

Why would I use a bookmark and how is it different from a named branch?

推荐答案

书签是可以自动前进到后续更改的标记,而在以前具有该书签指向它们的更改集上没有标记.另一方面,命名分支是变更集的一部分,是不可删除的标记.多个头可以位于同一分支上,但是同一书签一次只能指向一个头.命名的分支在回购中被推/拉,书签也不会移动.

Bookmarks are tags that move forward automatically to subsequent changes, leaving no mark on the changesets that previously had that bookmark pointing toward them. Named branches, on the other hand, are indelible marks that are part of a changeset. Multiple heads can be on the same branch, but only one head at a time can be pointed to by the same bookmark. Named branches are pushed/pulled from repo to repo, and bookmarks don't travel.

这里有一个很好的分支比较:

There's a great branching comparison here: http://stevelosh.com/blog/entry/2009/8/30/a-guide-to-branching-in-mercurial/

这篇关于水银分支和书签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆