此Mercurial工作流程有不利之处吗?头? [英] Is there a downside to this Mercurial workflow: named branch "dead" head?

查看:96
本文介绍了此Mercurial工作流程有不利之处吗?头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢命名分支的灵活性,但是我对头部的增高有些担心.

I love the flexibility of named branches but I have some concerns about the prolifieration of heads.

即使分支关闭,它仍然会出现在头部.我对如何清理汞头"的输出有一个想法 我对上司的问题是:我想念什么?"

Even when the branch is closed, it still shows up in the heads. I have an idea for how to clean up the output from "hg heads" My question to the gurus: "What am I missing?"

首先,您可能会问,为什么我要完全隐藏命名分支的头?由于各种原因:

First off you may ask, Why might I want to totally hide the head of a named branch? For various reasons:

  • 该功能不是一个好主意
  • 此功能是一个好主意,尚不准备合并,但可能要几个月后才能完成.
  • 分支是对较早标记版本的修补程序版本

事实证明,头部偏低是我使用的旧版水银的症状.关闭分支会在较新的Mercurial版本上隐藏它的分支头.

edit: It turns out the prolifiration of heads is a symptom of the older version of mercurial I was using. Closing the branch hides the head of the branch it on newer Mercurial versions.

我的想法是要有一个死"头分支,所有这些闭合的分支头都将合并到该分支上.
死头将以变更集0为父,并且唯一的目的就是捆绑目前不需要的流浪头.

My idea is to have a "dead" head branch onto which all these closed branch heads will be merged.
The dead head would be parented by changeset 0 and serve the sole purpose of bundling up the stray heads that are not needed right now.

该标头仅具有其他标头子代,它们永远不会合并回到默认分支中.

The deadhead has only other deadhead children, which never get merged back into the default branch.

推荐答案

您可以使用hg commit --close-branch将分支标记为已关闭:

You can use hg commit --close-branch to mark a branch as closed:

http://www.selenic.com/mercurial/hg.1. html#commit

默认情况下,关闭的分支不会显示在hg brancheshg heads中(仅当指定了-c/--closed选项时),所以我不确定您如何看待混乱"?

Closed branches will not show up in hg branches or hg heads by default (only if the -c/--closed option is specified), so I'm not sure how you're seeing "clutter"?

通过合并,您究竟会获得什么?

What exactly would you gain by merging things?

这篇关于此Mercurial工作流程有不利之处吗?头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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