是否可以在Mercurial中重新打开已关闭的分支机构? [英] Is it possible to reopen a closed branch in Mercurial?

查看:72
本文介绍了是否可以在Mercurial中重新打开已关闭的分支机构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以在Mercurial中关闭一个命名分支,这样它就不会出现在hg branches列表中:

I understand that it is possible to close a named branch in Mercurial, so that it will not appear in the hg branches list:

hg commit --close-branch -m 'close badbranch, this approach never worked'

是否有必要在以后重新打开分支?

Is it possible to later re-open the branch if need be?

推荐答案

您可以将hg update转到关闭的分支,然后再执行另一个hg commit,它将自动重新打开.

You can just hg update to the closed branch then do another hg commit and it will automatically reopen.

closed标志仅用于从hg brancheshg heads过滤掉封闭的分支,除非您使用--closed选项-它不会阻止您使用分支.

The closed flag is just used to filter out closed branches from hg branches and hg heads unless you use the --closed option - it doesn't prevent you from using the branches.

这篇关于是否可以在Mercurial中重新打开已关闭的分支机构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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