使用Mercurial,您如何记录跨分支祖先的分支? [英] With Mercurial, how do you hg log a branch with cross-branch ancestors?

查看:75
本文介绍了使用Mercurial,您如何记录跨分支祖先的分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mercurial中,我想为我的stable分支的修订版本构建所有提交消息的变更日志.目前,我正在使用:

In Mercurial, I'm wanting to build a changelog of all commit messages for revisions my stable branch. Currently, I'm using:

hg log -r <oldid>::<newid>

哪里是上次我们推出代码以来变更集的修订版ID,是stable的提示.这对于仅在stable分支上的代码更改非常有用,但是如果我合并另一个分支(例如具有自己的开发分支的新主版本),则所有提交消息都将被忽略!相反,我只从合并到stable的位置获得1提交.我也想通过某种方式(最好是w/hg log)来查看这些内容.

where is the revision id of the changeset from the last time we pushed out code, and is stable's tip. This works great for code changes that are only on the stable branch, but if I'm merging another branch (such as a new major version which had its own development branch), all those commit messages are omitted! Instead I only get the 1 commit from where it merged into stable. I would like some way (preferably w/ hg log) to see these as well.

我不想在此列表中获得任何未发布的"提交-即,在尚未合并到stable的任何分支上的提交.

I do NOT want to get any "unpublished" commits in this list - that is, commits on any branches which haven't been merged into stable.

以下是我正在寻找的示例:

Here is an example of what I'm looking for:

在此示例中,上次推送的修订版本是540.因此,我不需要540或更低的版本.有几个分支进入default,然后又回到stable,我希望所有这些分支(绿色的539、541-557).但是,有些更改没有合并回到stable(558-563)中,我希望忽略这些更改.请特别注意539版;发布540时未将其合并到stable中,因此未包括在内.但是现在它已经合并到stable中,所以我想将其包括在内!

In this example, the last pushed revision is 540. Because of this, I don't want anything at 540 or below. There are several branches out into default and back in to stable, and I want all of these (539, 541-557 in green). However, there are some changes NOT merged back into stable (558-563) which I wish to omit. Pay special attention to Revision 539; it was NOT merged into stable when 540 was published, and therefore was not included. But now it has since been merged into stable, so I would like to include it!

任何人的建议都将不胜感激.谢谢!

Any advice you guys have would be greatly appreciated. Thanks!

推荐答案

不确定100%是否可行:

Not 100% sure if this will work:

hg log -r '::stable - ::540'

我不确定,因为我以为您提供的命令除变更集539之外大部分都是正确的.您不是误将-b stable传递给hg log,对吗?

I'm uncertain about it because I would have thought the command you provided would mostly be correct, except for changeset 539. You're not passing -b stable to hg log by mistake, are you?

这篇关于使用Mercurial,您如何记录跨分支祖先的分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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