如何正確關閉Mercurial中的功能分支? - How to correctly close a feature branch in Mercurial?

問題:

I've finished working on a feature branch feature-x . 我已經完成了功能分支feature-x I want to merge results back to the default branch and close feature-x in order to get rid of it in the output of hg branches . 我想將結果合併回default分支並關閉feature-x ,以便在hg branches的輸出中刪除它。

I came up with the following scenario, but it has some issues: 我想出了以下場景,但它有一些問題:

$ hg up default
$ hg merge feature-x
$ hg ci -m merge
$ hg up feature-x
$ hg ci -m 'Closed branch feature-x' --close-branch

So the feature-x branch (changests 40 - 41 ) is closed, but there is one new head , the closing branch changeset 44 , that will be listed in hg heads every time: 因此, feature-x分支(changests 40 - 41 )是封閉的,但有一個新的頭 ,關閉分支機構變更44 ,將在上市hg heads每次:

$ hg log ...
o  44 Closed branch feature-x
|
| @  43 merge
|/|
| o  42 Changeset C
| |
o |  41 Changeset 2
| |
o |  40 Changeset 1
|/
o  39 Changeset B
|
o  38 Changeset A
|

Update : It appears that since version 1.5 Mercurial doesn't show heads of closed branches in the output of hg heads anymore. 更新 :似乎從版本1.5 Mercurial不再顯示hg heads輸出中的封閉分支hg heads

Is it possible to close a merged branch without leaving one more head? 是否有可能關閉合並的分支而不再留下一個頭? Is there more correct way to close a feature branch? 是否有更正確的方法來關閉功能分支?

Related questions: 相關問題:


解決方案:

參考一: https://en.stackoom.com/question/9O0E
參考二: https://stackoom.com/question/9O0E
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章