开发者

What is the purpose of closing a branch

What is the purpose of closing a branch

I was wondering, what is the purpose of closing a branch. As for issue-1 branch, I had already close. But

  • I still can see issue1-1 in my revision graph
  • I still can swit开发者_高级运维ch to branch issue1-1, and continue to commit.

So, what is the whole point of closing a branch?


See: https://www.mercurial-scm.org/wiki/PruningDeadBranches

It is informational so that hg branches will show that these branches are closed. And hg heads --active will not display any heads that are marked closed.

In a long run, number of branches can be considerable and can add to informational noise. This is a good way to prune some of those noise.


This is exactly why named branches probably aren't the right choice for per-feature and per-issue branches -- you can hide them but you can't eliminate them. Consider reserving named branches for long-lived concepts like 'stable', 'experimental', etc. For per-issue and per-feature branching either anonymous branches, clone branches, or bookmarks are better solutions. They're all described wonderfully here: A Guide to Branching In Mercurial.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜