Mercurial-如何在特定分支上找到第一个提交
我不想确定“foo”分支的年龄。据我所知,不可能直接得到这些信息。我正在尝试编写一个命令,该命令将在“foo”分支上查找有关首次提交的信息Mercurial-如何在特定分支上找到第一个提交,mercurial,Mercurial,我不想确定“foo”分支的年龄。据我所知,不可能直接得到这些信息。我正在尝试编写一个命令,该命令将在“foo”分支上查找有关首次提交的信息 这一个并不是我想要的。有人能帮我吗?我应该在没有父母的情况下写这篇文章: hg log -r "min(branch(foo))" 现在它满足了我的需要。这能满足你的需要吗 hg log -r "branch(default) and 0:" -l 1 --template "{date|isodate}\n" 我认为这将为您提供命名分支上第一个变更集的
这一个并不是我想要的。有人能帮我吗?我应该在没有父母的情况下写这篇文章:
hg log -r "min(branch(foo))"
现在它满足了我的需要。这能满足你的需要吗
hg log -r "branch(default) and 0:" -l 1 --template "{date|isodate}\n"
我认为这将为您提供命名分支上第一个变更集的日期
因此,分支“testbranch”上的第一个变更集
。。。添加模板
只是为了获取日期:
% hg log -r "branch(testbranch) and 0:" -l 1 --template "{date|isodate}\n"
2015-05-15 15:16 +0100
如果您始终希望返回单个变更集,则您的min
也会起作用:
% hg log -r "min(branch(testbranch))"
changeset: 107:bd91c8e6fa5f
branch: testbranch
user: Nick Pierpoint <nick.pierpoint@uk.bp.com>
date: Fri May 15 15:16:44 2015 +0100
summary: test one
%hg log-r“最小(分支(测试分支))”
变更集:107:bd91c8e6fa5f
分支:测试分支
用户:Nick Pierpoint
日期:2015年5月15日星期五15:16:44+0100
小结:测试一
% hg log -r "branch(testbranch) and 0:" -l 1 --template "{date|isodate}\n"
2015-05-15 15:16 +0100
% hg log -r "min(branch(testbranch))"
changeset: 107:bd91c8e6fa5f
branch: testbranch
user: Nick Pierpoint <nick.pierpoint@uk.bp.com>
date: Fri May 15 15:16:44 2015 +0100
summary: test one